aeat.application.user_profile._custody module¶
Application-owned custody operations for the profile secret store.
The config CLI calls this module for recovery-code minting,
verification, rekey, and recovery. Storage primitives stay in
aeat.adapters.persistence.storage; this layer resolves
Settings, updates the active profile manifest
when recovery is enrolled, and returns typed application result records.
Plaintext recovery words are returned only from
mint_recovery_code(). They are never persisted by this module; the
secret store keeps only wrapped recovery material. Verification failures
from RecoveryVerificationError
and related storage errors are rendered as a false verification result
rather than leaking backend exception details.
- class CustodyRecoveryEnrollment(**data)[source]¶
Bases:
BaseModelResult of minting or rotating the persisted recovery wrapper.
- recovery_path: Path¶
- mnemonic: str¶
- rotated: bool¶
- class CustodyRecoveryStatus(**data)[source]¶
Bases:
BaseModelCurrent recovery-wrapper status for the configured secret store.
- recovery_path: Path¶
- recovery_enrolled: bool¶
- class CustodyRecoveryVerification(**data)[source]¶
Bases:
BaseModelResult of checking an operator-supplied recovery mnemonic.
- recovery_path: Path¶
- verified: bool¶
- class CustodyRekeyResult(**data)[source]¶
Bases:
BaseModelResult of rewrapping the master key under a new file-backend passphrase.
- secret_store_dir: Path¶
- rekeyed: bool¶
- class CustodyRecoverResult(**data)[source]¶
Bases:
BaseModelResult of recovering the master key from the recovery wrapper.
- recovery_path: Path¶
- secret_store_dir: Path¶
- recovered: bool¶
- recovery_wrap_path(settings=None)[source]¶
Return the configured persisted recovery-wrapper path.
- Return type:
Path- Parameters:
settings (Settings | None)
- inspect_recovery_status(settings=None)[source]¶
Inspect whether the configured recovery wrapper exists and return a
CustodyRecoveryStatus.- Return type:
- Parameters:
settings (Settings | None)
- mint_recovery_code(settings=None)[source]¶
Mint a new recovery mnemonic and return a
CustodyRecoveryEnrollment.The mnemonic is returned exactly once. The plaintext words are not persisted; only the wrapped master key lands in the secret-store directory.
- Return type:
- Parameters:
settings (Settings | None)
- verify_recovery_code(*, mnemonic, settings=None)[source]¶
Verify
mnemonicagainst the configured recovery wrapper and return aCustodyRecoveryVerification.- Return type:
- Parameters:
- rekey_secret_store(*, new_passphrase, settings=None)[source]¶
Rewrap the current master key under
new_passphraseand return aCustodyRekeyResult.- Return type:
- Parameters:
- recover_secret_store(*, mnemonic, new_passphrase, settings=None)[source]¶
Recover the master key from
mnemonicand return aCustodyRecoverResult.- Return type:
- Parameters:
- recover_secret_store_with_callback(*, mnemonic, passphrase_callback, settings=None)[source]¶
Recover the master key using a caller-owned passphrase callback and return a
CustodyRecoverResult.- Return type:
- Parameters: