vault

package
v1.27.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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