backend redesign
This commit is contained in:
40
backend.old/src/secrets_manager/__init__.py
Normal file
40
backend.old/src/secrets_manager/__init__.py
Normal file
@@ -0,0 +1,40 @@
|
||||
"""
|
||||
Encrypted secrets management with master password protection.
|
||||
|
||||
This module provides secure storage for sensitive configuration like API keys,
|
||||
using Argon2id for password-based key derivation and Fernet (AES-256) for encryption.
|
||||
|
||||
Basic usage:
|
||||
from secrets_manager import SecretsStore
|
||||
|
||||
# First time setup
|
||||
store = SecretsStore()
|
||||
store.initialize("my-master-password")
|
||||
store.set("ANTHROPIC_API_KEY", "sk-ant-...")
|
||||
|
||||
# Later usage
|
||||
store = SecretsStore()
|
||||
store.unlock("my-master-password")
|
||||
api_key = store.get("ANTHROPIC_API_KEY")
|
||||
|
||||
Command-line interface:
|
||||
python -m secrets_manager.cli init
|
||||
python -m secrets_manager.cli set KEY VALUE
|
||||
python -m secrets_manager.cli get KEY
|
||||
python -m secrets_manager.cli list
|
||||
python -m secrets_manager.cli change-password
|
||||
"""
|
||||
|
||||
from .store import (
|
||||
SecretsStore,
|
||||
SecretsStoreError,
|
||||
SecretsStoreLocked,
|
||||
InvalidMasterPassword,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"SecretsStore",
|
||||
"SecretsStoreError",
|
||||
"SecretsStoreLocked",
|
||||
"InvalidMasterPassword",
|
||||
]
|
||||
Reference in New Issue
Block a user