Design Principles
SecretSpec defines and resolves an application’s secret contract. These principles guide changes to the manifest, resolver, CLI, SDKs, and integrations.
Keep the application contract portable
Section titled “Keep the application contract portable”Declare the names, types, requirements, and derivations a consumer depends on. Keep provider aliases and native references in configuration so applications can use the same contract with a developer keyring, CI environment variables, or a production vault. When a feature introduces a provider-specific setting, describe how it fits into the application’s portable configuration.
See Declarative configuration and the division of responsibility.
Give each value a clear origin
Section titled “Give each value a clear origin”Stored values resolve through the configured provider and fallback order. Composed values come from their declared inputs and template. A cache or exported artifact holds a copy. For any feature that creates a copy, define how it is refreshed, when it is considered stale, and who owns its cleanup. Keep precedence predictable when multiple sources can supply a value.
See Provider fallback, Composed secrets, and Provider caching.
Keep scope independent of storage and delivery
Section titled “Keep scope independent of storage and delivery”A profile determines how secrets resolve for an environment. A scope limits what a consumer receives. Changing the scope preserves a secret’s storage address. Resolution may read dependencies outside the scope to produce an in-scope value. Expose only the selected outputs to the consumer, whether delivery uses an environment, files, stdout, or an SDK response.
Make the effects of each operation clear
Section titled “Make the effects of each operation clear”Describe when an operation resolves values, provisions missing values, updates storage, or delivers values to a consumer. For example, a value-free report describes resolution without minting secrets. An explicit generation policy can provision a missing value during resolution. A write should have an identifiable destination and defined behavior when it fails or is retried. Keep secret values out of audit records and diagnostic output.
See Resolution reports, Generation, and Audit.
Promise what the provider can support
Section titled “Promise what the provider can support”Providers interpret native addresses and enforce their own authorization, storage, and lifecycle guarantees. SecretSpec features should state which capabilities they require and what happens when those capabilities are unavailable. Distinguish a confirmed absence from a failed read. A feature that promises an atomic update, an encrypted write, or a verified readback needs a provider operation that can uphold that promise.
See Adding a provider and the provider comparison.
Share resolution semantics across clients
Section titled “Share resolution semantics across clients”The CLI and SDKs share a resolver. Given equivalent resolution options, they should agree on profiles, scopes, provider precedence, composition, and missing-value policies. Put new resolution rules in the shared core and describe any additional effects of the operation exposing those rules.