41 lines
1.0 KiB
Python
41 lines
1.0 KiB
Python
"""
|
|
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",
|
|
]
|