Skip to main content

Module secrets

Module secrets 

Source
Expand description

Secret storages on the worker, and the secrets of one attempt (see archive/PROJECT.md, Secret storage).

The agent fetches every secret an attempt names or declares before its process starts (AttemptSecrets::fetch); a secret under a declared prefix is fetched when the task reads it. The master never sees a value. Each fetched value is masked in the task’s log and output (crate::mask).

Structs§

AttemptSecrets
The secrets of one attempt: what was fetched before it started, what it declares, and the values masked in its log and output.
DbStorage
The db storage (standalone): the secrets table of schedr’s own database, each value decrypted under SCHEDR_SECRET_KEY (see schedr_db::secrets).
MemoryStorage
Secrets held in memory: schedr dags test --secret and run_dag(secrets=...) (tests and local runs), never a production storage.
SecretStores
The worker’s secret storages: each by name, the default one, and a cache of what was fetched (in memory only, never on disk).
Storage
One configured storage, with what is said about it.

Enums§

ConnectionError
Why a connection can’t be opened (decision 174): the attempt’s error kind follows.
SecretError
Why a secret can’t be read: the attempt’s error kind follows from it.

Constants§

DEFAULT_CACHE_TTL
The default cache_ttl of a storage: how long a fetched secret is kept in memory.
DEFAULT_MIN_MASK_LENGTH
The default [secret_storage] min_mask_length: shorter values aren’t masked (masking 1 or true would mangle the logs), like Airflow’s min_length_masked_secret.

Traits§

SecretStorage
A kind of secret storage (Vault, the db storage, values in memory).

Type Aliases§

ReadFuture
A future a storage’s read returns.
SecretData
A secret as a storage holds it: its keys and their values (a Vault KV v2 secret).