vault

package
v1.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

package: vault / secrets type: interface + factory job: the Vault port — a secret reference in, its value out — plus its factory limits: contract + dispatch; secret fetching lives in the backends (-> adapters/vault/openbao, azure)

Package vault defines the secret-resolution port and builds the configured backend. The config loader calls Secret to expand vault(ref) placeholders. It is optional: a stack whose every adapter needs no secret (mem/fs storage, in-memory signer, no auth) configures no vault at all. The vault is built env-only — secret-zero cannot resolve vault() before the vault exists.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vault

type Vault interface {
	// Secret returns the value stored under ref, or an error if it is absent
	// or the vault is unreachable.
	Secret(ctx context.Context, ref string) (string, error)
}

Vault resolves secret references to their plaintext values. Backends: OpenBao KV and Azure Key Vault (-> sub-packages).

func New

func New(ctx context.Context, cfg scope.Section) (Vault, error)

New builds the vault backend named by the section's "type": "openbao" (KV v2) or "azure" (Azure Key Vault, scaffold). An empty or unknown type is an error.

Directories

Path Synopsis
package: azure / secrets type: adapter job: resolve vault(ref) secrets from Azure Key Vault limits: SCAFFOLD — construction only, no fetching yet (-> adapters/vault)
package: azure / secrets type: adapter job: resolve vault(ref) secrets from Azure Key Vault limits: SCAFFOLD — construction only, no fetching yet (-> adapters/vault)
package: openbao / secrets type: adapter job: resolve vault(ref) secrets from an OpenBao KV v2 engine limits: KV v2 reads only; the mount + credentials come from the vault section (-> adapters/vault)
package: openbao / secrets type: adapter job: resolve vault(ref) secrets from an OpenBao KV v2 engine limits: KV v2 reads only; the mount + credentials come from the vault section (-> adapters/vault)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL