Skip to main content

Module secrets

Module secrets 

Source
Expand description

The db secret storage (standalone; see archive/PROJECT.md, Secret storage): one row per secret path, like a Vault KV v2 secret, its data a JSON object of key to value. Each value is encrypted with XChaCha20-Poly1305 under SCHEDR_SECRET_KEY, bound to its path#key (the associated data), so a value can’t be moved to another key or path; paths and key names stay readable, so listing needs no key. A dump, a backup or someone reading the database sees no value.

A stored value is v1: and the base64 of its 24-byte nonce and the ciphertext with its tag.

Structs§

SecretEntry
A secret path and its key names (never the values), for schedr secrets list.
SecretKey
The key secrets are encrypted under: 32 bytes. Its Debug never shows it.

Enums§

SecretsError
Why a secret can’t be written or read.

Constants§

SECRET_KEY_ENV
The environment variable holding the key.