namespace MaksIT.CertsUI.Engine;
public interface IAdminUser {
string Username { get; set; }
string Password { get; set; }
}
public interface IJwtSettingsConfiguration {
string JwtSecret { get; set; }
string Issuer { get; set; }
string Audience { get; set; }
int ExpiresIn { get; set; }
int RefreshTokenExpiresIn { get; set; }
/// Pepper used for password and 2FA recovery code hashing. Not stored in DB.
string PasswordPepper { get; set; }
}
public interface ITwoFactorSettingsConfiguration {
string Label { get; set; }
string Issuer { get; set; }
string? Algorithm { get; set; }
int? Digits { get; set; }
int? Period { get; set; }
int TimeTolerance { get; set; }
}
///
/// Engine configuration (same layering as MaksIT.Vault.Engine): PostgreSQL, identity bootstrap, JWT/2FA, ACME URLs, agent reload.
/// Nested contracts , , are property shapes only — resolve from DI (AddCertsEngine), not those facets as separate singletons.
///
public interface ICertsEngineConfiguration {
string ConnectionString { get; set; }
IAdminUser Admin { get; set; }
IJwtSettingsConfiguration JwtSettingsConfiguration { get; set; }
ITwoFactorSettingsConfiguration TwoFactorSettingsConfiguration { get; set; }
/// When true, add-only schema sync runs after FluentMigrator at startup.
bool AutoSyncSchema { get; set; }
/// Let's Encrypt production ACME directory URL (RFC 8555).
string LetsEncryptProduction { get; set; }
/// Let's Encrypt staging ACME directory URL.
string LetsEncryptStaging { get; set; }
/// Service name passed to the deployment agent after issuance (from host Agent config).
string AgentServiceToReload { get; set; }
}