vault

package module
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 18 Imported by: 1

README

Vault, a Go library for encrypted secrets, feature flags and runtime configuration with tenant overrides

Vault: secrets management, feature flags and runtime config for Go

Vault is a Go library for encrypted secrets management, feature flags and hot-reloadable runtime configuration, with per-tenant overrides, secret rotation and an audit log on top. You import it, bring your own database and an AES-256 key, and keep control of your process. It's meant for multi-tenant backends that want all three behind one API, and it plugs into Forge as an extension, or into Confy as a config source.

CI Go Reference GitHub Stars

Documentation · Quick start · Features · Secrets · Feature flags · Runtime config · Forge · FAQ

Quick start

You need Go 1.26 or later.

go get github.com/xraph/vault@latest

Save this as main.go. It stores a secret, turns a flag on for one tenant and reads a config value, all against an in-memory store:

package main

import (
	"context"
	"fmt"
	"log"

	"github.com/xraph/vault"
	"github.com/xraph/vault/flag"
	"github.com/xraph/vault/scope"
	"github.com/xraph/vault/store/memory"
)

func main() {
	// 32 bytes for AES-256-GCM. Load it from a secret manager in production.
	key := []byte("0123456789abcdef0123456789abcdef")

	v, err := vault.New(
		vault.WithStore(memory.New()),
		vault.WithAppID("billing"),
		vault.WithEncryptionKey(key),
	)
	if err != nil {
		log.Fatal(err)
	}

	ctx := scope.WithScope(context.Background(), "billing", "acme", "user-42", "10.0.0.1")

	// Secrets: encrypted at rest, versioned on every Set.
	meta, err := v.Secrets().Set(ctx, "stripe-api-key", []byte("sk_test_123"), "")
	if err != nil {
		log.Fatal(err)
	}
	sec, err := v.Secrets().Get(ctx, "stripe-api-key", "")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("secret v%d = %s\n", meta.Version, sec.Value)

	// Feature flags: define once, then target a tenant.
	_, err = v.FlagManager().Create(ctx, flag.CreateInput{
		Key:          "new-checkout",
		Type:         flag.TypeBool,
		DefaultValue: false,
		Enabled:      true,
	})
	if err != nil {
		log.Fatal(err)
	}
	_, err = v.FlagManager().SetRules(ctx, "new-checkout", []flag.RuleInput{{
		Type:        flag.RuleWhenTenant,
		Config:      flag.RuleConfig{TenantIDs: []string{"acme"}},
		ReturnValue: true,
	}})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println("new-checkout for acme:", v.Flags().Bool(ctx, "new-checkout", false))

	// Runtime config: typed reads with a default.
	if err := v.Config().Set(ctx, "rate-limit", 100, ""); err != nil {
		log.Fatal(err)
	}
	fmt.Println("rate-limit:", v.Config().Int(ctx, "rate-limit", 50))
}

Run it:

go mod tidy
go run .
# secret v1 = sk_test_123
# new-checkout for acme: true
# rate-limit: 100

The empty string you pass as the app ID means "use the one Vault was built with". The tenant and user come from the context you built with scope.WithScope, so you set them once per request (usually in middleware) and every read picks them up.

Leave the key out and vault.New still works, but it stores secrets as given and only says so as a warning on the logger you pass with WithLogger. Name a key with WithEncryptionKeyEnv and the variable is missing or won't decode, and New fails instead. That's deliberate. Naming a key is a statement that you expect encryption, so Vault won't quietly fall back to plaintext.

Why Vault?

Most services end up with three systems for what is really one question: what value should this request see? A secrets store, a feature flag service and a config file each get their own tenant model, their own audit story and their own client. Vault puts them behind one store and one context-based scope. You learn one API.

You need Vault gives you
Secrets encrypted at rest AES-256-GCM encryption, transparent decryption on read, and a new version on every Set
Rotation without a cron job A rotation manager that calls your Rotator per secret key on a schedule, or on demand with RotateNow
Feature flags per tenant bool, string, int, float and json flags with tenant, user, percentage rollout and schedule rules, plus per-tenant overrides
Runtime config Typed config entries with Duration parsing, version history, rollback and Watch callbacks
Tenant isolation App, tenant and user taken from context.Context through the scope package, never passed as arguments
An audit trail Every secret, flag and config write logged with its scope, and secret reads too
Your database PostgreSQL, SQLite and MongoDB through Grove, and an in-memory store
Typed IDs K-sortable UUIDv7 TypeIDs such as sec_... and flag_... that reject the wrong prefix

Secrets

v.Secrets() returns the secret service. Set encrypts the value and archives the previous version; Get decrypts the current one. You can fetch an older version with GetVersion(ctx, key, appID, n), list them with ListVersions, and attach secret.WithMetadata or secret.WithExpiresAt when you set a value.

Rotation lives on v.Rotation(). Register a function that takes the current value and returns the next one:

v.Rotation().RegisterRotator("stripe-api-key", func(ctx context.Context, current []byte) ([]byte, error) {
	return issueNewStripeKey(ctx, current)
})

The manager checks for due rotation policies in a background loop once you call Start (the Forge extension does that for you), and every attempt, failed or not, leaves an audit row. RotateNow(ctx, key, appID) runs one straight away.

Feature flags

You define flags through v.FlagManager() and read them through v.Flags(). Reads never return an error: Bool, String, Int, Float and JSON give you the default you passed when the flag is missing, disabled or the wrong type.

When a flag is evaluated, a per-tenant override wins, then the first matching rule in priority order, then the flag's default value. Rules come from SetRules, in the order you list them:

Rule type Matches Status
flag.RuleWhenTenant Listed tenant IDs Works
flag.RuleWhenUser Listed user IDs Works
flag.RuleRollout A percentage of tenants, bucketed by a stable hash of tenant and flag key Works
flag.RuleSchedule A time window, with a start, an end or both Works
flag.RuleWhenTenantTag Tenants carrying a tag Accepted, but never matches yet
flag.RuleCustom A plugin-evaluated rule Accepted, but never matches yet

Two of those rule types aren't finished, so don't build a launch on them yet. Set a per-tenant value with FlagManager().SetTenantOverride(ctx, key, tenantID, value). The flag engine caches evaluations for 30 seconds by default, and the manager drops the cache entry whenever you change a flag.

Runtime config

v.Config() reads and writes config entries. The typed readers (String, Bool, Int, Float, Duration, JSON) resolve a tenant override first and fall back to the app-level value, then to your default. Watch(key, callback) runs your callback when a value changes through the service.

For the full write path, use v.ConfigManager(). It creates and updates entries with type checks, rolls an entry back to an earlier version with Rollback, and sets per-tenant values with SetOverride(ctx, key, tenantID, value).

The source package gives you config sources for other readers: source.NewMemory(), source.NewEnv(prefix), source.NewDatabase(store, appID), and source.NewChain(...) to try them in priority order.

Storage backends

Every backend implements store.Store, which covers secrets, flags, config, overrides, rotation and audit, plus Migrate, Ping and Close.

Backend Package Constructor
In-memory store/memory memory.New()
PostgreSQL store/postgres postgres.New(db *grove.DB, opts...)
SQLite store/sqlite sqlite.New(db *grove.DB, opts...)
MongoDB store/mongo mongo.New(db *grove.DB, opts...)

Call Migrate(ctx) on a database store before you first use it. The SQLite store leaves its migration executor to you, so import github.com/xraph/grove/drivers/sqlitedriver/sqlitemigrate for its side effect. The stores docs have the details for each backend.

Use it with Forge

The extension package registers Vault as a Forge extension. It reads extensions.vault (or a top-level vault key), finds a store, builds the *vault.Vault, and provides both *vault.Vault and store.Store in the container, so your services resolve them with vessel.Inject[*vault.Vault]. Start launches the rotation loop and a background backfill of version encryption, and Stop cancels both before closing the store.

go get github.com/xraph/vault@latest github.com/xraph/grove/extension@latest
import (
	grove "github.com/xraph/grove/extension"
	vault "github.com/xraph/vault/extension"
)

app := forge.NewApp(forge.AppConfig{
	Name: "billing-api",
	Extensions: []forge.Extension{
		grove.New(), // extensions.grove: driver and dsn
		vault.New(
			vault.WithAppID("billing"),
			vault.WithEncryptionKeyEnv("VAULT_ENCRYPTION_KEY"),
		),
	},
})

The extension looks for a store in this order: WithStore, then the database named by WithGroveDatabase or grove_database, then any *grove.DB already in the container. It picks the PostgreSQL, SQLite or MongoDB store from the Grove driver. With none of those it refuses to start.

One thing to know before you deploy. The extension doesn't run migrations, so disable_migrate currently has no effect, and on a fresh PostgreSQL or SQLite database the tables Vault reads and writes don't exist until something calls Migrate. Create the tables yourself first: build the store, call Migrate(ctx), and pass it in with WithStore. It also mounts no HTTP routes, which makes base_path and disable_routes no-ops too. The Forge dashboard reads Vault through a contract contributor instead; MIGRATION.md describes the React plugin and what moved from the old templ pages.

Traces and metrics

Under Forge you get both for free. Secret reads and writes, rotations and store-backed flag evaluations each get a span under the request that caused them, and the counters scrape from /_/metrics as forge_vault_*: secret operations, encrypt and decrypt calls, flag evaluations by cache or store, rotation attempts with a duration histogram, and config source polls. Outside Forge, pass a github.com/xraph/go-utils/metrics sink with vault.WithMetrics.

No span or label ever carries a secret value, a secret name, a flag key or a tenant. The observability docs list every span, attribute, metric and label value.

Configuration

extensions:
  vault:
    app_id: billing
    encryption_key_env: VAULT_ENCRYPTION_KEY   # hex or base64, 32 bytes once decoded
    flag_cache_ttl: 30s
    source_poll_interval: 30s
    grove_database: primary                    # optional; default *grove.DB otherwise
    mount_to_confy: true                       # expose vault keys through Forge's config manager
    confy_key_prefix: "vault."
    confy_mount_patterns: ["db.*", "auth.*"]
Key Option Default
app_id WithAppID(id) empty
encryption_key_env WithEncryptionKeyEnv(name) empty, so secrets are stored unencrypted
flag_cache_ttl WithConfig(cfg) with cfg.FlagCacheTTL 30s
source_poll_interval WithConfig(cfg) with cfg.SourcePollInterval; only used by the confy source when mount_to_confy is on 30s
grove_database WithGroveDatabase(name) default *grove.DB
mount_to_confy WithMountToConfy() false
confy_key_prefix WithConfyKeyPrefix(prefix) empty
confy_mount_keys WithConfyMountKeys(keys...) all keys
confy_mount_patterns WithConfyMountPatterns(globs...) all keys

WithStore, WithConfig and WithRequireConfig round it out. Neither TTL has an option of its own, so set them in the config file or start from DefaultConfig() in code:

import (
	"time"

	vaultext "github.com/xraph/vault/extension"
	"github.com/xraph/vault/store/memory"
)

cfg := vaultext.DefaultConfig()
cfg.FlagCacheTTL = 5 * time.Minute

vaultext.New(
	vaultext.WithConfig(cfg),
	vaultext.WithStore(memory.New()),
)

WithConfig replaces the whole extension config, so put it before WithAppID and the other options that write into it. WithVaultOption passes a root vault.Option straight through, such as vault.WithLogger. Don't use it for vault.WithConfig, though: the extension appends its own vault.WithConfig, built from the table above, after your options, so WithVaultOption(vault.WithConfig(vault.Config{FlagCacheTTL: 5 * time.Minute})) still leaves you with 30s. enable_audit still loads but does nothing, because audit logging is always on.

Outside Forge, the same settings are vault.WithAppID, vault.WithEncryptionKey, vault.WithEncryptionKeyEnv, vault.WithLogger and vault.WithConfig on vault.New.

Confy integration

If you load config with Confy, the confy package adapts Vault into a ConfigSource (NewVaultConfigSource) and a SecretProvider (NewVaultSecretProvider), so a single Confy load returns your Vault-managed config and secrets next to your files and environment. Under Forge, mount_to_confy: true does that wiring for you. See the Confy integration guide.

Documentation

Topic Where
Getting started Getting started, architecture, full example
Subsystems Secrets, feature flags, runtime config, overrides, rotation, encryption, audit
Tenancy Multi-tenancy, multi-tenant patterns
Storage PostgreSQL, SQLite, MongoDB, memory, custom store
Integrations Forge extension, Confy

The Go API is on pkg.go.dev.

FAQ

How do I store encrypted secrets in a Go application?

Create a Vault with a store and a 32-byte key (WithEncryptionKey, or WithEncryptionKeyEnv to read it from the environment), then call v.Secrets().Set. Values are encrypted with AES-256-GCM before they reach the database and decrypted when you Get them.

Can Vault roll out a feature flag to a percentage of tenants?

Yes. A flag.RuleRollout rule with a percentage matches a stable slice of tenants, hashed on tenant ID and flag key, so a tenant stays in or out of the rollout across requests and restarts.

How do I rotate secrets automatically in Go?

Register a Rotator for the secret key on v.Rotation() and start the rotation manager. Each rotation writes a new version of the secret and an audit row.

Can I use Vault without Forge?

Yes. vault.New and the stores are plain Go. The extension package is only there for Forge apps.

No. This Vault is a Go library that runs inside your service against your own database. There's no server to deploy.

Contributing

Issues and focused pull requests are welcome on GitHub.

git clone https://github.com/xraph/vault.git
cd vault
GOWORK=off go build ./...
make test
make check   # fmt, vet and lint

A plain test run covers the memory and SQLite stores. The PostgreSQL tests need -tags integration and VAULT_TEST_PG_URL, and the MongoDB tests need VAULT_TEST_MONGO_URL; without them they skip, and CI sets neither. Point them at throwaway databases, because the Postgres suite deletes from every vault_* table. AGENTS.md has the full commands, the lint rules that bite and the release steps. Commits follow Conventional Commits.

License

MIT. See LICENSE.

Vault is part of the Forge forgery stack, built by Rex Raphael and contributors.

Documentation

Overview

Package vault provides composable secrets management, feature flags, and runtime configuration for Go applications.

Vault unifies three capabilities behind a single API surface:

  • Secrets: Encrypted key-value storage with versioning and rotation
  • Feature Flags: Boolean/string/int/float toggles with targeting rules
  • Runtime Config: Hot-reloadable settings with per-tenant overrides

All entity IDs use TypeID (go.jetify.com/typeid) via a single id.ID struct with dynamic prefixes, consistent with Chronicle and the broader Forge ecosystem.

Usage:

v, err := vault.New(
    vault.WithStore(memoryStore),
    vault.WithEncryptionKey(key),
)
if err != nil { ... }

// Secrets
// An empty appID uses the one configured with WithAppID.
secret, err := v.Secrets().Get(ctx, "openai_api_key", "")

// Feature flags
enabled := v.Flags().Bool(ctx, "new_dashboard", false)

// Runtime config
limit := v.Config().Int(ctx, "rate_limit", 100)

Index

Constants

This section is empty.

Variables

View Source
var (
	// Store errors.
	ErrNoStore = core.ErrNoStore

	// Key/entity not found errors.
	ErrKeyNotFound      = core.ErrKeyNotFound
	ErrSecretNotFound   = core.ErrSecretNotFound
	ErrFlagNotFound     = core.ErrFlagNotFound
	ErrConfigNotFound   = core.ErrConfigNotFound
	ErrOverrideNotFound = core.ErrOverrideNotFound
	ErrRotationNotFound = core.ErrRotationNotFound
	ErrAuditNotFound    = core.ErrAuditNotFound
	ErrRunNotFound      = core.ErrRunNotFound
	ErrDLQNotFound      = core.ErrDLQNotFound
	ErrCronNotFound     = core.ErrCronNotFound
	ErrEventNotFound    = core.ErrEventNotFound
	ErrWorkflowNotFound = core.ErrWorkflowNotFound

	// Crypto errors.
	ErrDecryptionFailed = core.ErrDecryptionFailed
	ErrEncryptionFailed = core.ErrEncryptionFailed
	ErrInvalidKey       = core.ErrInvalidKey

	// Feature flag errors.
	ErrFlagDisabled   = core.ErrFlagDisabled
	ErrFlagExists     = core.ErrFlagExists
	ErrInvalidFlagKey = core.ErrInvalidFlagKey

	// Rotation errors.
	ErrRotationFailed = core.ErrRotationFailed

	// Auth errors.
	ErrUnauthorized = core.ErrUnauthorized

	// Secret errors.
	ErrSecretExists = core.ErrSecretExists

	// Config errors.
	ErrConfigExists = core.ErrConfigExists

	// ErrConfigVersionNotFound is returned when a config entry has no
	// version with the requested number.
	ErrConfigVersionNotFound = core.ErrConfigVersionNotFound
)

Sentinel errors for Vault operations.

These are the same values as their core counterparts, not copies, so errors.Is keeps matching for every caller that wrapped one.

Functions

This section is empty.

Types

type Config

type Config struct {
	// AppID is the application identifier used for scoping secrets, flags, and config.
	AppID string `json:"app_id" yaml:"app_id"`

	// EncryptionKey is the master encryption key (32 bytes for AES-256-GCM).
	// If empty, encryption is disabled (not recommended for production).
	EncryptionKey []byte `json:"-" yaml:"-"`

	// EncryptionKeyEnv names an environment variable to read the encryption
	// key from when EncryptionKey is not set directly. This is not a
	// fallback that degrades to plaintext: naming the variable is a
	// statement of intent, so if it is set, its value must decode to a
	// valid key or New fails. It is the empty EncryptionKeyEnv (alongside
	// an empty EncryptionKey) that means no key was configured at all and
	// secrets are stored as given.
	EncryptionKeyEnv string `json:"encryption_key_env" yaml:"encryption_key_env"`

	// FlagCacheTTL is the TTL for the flag evaluation cache.
	// Defaults to 30 seconds.
	FlagCacheTTL time.Duration `json:"flag_cache_ttl" yaml:"flag_cache_ttl"`

	// SourcePollInterval is the interval for polling database sources.
	// Defaults to 30 seconds.
	SourcePollInterval time.Duration `json:"source_poll_interval" yaml:"source_poll_interval"`
}

Config holds the configuration for a Vault instance.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns a Config with sensible defaults.

type Entity

type Entity = core.Entity

Entity is the base type embedded by all Vault entities.

This is a type alias, not a defined type: callers embed vault.Entity and pass it where core.Entity is expected, and both must keep working.

func NewEntity

func NewEntity() Entity

NewEntity creates a new Entity with both timestamps set to now (UTC).

type ID

type ID = id.ID

ID is the primary identifier type for all Vault entities.

type Option

type Option func(*Vault)

Option configures a Vault instance.

func WithAppID

func WithAppID(appID string) Option

WithAppID sets the application identifier used for scoping.

func WithConfig

func WithConfig(cfg Config) Option

WithConfig overlays the given Config onto the Vault's current configuration. A non-zero field in cfg overrides the current value; a zero-valued field leaves whatever an earlier option (or DefaultConfig) already set. It does not replace the whole Config wholesale, so it is safe to combine with WithAppID, WithEncryptionKey, and friends in any order without one silently erasing the other.

func WithEncryptionKey

func WithEncryptionKey(key []byte) Option

WithEncryptionKey sets the master encryption key (32 bytes for AES-256-GCM).

func WithEncryptionKeyEnv

func WithEncryptionKeyEnv(envVar string) Option

WithEncryptionKeyEnv sets the environment variable name for the encryption key.

func WithLogger

func WithLogger(l log.Logger) Option

WithLogger sets the structured logger.

func WithMetrics

func WithMetrics(m gometrics.Metrics) Option

WithMetrics records vault's metrics on m: secret operations, encrypt and decrypt calls, flag evaluations, and rotation attempts with their duration. In a Forge app pass app.Metrics(); vault's Forge extension does this for you. A nil m, the default, records nothing. Spans need no option: vault starts them on the global tracer provider, which forge.New installs.

func WithStore

func WithStore(s store.Store) Option

WithStore sets the store backend. Required: New cannot compose the subsystem services without one.

type Prefix

type Prefix = id.Prefix

Prefix identifies the entity type encoded in a TypeID.

type Vault

type Vault struct {
	// contains filtered or unexported fields
}

Vault is the central type. It composes one store into the six subsystem services, wires the audit logger into secret mutations, and hands the whole thing out through accessors.

func New

func New(opts ...Option) (*Vault, error)

New creates a Vault from a store and options.

An absent encryption key is not an error: secrets fall back to being stored as given, which is the documented behaviour for development. A key that is present but cannot be decoded IS an error, because silently falling back there would store secrets in the clear while the caller believes they are encrypted. The same holds for a named key env var that is missing or empty: naming the variable is a statement of intent, so New refuses to start rather than writing plaintext the caller thinks is encrypted.

func (*Vault) AppID

func (v *Vault) AppID() string

AppID returns the vault's configured application id. Every contract handler operates on this app and this app alone; no request carries an app id of its own.

func (*Vault) Audit

func (v *Vault) Audit() *audit.Logger

Audit returns the audit logger.

func (*Vault) Config

func (v *Vault) Config() *config.Service

Config returns the runtime config service.

func (*Vault) ConfigManager

func (v *Vault) ConfigManager() *configmgr.Manager

ConfigManager returns the config write service: the one path that creates, changes, rolls back and deletes config entries and their tenant overrides with validation, cache invalidation, watchers and audit.

func (*Vault) EncryptionAlgorithm

func (v *Vault) EncryptionAlgorithm() string

EncryptionAlgorithm names the algorithm this vault encrypts new secrets with, the same string a stored secret carries in its EncryptionAlg, or "" when no key is configured. Like EncryptionEnabled it describes new writes only, not the rows already stored.

func (*Vault) EncryptionEnabled

func (v *Vault) EncryptionEnabled() bool

EncryptionEnabled reports whether secrets are encrypted at rest. False means a key was not configured and values are stored as given.

func (*Vault) FlagCacheTTL

func (v *Vault) FlagCacheTTL() time.Duration

FlagCacheTTL returns how long the flag engine keeps an evaluation in its cache. A flag write invalidates it in this process at once; another replica serves the old value for up to this long.

func (*Vault) FlagEngine

func (v *Vault) FlagEngine() *flag.Engine

FlagEngine returns the underlying flag engine, which is what a caller needs for EvaluateDetail. Flags() covers the typed read path.

func (*Vault) FlagManager

func (v *Vault) FlagManager() *flag.Manager

FlagManager returns the flag write service: the one path that creates, changes and deletes flags with validation, cache invalidation and audit.

func (*Vault) Flags

func (v *Vault) Flags() *flag.Service

Flags returns the type-safe flag evaluation service.

func (*Vault) Health

func (v *Vault) Health(ctx context.Context) error

Health checks the health of the Vault by pinging its store.

func (*Vault) Overrides

func (v *Vault) Overrides() *override.Resolver

Overrides returns the per-tenant config resolver.

func (*Vault) Rotation

func (v *Vault) Rotation() *rotation.Manager

Rotation returns the rotation manager.

func (*Vault) Secrets

func (v *Vault) Secrets() *secret.Service

Secrets returns the secret service.

func (*Vault) Store

func (v *Vault) Store() store.Store

Store returns the configured store backend.

Directories

Path Synopsis
Package audit provides audit log entries and store interface.
Package audit provides audit log entries and store interface.
Package audithook provides an audit event recording extension for Vault.
Package audithook provides an audit event recording extension for Vault.
Package config provides runtime configuration entries and store interface.
Package config provides runtime configuration entries and store interface.
Package configmgr is the write service for runtime config entries and their per-tenant overrides.
Package configmgr is the write service for runtime config entries and their per-tenant overrides.
Package confy provides confy ConfigSource and SecretProvider adapters backed by vault's config and secret stores.
Package confy provides confy ConfigSource and SecretProvider adapters backed by vault's config and secret stores.
Package core holds the types every Vault subsystem needs and that none of them may reach the root package for.
Package core holds the types every Vault subsystem needs and that none of them may reach the root package for.
Package crypto provides AES-256-GCM encryption for Vault secrets.
Package crypto provides AES-256-GCM encryption for Vault secrets.
Package extension provides the Forge extension adapter for Vault.
Package extension provides the Forge extension adapter for Vault.
contract
Package contract wires Vault into the Forge dashboard's contract path.
Package contract wires Vault into the Forge dashboard's contract path.
Package flag provides feature flag definitions, targeting rules, and evaluation.
Package flag provides feature flag definitions, targeting rules, and evaluation.
Package id defines TypeID-based identity types for all Vault entities.
Package id defines TypeID-based identity types for all Vault entities.
internal
storetest
Package storetest holds store conformance tests shared by every backend, so the memory, SQLite, Postgres and MongoDB stores are held to one behavior.
Package storetest holds store conformance tests shared by every backend, so the memory, SQLite, Postgres and MongoDB stores are held to one behavior.
telemetry
Package telemetry is vault's tracing and metrics plumbing: the instrumentation scope on every vault span, a way to mark a span failed that never copies error text, and label vectors over a go-utils metrics sink.
Package telemetry is vault's tracing and metrics plumbing: the instrumentation scope on every vault span, a way to mark a span failed that never copies error text, and label vectors over a go-utils metrics sink.
telemetrytest
Package telemetrytest records what vault's telemetry emits so tests can assert on it: spans through a tracetest.SpanRecorder installed as the global tracer provider, and metrics through a go-utils sink that remembers every series it handed out.
Package telemetrytest records what vault's telemetry emits so tests can assert on it: spans through a tracetest.SpanRecorder installed as the global tracer provider, and metrics through a go-utils sink that remembers every series it handed out.
Package metrics provides interfaces and a collector for Vault operational metrics.
Package metrics provides interfaces and a collector for Vault operational metrics.
Package override provides per-tenant config override entities and store interface.
Package override provides per-tenant config override entities and store interface.
Package plugin provides the plugin system for extending Vault functionality.
Package plugin provides the plugin system for extending Vault functionality.
Package rotation provides secret rotation policy entities and store interface.
Package rotation provides secret rotation policy entities and store interface.
Package scope provides context-based request scoping for Vault operations.
Package scope provides context-based request scoping for Vault operations.
Package secret provides the secret entity types and store interface.
Package secret provides the secret entity types and store interface.
Package source provides a composable configuration source system.
Package source provides a composable configuration source system.
Package store defines the composite store interface that all backends implement.
Package store defines the composite store interface that all backends implement.
memory
Package memory provides a fully in-memory implementation of store.Store.
Package memory provides a fully in-memory implementation of store.Store.
mongo
Package mongo provides a Grove ORM MongoDB implementation of all Vault store interfaces.
Package mongo provides a Grove ORM MongoDB implementation of all Vault store interfaces.
postgres
Package postgres provides a Grove ORM implementation of all Vault store interfaces.
Package postgres provides a Grove ORM implementation of all Vault store interfaces.
sqlite
Package sqlite provides a Grove ORM SQLite implementation of all Vault store interfaces.
Package sqlite provides a Grove ORM SQLite implementation of all Vault store interfaces.

Jump to

Keyboard shortcuts

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