Skip to main content

Module secrets

Module secrets 

Source
Expand description

Dev secrets store management for bundle setup.

Provides helpers for locating the dev secrets file and SecretsSetup for ensuring pack secrets are seeded.

Structs§

GeneratedSecret
A host-generated secret declared by a pack’s greentic.generated-secrets.v1 extension (e.g. the webchat jwt_signing_key). Unlike a regular secret requirement, the user never enters it — the host seeds a missing required secret with a value produced per policy. See greentic-messaging-providers docs/generated-runtime-secrets.md.
PackSecretRequirement
SecretsSetup
Single entry-point for secrets initialization and resolution.

Functions§

default_path
Returns the default dev store path without creating anything.
ensure_path
Ensures the default dev store path exists (creating parent directories) before returning it.
find_existing
Checks for an existing dev store inside the bundle root.
find_existing_with_override
Looks for an existing dev store using an override path before consulting default candidates.
generate_secret_value
Produce a value for a host-generated secret. random policy fills the value with cryptographically-random bytes encoded per encoding; any other policy is treated as random (the only strategy defined today).
load_generated_secrets_from_pack
Read greentic.generated-secrets.v1 declarations from a .gtpack manifest. Returns an empty vec when the pack declares none.
load_secret_keys_from_pack
Load secret requirement keys from a .gtpack archive.
load_secret_requirements_from_pack
Rich secret requirements extracted from a .gtpack archive.
open_dev_store
Open a DevStore from a bundle root path (convenience).
override_path
Returns a path explicitly configured via $GREENTIC_DEV_SECRETS_PATH.