GoogleSecretManagerResultStatus Status { get; }
Source
Gets the resolution status.
Default IAppSurfaceGoogleSecretManagerClient backed by Google Cloud Secret Manager.
The default constructor creates the Google client lazily so applications that register the provider but do not resolve Google-backed keys avoid opening Secret Manager transport during service registration.
Validates AppSurfaceGoogleSecretManagerOptions before provider lookup.
Describes a scoped convention resolver for Google Secret Manager mappings.
LogicalKeyPrefixThe logical-key prefix this convention may claim.SecretIdPrefixThe optional prefix prepended to normalized secret ids.VersionThe optional version or alias used by this convention.Maps one AppSurface logical configuration key to a Google Secret Manager secret.
LogicalKeyThe logical AppSurface configuration key.SecretIdOrResourceNameA short secret id or full Secret Manager version resource name.VersionThe optional version or alias for short secret ids.Registers the AppSurface Google Secret Manager configuration provider.
Describes a typed Google Secret Manager configuration resolution.
TThe requested configuration type.GoogleSecretManagerConfigResolution<T> Unclaimed()
Source
Creates an unclaimed resolution.
An unclaimed resolution.
GoogleSecretManagerConfigResolution<T> Found(T? value, string source)
Source
Creates a found resolution.
valueThe converted value.sourceThe source name.A found resolution.
GoogleSecretManagerConfigResolution<T> Failed(GoogleSecretManagerResultStatus status, ConfigProviderTerminalDiagnostic diagnostic, string source)
Source
Creates a failed claimed-key resolution.
statusThe failed status.diagnosticThe display-safe diagnostic.sourceThe source name.A failed resolution.
GoogleSecretManagerResultStatus Status { get; }
Source
Gets the resolution status.
T? Value { get; }
Source
Gets the converted value when Status is GoogleSecretManagerResultStatus.Found.
ConfigProviderTerminalDiagnostic? Diagnostic { get; }
Source
Gets the display-safe terminal diagnostic when resolution failed for a claimed key.
string? Source { get; }
Source
Gets the provider source name.
Provides service collection helpers for AppSurface Google Secret Manager.
IServiceCollection ConfigureAppSurfaceGoogleSecretManager(this IServiceCollection services, Action<AppSurfaceGoogleSecretManagerOptions> configure)
Source
Configures Google Secret Manager options.
servicesThe service collection to configure.configureThe options callback.The original service collection.
IServiceCollection UseAppSurfaceGoogleSecretManagerClient<TClient>(this IServiceCollection services)
Source
Replaces the Google Secret Manager client seam.
TClientThe client implementation type.servicesThe service collection to configure.The original service collection.
IServiceCollection UseAppSurfaceGoogleSecretManagerClient(this IServiceCollection services, IAppSurfaceGoogleSecretManagerClient client)
Source
Replaces the Google Secret Manager client seam with a specific instance.
servicesThe service collection to configure.clientThe client instance.The original service collection.
Reads Secret Manager version payloads for the AppSurface Google Secret Manager provider.
AppSurfaceGoogleSecretPayload AccessSecretVersion(string resourceName, TimeSpan timeout)
Source
Accesses one Secret Manager version.
resourceNameThe full Secret Manager version resource name.timeoutThe bounded lookup timeout.The secret version payload.
Carries one Google Secret Manager version payload.
DataThe raw payload bytes.ResolvedResourceNameThe resolved Secret Manager version resource name, if available.Record equality compares Data by array reference, not by content, because byte[] does not override equality. Compare payload contents explicitly when byte identity matters.
Classifies Google Secret Manager configuration resolution outcomes.
AppSurface configuration provider that resolves claimed keys from Google Secret Manager.
The provider sits above LocalSecrets and file configuration but below environment variables. Only explicitly mapped or convention-claimed keys are owned by this provider; unclaimed keys fall through. Claimed-key failures are terminal when fail-closed behavior is enabled.
GoogleSecretManagerConfigResolution<T> ResolveValue<T>(string environment, string key)
Source
Resolves a value and returns the structured provider status before config-provider adaptation.
TThe requested configuration value type.environmentThe AppSurface environment being resolved.keyThe logical AppSurface configuration key.The typed Google Secret Manager resolution.
Configures the AppSurface Google Secret Manager provider.
Keys are claimed explicitly by MapSecret or by an opt-in convention resolver. Claimed keys fail closed by default when Google Secret Manager cannot safely return the value. Environment variables still remain the top AppSurface emergency override because DefaultConfigManager checks them before normal providers.
AppSurfaceGoogleSecretManagerOptions AllowLatest()
Source
Allows use of the mutable latest Secret Manager version alias.
The same options instance.
AppSurfaceGoogleSecretManagerOptions MapSecret(string logicalKey, string secretIdOrResourceName, string? version = null)
Source
Maps an AppSurface logical configuration key to a Google Secret Manager secret id or full version resource name.
logicalKeyThe logical AppSurface configuration key, for example Stripe:ApiKey.secretIdOrResourceNameA short secret id or full projects/.../secrets/.../versions/... name.versionThe version or alias for short secret ids. Overrides DefaultVersion.The same options instance.
AppSurfaceGoogleSecretManagerOptions EnableConventionResolver(string logicalKeyPrefix, string secretIdPrefix = "", string? version = null)
Source
Enables a scoped convention resolver for logical keys under logicalKeyPrefix.
logicalKeyPrefixThe required logical-key prefix that the convention may claim.secretIdPrefixAn optional prefix prepended to normalized secret ids.versionThe version or alias used by claimed convention keys.The same options instance.
string? ProjectId { get; set; }
Source
Gets or sets the Google Cloud project id used for short secret ids.
string? DefaultVersion { get; set; }
Source
Gets or sets the default secret version used by mappings that do not specify one.
Keep this unset for production unless every mapping supplies its own version or alias. Set AllowLatestVersion before using latest; mutable latest is an explicit opt-in, not the silent production default.
bool AllowLatestVersion { get; set; }
Source
Gets or sets a value indicating whether the mutable latest version alias is allowed.
bool FailClosedOnProviderFailure { get; set; }
Source
Gets or sets a value indicating whether claimed-key failures should stop lower-priority providers.
TimeSpan LookupTimeout { get; set; }
Source
Gets or sets the bounded timeout for one Secret Manager lookup.
TimeSpan? CacheTtl { get; set; }
Source
Gets or sets the optional in-memory cache duration for successful secret values.
Leave unset for strict read-through behavior. When enabled, rotation is visible after this duration or after the app rebuilds the provider. The provider does not run background refresh.
IReadOnlyList<AppSurfaceGoogleSecretMapping> Mappings { get; }
Source
Gets explicit logical-key to Secret Manager mappings.
IReadOnlyList<AppSurfaceGoogleSecretConvention> Conventions { get; }
Source
Gets opt-in convention resolvers.