Introducing a new way to review your PRs.

Read the announcement

jdx / fnox

encrypted/remote secret manager

View on GitHub

27 documents · Updated Nov 23, 2026

docs / cloud-and-vault-providers

Cloud and vault secret providers

Cloud and vault providers connect fnox to network-backed secret stores and key services. They let a secret remain in a managed service or use a cloud key to protect local ciphertext while fnox presents the same provider contract to the rest of the system. See Secret provider integrations for the provider model and Local and hardware secret providers for non-network-backed sources.

Provider roles

Each provider exposes a common way to read a value and may also store values or encrypt them. The provider metadata groups the services by their main role so users can choose between remote storage, read-only lookup, and encryption without needing to know the service client details.

RoleProvidersEffect on stored configuration
Remote storageAWS Secrets Manager, AWS Parameter Store, Azure Key Vault secrets, GCP Secret Manager, HashiCorp Vault, Bitwarden Secrets Manager, FOKSConfiguration keeps a provider reference. The value lives in the remote store.
Remote readAzure App Configuration, Bitwarden, Infisical, Doppler, Proton Pass, Keeper Secrets Manager, PasswordstateConfiguration points to an existing remote value. The provider does not write a new value through the common store operation.
Cloud encryptionAWS KMS, Azure Key Vault keys, GCP KMSConfiguration keeps encrypted text. The service key encrypts and decrypts the value.

The same service family can provide different roles. For example, AWS Secrets Manager and Parameter Store store values remotely, while AWS KMS protects values that remain in fnox configuration. This distinction controls which provider operations are available and how a value is represented after a write. References: crates/…/mod.rs• L44-53, crates/…/mod.rs• L171-241, crates/…/aws-sm.toml• L1-8, crates/…/aws-kms.toml• L1-8

Shared resolution

Provider resolution turns a configured provider into a usable provider instance before fnox reads a secret. A provider field can be a literal or a named secret reference, so credentials and other connection data can come from another provider or from the environment.

When fnox resolves a provider-backed reference, it follows this sequence:

  1. Select the provider from the active profile.
  2. Resolve the provider configuration and any secret references inside it.
  3. Create the provider with the resolved values.
  4. Ask the provider for the requested value.

The resolver tracks the active provider path. If one provider depends on itself through another provider, fnox stops with a cycle error instead of recursing without end. A missing provider also produces a focused error with available-name suggestions. Profile inheritance errors now propagate through provider and secret lookup instead of being treated as an empty provider or secret set. Non-interactive use rejects providers that need interactive authentication before the remote call starts.

This diagram shows how a consumer request becomes a remote value or an early configuration error.

flowchart TD
    A[Secret request] --> B[Active profile lookup]
    B --> C[Provider configuration]
    C --> D{Literal or secret reference?}
    D -->|Literal| E[Resolved provider]
    D -->|Secret reference| F[Resolve referenced secret]
    F --> G{Cycle, missing provider, or profile error?}
    G -->|Yes| H[Structured configuration error]
    G -->|No| E
    E --> I[Provider read, store, or decrypt]
    I --> J[Secret value]

Provider configuration values support literal strings and { secret = "NAME" } references. A provider secret reference uses { provider = "NAME", value = "REMOTE-REFERENCE" }; the resolver uses the provider name to select the implementation and the value to select the remote item. References: crates/…/secret_ref.rs• L21-32, crates/…/secret_ref.rs• L233-247, crates/…/resolver.rs• L66-125, crates/…/resolver.rs• L168-235, crates/…/resolver.rs• L237-319

Cloud service providers

The cloud providers use native cloud identity and service APIs to connect fnox to managed stores. Each service accepts a service-specific location or resource name and can add a prefix so one provider can map local secret names into a shared namespace.

AWS services

AWS integrations cover secret storage, parameter storage, and key-based encryption. Secrets Manager and Parameter Store map a local key to a remote name and support remote writes. KMS maps a configured key to encrypted text and supports encryption and decryption rather than remote secret storage.

The AWS services share region selection, optional profile selection, optional IAM role assumption, and optional custom endpoints. The shared identity path first loads the selected AWS credentials and then can replace them with credentials from the configured role. This gives the three AWS providers the same identity model while keeping their service roles separate.

ProviderMain resourceMain behavior
AWS Secrets ManagerSecret nameRead or create/update string secrets.
AWS Parameter StoreParameter nameRead or create/update SecureString parameters.
AWS KMSKMS key ID or aliasEncrypt and decrypt base64-encoded ciphertext.

Batch reads use service-aware grouping where the cloud API supports it. A failed client setup or request is mapped to an authentication, missing-resource, API, or invalid-response error so callers can act on the failure class. References: crates/…/aws_shared.rs• L5-47, crates/…/aws_sm.rs• L147-217, crates/…/aws_sm.rs• L256-271, crates/…/aws_sm.rs• L446-465, crates/…/aws_ps.rs• L119-192, crates/…/aws_ps.rs• L324-339, crates/…/aws_ps.rs• L391-410, crates/…/aws_kms.rs• L120-205, crates/…/aws_kms.rs• L209-246

Azure services

Azure integrations cover Key Vault secrets, Key Vault keys, and App Configuration key-values. Key Vault secrets support remote reads and writes. Key Vault keys support encryption and decryption. App Configuration reads a key-value by key and optional label and remains read-only.

Azure authentication uses the developer credential chain. App Configuration validates that the endpoint is an HTTPS App Configuration store and selects the matching cloud audience before it requests a token. This protects the token from being sent to an unrelated endpoint.

ProviderMain resourceMain behavior
Azure Key Vault secretsVault URL and secret nameRead or set secret values.
Azure Key Vault KMSVault URL and key nameEncrypt and decrypt ciphertext with the vault key.
Azure App ConfigurationStore endpoint, key, and optional labelRead a labeled or unlabeled key-value.

References: crates/…/azure_sm.rs• L12-26 crates/…/azure_sm.rs• L52-104 crates/…/azure_sm.rs• L154-209 crates/…/azure_kms.rs• L15-46 crates/…/azure_kms.rs• L49-138 crates/…/azure_kms.rs• L142-220 crates/…/azure_ac.rs• L12-35 crates/…/azure_ac.rs• L73-99 crates/…/azure_ac.rs• L177-258

GCP services

GCP integrations connect a project to Secret Manager or Cloud KMS. Secret Manager reads the latest version of a named secret and can create a secret before adding a new version when fnox stores a value. Cloud KMS encrypts and decrypts text through a configured project, location, key ring, and key.

Secret Manager can resolve many values with bounded parallel work. Cloud KMS uses the configured crypto key for each operation and stores the result as base64 text. Both services classify missing resources and permission failures so a caller can distinguish access problems from a bad secret name.

References: crates/…/gcp_sm.rs• L20-93 crates/…/gcp_sm.rs• L95-152 crates/…/gcp_sm.rs• L230-305 crates/…/gcp_kms.rs• L12-57 crates/…/gcp_kms.rs• L59-115 crates/…/gcp_kms.rs• L119-165

Vault and network-backed stores

The other network-backed providers connect fnox to hosted secret products, enterprise password stores, or self-hosted services. Some use a vendor CLI as the service boundary. Others use a REST API or SDK. Their common purpose is to turn a provider-specific item reference into one secret value without exposing the vendor model to downstream consumers.

HashiCorp Vault

HashiCorp Vault stores values in a KV secret path and supports an optional address, namespace, path, and token source. A reference with no field selects value; a secret/field reference selects a named field. Writes preserve other fields when a field-specific reference updates an existing KV entry.

Vault can obtain its address, token, and namespace from provider settings or environment values. It can also run a credential command when no token is set. The provider uses the Vault CLI for status, reads, and writes, so the CLI and its authentication context are part of the provider boundary. References: crates/…/vault.rs• L12-27, crates/…/vault.rs• L85-149, crates/…/vault.rs• L152-198, crates/…/vault.rs• L302-412, crates/…/vault.rs• L415-442

Password managers and secret platforms

Password managers and secret platforms expose their own item, field, project, environment, or vault models. fnox keeps these models in the value reference while using the same provider read operation. Most are read-only, while Bitwarden Secrets Manager is also a remote storage provider.

ProviderReference scopeAccess boundary
BitwardenItem and field. Supports bw or rbw.Bitwarden CLI session.
Bitwarden Secrets ManagerProject secret key and selected field.bws CLI and project access token.
InfisicalSecret key in a project, environment, and path.Infisical CLI and token or client credentials.
DopplerSecret name in a project and config.Doppler CLI and login or service token.
Proton PassVault, item, and field. Supports item IDs and pass:// references.Proton Pass CLI session or token.
Keeper Secrets ManagerKeeper notation for a record and field.Keeper SDK configuration and client token.
PasswordstatePassword ID or title and a selected entry field.Passwordstate REST API, list ID, and API key.

Bitwarden reads standard fields such as password, username, URI, notes, and TOTP. Custom fields are read from the item data. Bitwarden Secrets Manager and Infisical can reduce many lookups to one listing or batch command, while Doppler returns a JSON map for multi-secret reads.

Infisical can use a direct token or obtain and cache a token from client credentials. Doppler can use a configured project and config or rely on its CLI context. Proton Pass converts short item references to full vault references and supports an audit reason for agent access. Keeper supports a file-backed configuration and a one-time token bootstrap. Passwordstate can find an entry by numeric ID or by exact title and then return a supported field.

References: crates/…/bitwarden.rs• L9-60 crates/…/bitwarden.rs• L317-355 crates/…/bitwarden_sm.rs• L13-45 crates/…/bitwarden_sm.rs• L145-184 crates/…/bitwarden_sm.rs• L232-267 crates/…/infisical.rs• L11-27 crates/…/infisical.rs• L30-139 crates/…/infisical.rs• L208-295 crates/…/doppler.rs• L10-50 crates/…/doppler.rs• L109-197 crates/…/proton_pass.rs• L37-147 crates/…/proton_pass.rs• L305-367 crates/…/keeper_sm.rs• L31-71 crates/…/keeper_sm.rs• L275-337 crates/…/passwordstate.rs• L36-105 crates/…/passwordstate.rs• L268-351

FOKS

FOKS provides an end-to-end encrypted and self-hostable key-value store through its agent and CLI. fnox maps each key into an absolute KV path and can add a path prefix or select a team. Normal use relies on the running FOKS agent; a configured bot token and host can enable one automatic login retry after an authentication failure.

FOKS supports remote reads and writes. Its connection check lists the root path without requiring a particular key, while missing keys and agent or key-material problems remain distinct failure classes. References: crates/…/foks.rs• L10-20, crates/…/foks.rs• L53-75, crates/…/foks.rs• L171-185, crates/…/foks.rs• L358-408, crates/…/foks.toml• L1-45

Connection and batch behavior

Every provider can test whether its configured service is usable. A connection test checks the service boundary and access path rather than proving that every configured secret exists. This helps separate setup faults from a later missing-secret error.

HTTP-backed providers use one shared client policy for requests. The default request timeout is 30 seconds. FNOX_HTTP_TIMEOUT can set another duration, while 0 disables the timeout; an invalid duration returns to the 30-second default. This applies to provider requests such as Azure App Configuration and other shared HTTP clients.

Batch resolution returns one result per requested local key. Providers use a native batch or listing operation when that improves efficiency; providers without one use bounded parallel reads. A batch failure is mapped back to each requested key so one remote failure does not erase the identity of the affected lookup.

The provider contract uses these outcomes:

  • RemoteStorage providers can read and store remote values.
  • RemoteRead providers can read existing values but do not store through the shared write operation.
  • Encryption providers encrypt before configuration storage and decrypt when fnox resolves the value.
  • Missing secrets, authentication failures, API failures, invalid responses, and missing provider CLIs remain distinct error categories.

References: crates/…/mod.rs• L171-241 crates/…/mod.rs• L243-268 crates/…/resolver.rs• L191-234 crates/…/bitwarden_sm.rs• L186-230 crates/…/keeper_sm.rs• L293-326 crates/…/http.rs• L3-22 crates/…/settings.rs• L109-122

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep each provider metadata definition aligned with its provider type name, capability, wizard category, and generated configuration shape.
  • Keep provider-specific secret reference syntax aligned with the lookup and write paths. A change to item, field, path, label, or key mapping can silently change existing configuration meaning.
  • Keep credential fallback names aligned with the environment dependency list and with the proxy or daemon environment pass-through rules.
  • Keep batch result mapping aligned with local secret names when a remote response uses a different name, ID, or ARN.
  • Keep cloud identity changes aligned across the shared AWS loader and all AWS service clients, including custom endpoint and role-assumption behavior.
  • Keep interactive-auth metadata aligned with resolver rejection rules so CI does not try to start an interactive provider.
  • Keep profile inheritance errors visible through every provider and secret lookup path. Do not turn a failed active-profile merge into an empty provider or secret map.
  • Keep FNOX_HTTP_TIMEOUT parsing aligned with all HTTP-backed provider calls. Preserve the meanings of the 30-second fallback and 0 as no timeout.

Important failure modes

TriggerConsequenceGuard
A provider field references an unknown providerProvider creation stops before the remote request.Resolver lookup with name suggestions.
Provider configurations refer to each other in a cycleResolution stops with a provider-cycle error.Resolution path tracking.
Active profiles contain an inheritance cycle or another merge errorProvider or secret lookup stops with the profile error instead of using incomplete data.Profile lookup errors propagate through the resolver.
A remote service rejects credentials or permissionsThe lookup returns an authentication failure instead of a missing-secret result.Provider-specific error classification.
A required CLI is not installedCLI-backed providers cannot read or test the service.Explicit missing-CLI errors with install hints.
AWS role ARN or Azure App Configuration endpoint is invalidClient setup stops before credentials are sent to the wrong target.Resource and endpoint validation.
A remote response has no usable value or expected shapefnox rejects the response instead of returning a false secret.Invalid-response checks.
An interactive provider runs in non-interactive modeSecret resolution fails before a prompt can block the process.Resolver interactive-auth check.
An HTTP service is slow or unreachableThe request ends at the configured timeout instead of waiting forever.Shared HTTP timeout, with a 30-second default.
FNOX_HTTP_TIMEOUT=0 is used without a reachable serviceThe request has no client timeout and can wait indefinitely.Use 0 only when indefinite waits are intended.

Key files

FileWhy to read it
crates/…/mod.rsDefines the provider contract, capabilities, batch behavior, and provider construction boundary.
crates/…/resolver.rsShows recursive provider configuration resolution, profile lookup, cycle detection, profile-error propagation, and non-interactive checks.
crates/…/secret_ref.rsDefines the literal, secret-name, and provider-backed reference forms used by provider settings.
crates/…/aws_shared.rsShows the shared AWS credential, profile, role, region, and endpoint model.
crates/…/aws_sm.rsIllustrates remote secret storage and service-aware batch retrieval.
crates/…/azure_ac.rsIllustrates read-only cloud key-value access with endpoint and token audience checks.
crates/…/gcp_sm.rsIllustrates project-scoped secret storage and latest-version reads.
crates/…/vault.rsIllustrates KV paths, field references, CLI authentication, and remote writes.
crates/…/infisical.rsIllustrates CLI token acquisition, token caching, and batch secret lookup.
crates/…/proton_pass.rsIllustrates vendor URI normalization, item ID references, and audited agent access.
crates/…/keeper_sm.rsIllustrates SDK-backed configuration bootstrap and notation-based reads.
crates/…/passwordstate.rsIllustrates REST lookup by ID or title and field extraction.
crates/…/foks.rsIllustrates self-hostable KV access, agent auth, and bot-token retry behavior.
crates/…/http.rsDefines the shared HTTP client and timeout behavior used by network-backed calls.
crates/…/settings.rsDefines the user-facing HTTP timeout setting and its environment override.
crates/…/*.tomlDefines provider names, capabilities, categories, setup guidance, and user-facing fields.