Vault Component¶
Purpose¶
The Vault component is the secret-management bootstrap layer of Lyndrix Core. It decides whether Vault needs initialization, unseal, token restoration, or mount preparation before the rest of the platform can continue.
Main locations¶
app/core/components/vault/logic/vault_service.pyapp/core/components/vault/logic/auto_unseal.pyapp/core/components/vault/logic/vault_init.pyapp/core/components/vault/logic/crypto.pyapp/core/components/vault/ui/routes.py
Responsibilities¶
- react to
system:started - determine whether Vault is initialized and unsealed
- handle init and unseal requests
- restore the stored root token when possible
- ensure the
lyndrixKV v2 mount exists - emit readiness signals for downstream components
- provide setup and unseal UI flows
Events¶
Subscribes¶
system:startedvault:init_requestedvault:unseal_requestedvault:needs_initvault:needs_unseal
Emits¶
vault:needs_initvault:needs_unsealvault:auth_failedvault:openedvault:ready_for_datavault:init_requestedvault:unseal_requested
Runtime behavior¶
At startup, the component:
- checks whether Vault is initialized
- checks whether Vault is sealed
- restores the root token from encrypted key material when possible
- ensures the
lyndrixmount exists as a KV v2 secret engine - emits
vault:opened - emits
vault:ready_for_data
If access to the mount cannot be prepared, the component emits vault:auth_failed and blocks downstream startup.
UI endpoints¶
/setup/unseal
Operational notes¶
vault_keys.encmust be protected and backed upLYNDRIX_MASTER_KEYcontrols whether encrypted bootstrap material can be reused- the database and plugin secret workflows depend on successful Vault preparation