Class: FileSecretStore
Defined in: packages/secrets/src/file-store.ts:34
Reads <root>/<segment>/<segment>[/...], two to four segments, which is how Compose mounts secrets.
One trailing newline is removed, because the generators and editors add one and no credential here ends in one. Nothing else is trimmed: leading or trailing spaces are part of the value.
Does not cache: a rotated file is picked up by the next resolve. Does not follow a link out of the root: symlinks inside it are fine, because Kubernetes mounts secrets that way.
Implements
Constructors
Constructor
new FileSecretStore(
root?):FileSecretStore
Defined in: packages/secrets/src/file-store.ts:40
Parameters
root?
string = DEFAULT_SECRETS_ROOT
Directory holding <namespace>/<name> files.
Returns
FileSecretStore
Properties
driver
readonlydriver:"file"='file'
Defined in: packages/secrets/src/file-store.ts:35
The driver's name, as it appears in configuration.
Implementation of
permittedEnvironments
readonlypermittedEnvironments: readonly ("staging"|"development"|"ci"|"integration"|"production")[] =FILE_DRIVER_ENVIRONMENTS
Defined in: packages/secrets/src/file-store.ts:36
The environment classes this driver may run in.
Implementation of
SecretStore.permittedEnvironments
Methods
health()
health():
Promise<SecretStoreHealth>
Defined in: packages/secrets/src/file-store.ts:109
Whether the store is usable. Never throws; a failure is status: 'down'.
Returns
Promise<SecretStoreHealth>
Implementation of
resolve()
resolve(
reference):Promise<Secret<string>>
Defined in: packages/secrets/src/file-store.ts:44
Reads the secret a reference names.
Parameters
reference
string
secret://<namespace>/<name>.
Returns
Promise<Secret<string>>
Throws
Always a SecretError, never a raw I/O error, and
its message says what the caller should do.