string Key { get; }
Source
Gets the configuration key.
Provides the canonical scalar-type classification shared by configuration validation paths.
bool IsScalar(Type type)
Source
Returns whether type is treated as a scalar configuration value. Nullable wrappers are unwrapped before inspection. Supported scalar types are primitives, enums, string, decimal, DateTime, DateTimeOffset, TimeSpan, Guid, and Uri.
typeThe declared or runtime value type to inspect.true when type is a supported scalar type.
Applies the built-in audit redaction and value formatting policy.
Matching is fragment based and case-insensitive across keys, config paths, applied paths, and environment variable names. Sensitive values are replaced with a fixed placeholder before rendering. Non-sensitive complex objects may produce a null display value so callers can rely on child entries instead of an unsafe dump. Formatting failures are swallowed intentionally to keep audit generation best-effort.
ConfigAuditRedaction CreatePolicy()
Source
Creates a snapshot of the redaction policy applied to reports.
A policy snapshot with a copy of the sensitive fragments and the placeholder text.
RedactedValue FormatValue(string key, object? value, IReadOnlyList<ConfigAuditSourceRecord> sources)
Source
Formats value for display and redacts it when the key or sources look sensitive.
keyThe configuration key being formatted.valueThe resolved value, if any.sourcesThe sources that contributed to the value.The display value and whether it was replaced by the redaction placeholder.
Describes a formatted value after applying the redaction policy.
DisplayValueThe safe display value, or null for non-scalar objects.IsRedactedA value indicating whether the placeholder replaced the original value.A configuration provider that retrieves values from environment variables.
string NormalizeSegment(string value)
Source
Converts a key/environment segment to uppercase (via string.ToUpperInvariant) and flattens separators by replacing '.' and '-' with a single '_'. Used for legacy flat environment-variable lookup.
string NormalizeHierarchicalKey(string value)
Source
Converts a key to uppercase (via string.ToUpperInvariant), splits on '.' and '-' as hierarchical delimiters, removes empty segments, and joins segments using "__". Used for hierarchical environment-variable lookup while preserving path boundaries.
Describes a configuration entry known to AppSurface's audit system.
string Key { get; }
Source
Gets the configuration key.
Type? ConfigType { get; }
Source
Gets the config wrapper type, when this entry came from a wrapper.
Type ValueType { get; }
Source
Gets the declared value type.
Extension methods for registering additional configuration audit keys.
IServiceCollection AddConfigAuditKey<T>(this IServiceCollection services, string key)
Source
Registers an additional configuration key for audit reports.
TThe expected value type.servicesThe service collection.keyThe configuration key.The original services instance.
Use this method for values that should appear in audit reports but are not backed by an IConfig or Config{T} wrapper discovered by assembly scanning. Prefer wrapper discovery when a typed wrapper already exists, because the wrapper can contribute defaults and validation diagnostics. Manual registration creates a ConfigAuditKnownEntry with ConfigAuditKnownEntry.ConfigType set to null and T as the expected value type; for example, AddConfigAuditKey<Uri>("Billing.Endpoint") includes a provider-only key in reports.
Defines a provider that can retrieve configuration values.
T? GetValue<T>(string environment, string key)
Source
Retrieves a configuration value for a specific environment and key.
TThe type of the configuration value.environmentThe environment name (e.g., "Production").keyThe configuration key.The configuration value, or the default value of T if not found.
int Priority { get; }
Source
Higher number means higher priority. When multiple providers provide the same key, the one with the highest priority wins.
string Name { get; }
Source
Gets the name of the configuration provider.
The exception thrown when a strongly typed configuration value fails validation during initialization.
string Key { get; }
Source
Gets the configuration key being initialized.
Type ConfigType { get; }
Source
Gets the concrete configuration wrapper type being initialized.
Type ValueType { get; }
Source
Gets the resolved value type that was validated.
IReadOnlyList<ConfigurationValidationFailure> Failures { get; }
Source
Gets the validation failures returned for the configuration value.
A base class for strongly-typed configuration objects. Values are resolved during IConfig.Init, then object-valued configuration models are validated with DataAnnotations and scalar values can be validated with AppSurface scalar attributes or ValidateValue. Invalid provider values and invalid defaults fail fast by throwing ConfigurationValidationException, so callers that activate config wrappers can catch that exception and surface its structured failures. Ensure defaults satisfy the same validation rules as configured values; an invalid default prevents initialization when no provider value exists. Apply ConfigKeyRequiredAttribute to require resolved provider/default presence.
TThe type of the configuration value.void Init(IConfigManager configManager, IEnvironmentProvider environmentProvider, string key)
Source
Resolves the configured value for key and validates the resolved provider value or DefaultValue before initialization completes.
configManagerThe configuration manager used to resolve the provider value.environmentProviderThe environment provider used to choose the active environment.keyThe configuration key to resolve.ConfigurationValidationExceptionThrown when the wrapper requires a value and no provider/default value resolves, or when the provider value or default value violates object DataAnnotations or scalar validation rules.IEnumerable<ValidationResult>? ValidateValue(T value, ValidationContext validationContext)
Source
Validates a resolved non-null scalar configuration value. Override this method when a scalar rule is too specific for the built-in AppSurface scalar attributes.
valueThe resolved provider or default scalar value.validationContextThe validation context for the concrete configuration wrapper.The validation results for value. Return null, an empty sequence, ValidationResult.Success, or null entries when validation succeeds.
bool HasValue { get; set; }
Source
Gets a value indicating whether the configuration has a value (either from source or default).
bool IsDefaultValue { get; set; }
Source
Gets a value indicating whether the current value is the default value.
T? Value { get; set; }
Source
Gets the configuration value.
T? DefaultValue { get; }
Source
Gets the default value for the configuration if none is found in the source.
Requires a strongly typed configuration wrapper to resolve a value during initialization.
Apply this attribute to a concrete Config{T} or ConfigStruct{T} wrapper when startup should fail if provider/default resolution leaves the wrapper without a value. A Config{T}.DefaultValue or ConfigStruct{T}.DefaultValue satisfies the requirement because the requirement is resolved presence, not provider-source auditing.
This attribute is intentionally separate from scalar value validation attributes such as ConfigValueNotEmptyAttribute. Use ConfigKeyRequiredAttribute when absence should fail, and use value validation when a resolved value must satisfy shape or range rules.
Describes one validation failure found while initializing a strongly typed configuration value.
string Key { get; }
Source
Gets the configuration key being initialized.
Type ConfigType { get; }
Source
Gets the concrete configuration wrapper type being initialized.
Type ValueType { get; }
Source
Gets the resolved value type that was validated.
IReadOnlyList<string> MemberNames { get; }
Source
Gets the member names or paths associated with the failure. Object-level failures use an empty list rather than null; consumers should treat that empty collection as a valid failure payload. The returned list is an immutable snapshot owned by this instance.
string Message { get; }
Source
Gets the validation message.
Provides object-graph patching for configuration providers that can supply child values beneath a requested key.
This is an internal provider seam, not a consumer-facing configuration API. DefaultConfigManager uses it after direct provider resolution so hierarchical override sources can update only the supplied child values instead of replacing an entire options object.
bool TryPatch<T>(string environment, string key, T? currentValue, out T? patchedValue)
Source
Attempts to apply provider-owned child values beneath key to currentValue.
TThe requested configuration value type.environmentThe active environment name.keyThe configuration key whose child values may be present.currentValueThe value supplied by a lower-priority provider, or default.patchedValueWhen this method returns true, contains the patched value. Otherwise contains default.true when at least one child value was applied.
Renders ConfigAuditReport instances as deterministic, human-readable text.
string Render(ConfigAuditReport report)
Source
Renders report as text.
reportThe report to render.A human-readable report.
A module that registers configuration management services and automatically discovers and registers configuration objects.
AppSurfaceConfigModule registers core configuration services immediately, then defers typed IConfig discovery through StartupContext.CustomRegistrations so all module dependencies are known first. The deferred scan inspects dependency module assemblies, the entry assembly, and the root module assembly. Pitfall: config dependencies should be registered before the custom registration callback runs; otherwise discovered config objects may activate before their supporting services are available.
void ConfigureServices(StartupContext context, IServiceCollection services)
Source
Registers AppSurface config services and schedules typed config discovery after module registration.
contextStartup context that supplies assemblies, dependency modules, and the custom registration log.servicesService collection that receives the default configuration services.ConfigureServices(StartupContext, IServiceCollection) adds the default manager, providers, audit reporter, redactor, and file-location provider, then appends a StartupContext.CustomRegistrations callback. That callback scans dependency, entry, and root-module assemblies for concrete IConfig implementations and registers each as a singleton initialized from IConfigManager and IEnvironmentProvider.
Validates resolved Config{T} and ConfigStruct{T} values with DataAnnotations. The validator returns immediately for null values and scalar primitives, validates object and field annotations before initialization completes, and traverses nested members only when callers opt in with ValidateObjectMembersAttribute or ValidateEnumeratedItemsAttribute. Recursive traversal tracks the active object path by reference so cycles terminate while shared objects can still be reported at each reachable path. AppSurface owns this traversal and the ConfigurationValidationException shape; the custom validator type overloads on the Microsoft Options marker attributes are reported as unsupported failures rather than invoked.
void Validate(string key, Type configType, Type valueType, object? value)
Source
Validates a resolved configuration value and throws ConfigurationValidationException when DataAnnotations failures are found. Call this after provider/default resolution and before config initialization is considered complete. Null and scalar values short-circuit, recursive validation is marker-gated, and callers should catch ConfigurationValidationException to inspect the structured failures.
keyThe configuration key being initialized.configTypeThe concrete configuration wrapper type being initialized.valueTypeThe resolved value type that is being validated.valueThe resolved provider or default value.ConfigurationValidationExceptionThrown when the resolved value or an opted-in nested value violates DataAnnotations validation rules.Specifies the configuration key or path for a type.
string? ExtractKey(object obj)
Source
Extracts the configuration key from an object's type attribute.
objThe object to extract the key from.The configuration key, or null if not specified.
string? ExtractKey(Type type)
Source
Extracts the configuration key from a type's attribute.
typeThe type to extract the key from.The configuration key, or null if not specified.
string GetKeyPath(Type type)
Source
Computes the full configuration key path for a type, recursively including declaring types unless Root is true.
typeThe type to compute the path for.The computed configuration key path.
string Key { get; }
Source
Gets the configuration key or path for this type.
bool Root { get; }
Source
Gets a value indicating whether this key should be treated as a root key, ignoring the declaring type hierarchy.
A configuration provider that reads settings from JSON files (e.g., appsettings.json, config_*.json).
A base class for strongly-typed configuration objects where the value is a struct. Values are resolved during IConfig.Init, then object-valued configuration models are validated with DataAnnotations and scalar values can be validated with AppSurface scalar attributes or ValidateValue. Invalid provider values and invalid defaults fail fast by throwing ConfigurationValidationException, so callers that activate config wrappers can catch that exception and surface its structured failures. Ensure defaults satisfy the same validation rules as configured values; an invalid default prevents initialization when no provider value exists. Apply ConfigKeyRequiredAttribute to require resolved provider/default presence.
TThe struct type of the configuration value.void IConfig.Init(IConfigManager configManager, IEnvironmentProvider environmentProvider, string key)
Source
Resolves the configured value for key and validates the resolved provider value or DefaultValue before initialization completes.
configManagerThe configuration manager used to resolve the provider value.environmentProviderThe environment provider used to choose the active environment.keyThe configuration key to resolve.ConfigurationValidationExceptionThrown when the wrapper requires a value and no provider/default value resolves, or when the provider value or default value violates object DataAnnotations or scalar validation rules.IEnumerable<ValidationResult>? ValidateValue(T value, ValidationContext validationContext)
Source
Validates a resolved non-null scalar configuration value. Override this method when a scalar rule is too specific for the built-in AppSurface scalar attributes.
valueThe resolved provider or default scalar value.validationContextThe validation context for the concrete configuration wrapper.The validation results for value. Return null, an empty sequence, ValidationResult.Success, or null entries when validation succeeds.
bool HasValue { get; set; }
Source
Gets a value indicating whether the configuration has a value.
bool IsDefaultValue { get; set; }
Source
Gets a value indicating whether the current value is the default value.
T? Value { get; set; }
Source
Gets the configuration value.
T? DefaultValue { get; }
Source
Gets the default value for the configuration if none is found in the source.
Validates required resolved presence for strongly typed configuration wrappers.
void Validate(string key, Type configType, Type valueType, bool hasValue)
Source
Throws ConfigurationValidationException when a wrapper marked with ConfigKeyRequiredAttribute has no resolved provider or default value.
keyThe configuration key being initialized.configTypeThe concrete configuration wrapper type being initialized.valueTypeThe declared configuration value type.hasValueWhether provider/default resolution produced a value.Defines a configuration provider that also provides environment information.
IEnvironmentConfigProvider composes IConfigProvider with IEnvironmentProvider for implementations that need to resolve configuration and the active environment from the same source. Prefer the composite when environment-aware config lookup should be atomic or co-located in one implementation; use the separate interfaces when configuration and environment ownership differ. Implementations should be safe for repeated reads, define any caching or refresh behavior, and avoid assuming that all configuration is environment-exclusive. Disposal and lifetime follow the concrete provider registration.
Produces structured configuration audit reports.
Reporters inspect known configuration keys, provider provenance, validation diagnostics, and redacted display values. Implementations should return a report with diagnostics for recoverable provider and wrapper failures rather than throwing after argument validation succeeds.
ConfigAuditReport GetReport(string environment)
Source
Builds a configuration audit report for environment.
environmentThe environment to audit.The completed audit report.
Default implementation that mirrors configuration resolution while preserving source and diagnostic metadata.
This internal reporter treats IEnvironmentConfigProvider as the override provider, excludes manager/internal provider registrations from the displayed provider list, and favors wrapper-discovered audit entries when duplicate keys are registered manually. Provider failures are converted into diagnostics so one broken provider does not prevent operators from seeing the rest of the report.
Captures a provider's value resolution result before wrapper inspection and redaction.
KeyThe configuration key being resolved.StateThe provider-level resolution state.ValueThe resolved raw value, or null when missing or invalid.SourcesThe sources that contributed to the value.DiagnosticsDiagnostics emitted while resolving the value.The reporter uses this internal contract to keep value state, provenance, and diagnostics together while it walks providers in precedence order. Missing values should be represented with Missing(string).
ConfigValueResolution Missing(string key)
Source
Creates a missing resolution with a synthetic missing source record for key.
keyThe missing configuration key.A missing resolution that can still be rendered with provenance.
Describes the result of tracing environment patches onto an existing provider value.
PatchedA value indicating whether any member was patched.ValueThe patched value, or the original/current value when unchanged.SourcesThe environment sources that successfully patched the value.DiagnosticsDiagnostics produced while reading patch candidates.Describes wrapper inspection after provider resolution.
ValueThe value to display and expand after defaulting or validation.StateThe wrapper-adjusted state, or null to keep provider state.DefaultSourceThe default source when the wrapper supplied a fallback value.DiagnosticsValidation and wrapper diagnostics.Allows providers to expose audit-specific resolution details and report-level diagnostics.
Implementations should avoid throwing for expected parse or source errors and return diagnostics instead. The reporter catches unexpected exceptions and converts them into provider diagnostics.
ConfigValueResolution Resolve(string environment, string key, Type valueType, ConfigAuditSourceRole role)
Source
Resolves key for audit reporting without losing source metadata.
environmentThe environment being audited.keyThe configuration key.valueTypeThe expected value type.roleThe role the provider plays in final resolution.The provider-specific resolution result.
IReadOnlyList<ConfigAuditDiagnostic> GetReportDiagnostics(string environment)
Source
Gets diagnostics that apply to the whole report rather than one key.
environmentThe environment being audited.Report-level diagnostics. Return an empty list when there are none.
Allows an override provider to trace member-level patches onto a base provider value.
The environment provider uses this to explain mixed provenance for object values without mutating the provider instance that supplied the base value.
ConfigPatchDiagnosticResult TracePatch(string environment, string key, object? currentValue, Type valueType)
Source
Traces patch candidates for key and returns a cloned patched value when possible.
environmentThe environment being audited.keyThe configuration key.currentValueThe lower-priority provider value to patch, when any.valueTypeThe expected value type.The patch result, including successful patch sources and diagnostics.
Allows config wrappers to add defaults and validation diagnostics to an audit entry.
Implementations receive the raw provider value and should return structured diagnostics rather than throwing for validation failures. Unexpected exceptions are caught by the wrapper implementations.
ConfigWrapperInspection Inspect(string key, object? rawValue, ConfigAuditEntryState resolutionState)
Source
Inspects a resolved value for defaults and validation.
keyThe configuration key.rawValueThe raw provider value, or null when missing.resolutionStateThe state determined during provider resolution.The wrapper inspection result.
Provides the base directory used to resolve AppSurface configuration files.
Implementations should return a stable absolute path that exists and is readable by the process. The default implementation returns AppContext.BaseDirectory. Callers should validate Directory before opening files and report a configuration error when it is null, empty, missing, unreadable, or unsuitable for the current platform. Paths should not depend on the current working directory; symlinks and platform separators are implementation details callers should normalize before comparison.
string Directory { get; }
Source
Gets the absolute directory path containing configuration files.
The value should be an absolute path without a required trailing slash. The provider does not own the directory lifetime and should not create, delete, or lock it. A typical consumer checks System.IO.Directory.Exists(provider.Directory) before resolving known config file names below that path and returns a clear validation failure when the directory is unavailable.
Default implementation of IConfigFileLocationProvider that uses the application's base directory.
DefaultConfigFileLocationProvider returns AppContext.BaseDirectory from Directory. This is appropriate for simple apps that keep configuration beside application binaries. Use a custom IConfigFileLocationProvider for environment-specific, user-scoped, container-mounted, or service-hosted configuration. Pitfall: AppContext.BaseDirectory is not necessarily System.IO.Directory.GetCurrentDirectory and can vary by deployment model, test runner, or host.
Base class for AppSurface scalar configuration value validation attributes. Apply derived attributes to concrete Config{T} or ConfigStruct{T} wrapper types to validate resolved scalar values during configuration initialization.
Scalar validation runs after provider/default resolution and only when the resolved value is non-null. These attributes validate the value itself; they do not make a missing configuration key required. Use a default value or an application startup presence check when absence should fail.
Validation is intentionally strict about value types. Built-in scalar attributes return validation failures for unsupported runtime types instead of converting values. Use an options object with DataAnnotations when validation spans multiple members, needs nested object traversal, or should model required presence separately from value shape.
The validation context object is the concrete config wrapper and does not provide application dependency injection services. Override Config{T}.ValidateValue or ConfigStruct{T}.ValidateValue for scalar rules that cannot be expressed as reusable attributes.
Validates that a resolved scalar configuration value is not empty. Supported value types are string and Guid.
A null value is treated as successful validation so optional or missing scalar values remain optional. Non-null strings must contain non-whitespace characters, and non-null Guid values must not be Guid.Empty.
Runtime type matching is strict: only string and Guid are supported. Applying this attribute to a different scalar value type returns a validation failure rather than attempting a conversion. Use an options object with member-level DataAnnotations when required presence, cross-field rules, or richer object validation is part of the contract.
Validates that a resolved scalar numeric configuration value is inside an inclusive range. Supported value types are int and double.
A null value is treated as successful validation so optional or missing scalar values remain optional. Non-null values are compared against the inclusive minimum and maximum supplied to the constructor.
Range validation accepts resolved int and double values. Integer bounds are widened when validating a double value, so attribute arguments such as [ConfigValueRange(1, 5)] work for ConfigStruct<double> wrappers. Unsupported runtime types return validation failures instead of being converted. Use an options object when validation needs multiple numeric fields, required presence, or object-level DataAnnotations.
object Minimum { get; }
Source
Gets the inclusive minimum allowed value as a boxed int or double, matching the constructor overload used to create the attribute.
The integer constructor stores a boxed int, and the double constructor stores a boxed double. Callers should unbox this value according to the constructor overload they used. The attribute treats the bound as inclusive and may widen integer bounds when validating double values.
object Maximum { get; }
Source
Gets the inclusive maximum allowed value as a boxed int or double, matching the constructor overload used to create the attribute.
The integer constructor stores a boxed int, and the double constructor stores a boxed double. Callers should unbox this value according to the constructor overload they used. The attribute treats the bound as inclusive and may widen integer bounds when validating double values.
Validates that a resolved scalar string configuration value has at least the configured length.
A null value is treated as successful validation so optional or missing scalar values remain optional. Non-null strings must have a length greater than or equal to Length.
Runtime type matching is strict: only string values are supported. Applying this attribute to another scalar value type returns a validation failure rather than converting the value. Use an options object with DataAnnotations when string length is only one part of a larger model contract or when required presence should be represented separately.
int Length { get; }
Source
Gets the minimum allowed string length.
Default implementation of IConfigManager that aggregates configuration from multiple sources.
void LogKeyNotFound(string key, string environment)
Source
Logs that a configuration key was not found.
keyThe configuration key.environmentThe environment name.void LogRetrievedFromEnvironment(string key, string environment, string source)
Source
Logs that a configuration key was retrieved from a specific source.
keyThe configuration key.environmentThe environment name.sourceThe source of the configuration value.Creates ConfigurationValidationFailure instances from DataAnnotations results while preserving AppSurface's member-path formatting contract.
ConfigurationValidationFailure FromValidationResult(string key, Type configType, Type valueType, string? path, ValidationResult result, string? defaultMemberName = null)
Source
Converts a ValidationResult into a configuration-validation failure payload.
keyThe configuration key being validated.configTypeThe concrete configuration wrapper type.valueTypeThe resolved value type being validated.pathOptional member path prefix. When present, validation-result member names are combined under this path using dot notation, and the path itself is used when the result has no member names.resultThe validation result to convert.defaultMemberNameOptional fallback member name used when result has no member names, such as field-level validation where DataAnnotations did not bind the member name itself.A normalized ConfigurationValidationFailure.
Defines a configuration object that can be initialized using a configuration manager.
void Init(IConfigManager configManager, IEnvironmentProvider environmentProvider, string key)
Source
Initializes the configuration object, resolving its provider or default value and failing fast with ConfigurationValidationException when required presence is not satisfied or when the resolved value violates object DataAnnotations rules or scalar value validation rules. Exceptions thrown by scalar Config{T}.ValidateValue or ConfigStruct{T}.ValidateValue overrides are not wrapped, so callers that activate config wrappers during startup should let unexpected programming errors fail the startup path.
configManagerThe configuration manager to use for retrieving values.environmentProviderThe environment provider.keyThe root configuration key for this object.ConfigurationValidationExceptionThrown when the wrapper requires a value and no provider/default value resolves, or when the resolved provider value or default value violates object DataAnnotations or scalar validation rules.ExceptionThrown when a concrete scalar validation override throws; override exceptions are not wrapped.Describes the resolved configuration state for an AppSurface environment.
Reports are immutable snapshots from the caller's perspective: provider order, entries, diagnostics, and redaction policy describe one audit run and should not be treated as live configuration. Use Entries for machine inspection and ConfigAuditTextRenderer when operators need a deterministic text dump.
string Environment { get; init; }
Source
Gets the environment this report describes.
DateTimeOffset GeneratedAt { get; init; }
Source
Gets the time when this report was generated.
IReadOnlyList<ConfigAuditProvider> Providers { get; init; }
Source
Gets the provider precedence used while producing this report.
IReadOnlyList<ConfigAuditEntry> Entries { get; init; }
Source
Gets the known configuration entries resolved for this environment.
IReadOnlyList<ConfigAuditDiagnostic> Diagnostics { get; init; }
Source
Gets report-level diagnostics that are not tied to a single entry.
ConfigAuditRedaction Redaction { get; init; }
Source
Gets the redaction policy applied before this report was returned.
Describes one provider in the audit report precedence list.
Precedence is the display order used by audit reports. Environment providers are marked as overrides because they are checked before normal priority-ordered providers.
string Name { get; init; }
Source
Gets the provider name.
int Priority { get; init; }
Source
Gets the provider priority.
int Precedence { get; init; }
Source
Gets the precedence rank used by the configuration manager. Lower ranks are checked first.
bool IsOverride { get; init; }
Source
Gets a value indicating whether the manager treats this provider as an override outside normal priority order.
Describes one known configuration entry and its source records.
State summarizes the entry as a whole. Object entries can contain Children with more specific provenance, including nested ConfigAuditEntryState.PartiallyResolved states when descendants are patched. DisplayValue is already redacted and can be null for complex values; callers should inspect children instead of assuming a full object dump is available.
string Key { get; init; }
Source
Gets the configuration key.
string? DeclaredType { get; init; }
Source
Gets the declared value type name when known.
ConfigAuditEntryState State { get; init; }
Source
Gets the resolved entry state.
string? DisplayValue { get; init; }
Source
Gets the display-safe value. Sensitive values are already redacted.
bool IsRedacted { get; init; }
Source
Gets a value indicating whether DisplayValue was redacted.
IReadOnlyList<ConfigAuditSourceRecord> Sources { get; init; }
Source
Gets the source records that contributed to this entry.
IReadOnlyList<ConfigAuditEntry> Children { get; init; }
Source
Gets child entries for object-valued configuration.
IReadOnlyList<ConfigAuditDiagnostic> Diagnostics { get; init; }
Source
Gets diagnostics specific to this entry.
Describes one source that contributed to a configuration entry.
Source records identify where a value came from and how it was applied. File paths, environment variable names, and config paths are optional because not every provider exposes the same provenance. The source role is especially important for mixed values: a base source can be combined with patch sources from higher-priority providers.
ConfigAuditSourceKind Kind { get; init; }
Source
Gets the source kind.
string? ProviderName { get; init; }
Source
Gets the provider name when applicable.
int? ProviderPriority { get; init; }
Source
Gets the provider priority when applicable.
string? FilePath { get; init; }
Source
Gets the file path for file-sourced values.
string? EnvironmentVariableName { get; init; }
Source
Gets the environment variable name for environment-sourced values.
string? ConfigPath { get; init; }
Source
Gets the source config path.
string? AppliedToPath { get; init; }
Source
Gets the target config path affected by this source.
ConfigAuditSourceRole Role { get; init; }
Source
Gets the role this source played in resolution.
ConfigAuditSensitivity Sensitivity { get; init; }
Source
Gets the sensitivity classification supplied by the source.
Describes a diagnostic emitted while building a configuration audit report.
Diagnostic messages are intended to be display-safe and stable enough for operators. Use Code for programmatic handling, and use Source when a diagnostic can be tied to one provider, file, or environment variable.
ConfigAuditDiagnosticSeverity Severity { get; init; }
Source
Gets the diagnostic severity.
string Code { get; init; }
Source
Gets a stable diagnostic code.
string Message { get; init; }
Source
Gets the display-safe diagnostic message.
string? Key { get; init; }
Source
Gets the configuration key associated with the diagnostic, when any.
string? ConfigPath { get; init; }
Source
Gets the member/config path associated with the diagnostic, when any.
ConfigAuditSourceRecord? Source { get; init; }
Source
Gets the source associated with the diagnostic, when any.
Describes the redaction policy applied to a configuration audit report.
The built-in policy is always enabled and uses fragment matching before values are exposed through ConfigAuditEntry.DisplayValue. MatchedFragments is a snapshot for explanation, not a mutable policy hook.
bool Enabled { get; init; }
Source
Gets a value indicating whether redaction was enabled.
IReadOnlyList<string> MatchedFragments { get; init; }
Source
Gets the sensitive fragments matched by the built-in redactor.
string Placeholder { get; init; }
Source
Gets the display placeholder used for redacted values.
Identifies the resolution state for an audited configuration entry.
Values are explicit and append-only so serialized reports remain stable across releases.
Identifies the kind of configuration source.
Values are explicit and append-only so serialized reports remain stable across releases.
Identifies how a source contributed to the final value.
Values are explicit and append-only so serialized reports remain stable across releases.
Classifies source or value sensitivity.
Values are explicit and append-only so serialized reports remain stable across releases.
Identifies diagnostic severity.
Values are explicit and append-only so serialized reports remain stable across releases.
Defines the central manager for configuration, which aggregates multiple IConfigProvider instances.