Files
jdescopingtool/NEW/src/JdeScoping.Core/Options/SecureStoreOptions.cs
T
Joseph Doherty e5fe2f06e9 feat: add startup config validation and document ConfigManager pipeline editor
Add ConfigurationValidationRunner with IConfigurationValidator interface for
validating required settings at startup. Includes SecureStore and LDAP validators.
Expand ConfigManager with pipeline editing UI, dialogs, and step editors.
Update documentation with config validation guidance.
2026-01-21 17:47:15 -05:00

41 lines
1.4 KiB
C#

namespace JdeScoping.Core.Options;
/// <summary>
/// Configuration options for the secure secrets store.
/// </summary>
public class SecureStoreOptions
{
/// <summary>
/// Configuration section name in appsettings.json.
/// </summary>
public const string SectionName = "SecureStore";
/// <summary>
/// Path to the encrypted secrets store file.
/// Defaults to "data/secrets.json" relative to app directory.
/// </summary>
public string StorePath { get; set; } = "data/secrets.json";
/// <summary>
/// Path to the key file (used in development).
/// Defaults to "data/secrets.key" relative to app directory.
/// </summary>
public string KeyFilePath { get; set; } = "data/secrets.key";
/// <summary>
/// Environment variable name containing the master key (used in production).
/// If set and the env var exists, it takes precedence over the key file.
/// </summary>
public string MasterKeyEnvVar { get; set; } = "SCOPINGTOOL_MASTER_KEY";
/// <summary>
/// Whether to auto-create the store and generate a key file on first run.
/// </summary>
public bool AutoCreateStore { get; set; } = true;
/// <summary>
/// List of secret keys that must exist in the store for the application to start.
/// </summary>
public List<string> RequiredKeys { get; set; } = [];
}