Class ConfiguredSecret
- Namespace
- MailFathom.Infrastructure.Secrets.Discovery
- Assembly
- MailFathom.Infrastructure.dll
The bindable shape of every secret-bearing configuration setting.
public sealed class ConfiguredSecret
- Inheritance
-
ConfiguredSecret
- Inherited Members
Remarks
A setting is secret-bearing because it binds to this type, not because someone remembered to annotate it: a marker attribute can be omitted on a property added later and nothing would notice, whereas an omitted type simply does not bind to the block shape. ConfiguredSecretDiscovery therefore finds every secret-bearing setting by walking the bound options graph for this type, which is what makes the startup rules apply to settings that do not exist yet.
The object rather than a bare string is the unit so that a sibling property — a bundle password, a format hint, a
managed-store version pin — can be added without changing the JSON type of a setting an operator already configured.
It is a nested object in JSON but requires no JSON provider: a flattening provider addresses it as one more
colon-separated path segment, for example
MailSynchronization:Accounts:0:Secrets:Password:SecretReference.
The type is mutable because the configuration binder requires it, and it carries no resolution logic: it is the shape and the marker, nothing more.
Properties
- Lifetime
Gets or sets how long the secret stays usable: NoLimitValue, or an ISO 8601 instant carrying an explicit offset.
- Name
Gets or sets the operator-chosen identity of this secret, which is required and unique within the configuration root it belongs to.
- Password
Gets or sets the password protecting the referenced material, when the material is itself protected.
- SecretReference
Gets or sets the
<scheme>:<target>reference the host resolves, or the material itself under an inline interpretation mode.