Authsome stores all credentials in a per-profile encrypted SQLite vault underDocumentation Index
Fetch the complete documentation index at: https://authsome.mbajaj.me/llms.txt
Use this file to discover all available pages before exploring further.
~/.authsome/. The vault speaks a minimal key-value interface — orchestrators on top of it (AuthLayer, the proxy) decide which keys to read and write.
Storage layout
default are invisible to work and vice versa.
Key namespace
Inside a profile’sstore.db, keys follow this shape:
| Key | Holds |
|---|---|
metadata | Non-secret per-profile record: known connection names, default connection, last-used connection. |
state | Transient per-profile state: last refresh attempt, last refresh error. |
client | OAuth client credentials (client_id, encrypted client_secret). One per provider per profile. |
connection:<name> | The credential record for a named connection: tokens, scopes, expiry, account info. |
~/.authsome/providers/<name>.json (user-registered, takes precedence) or as bundled JSON files inside the package.
Encryption
Sensitive fields are encrypted at rest using AES-256-GCM.| Property | Value |
|---|---|
| Algorithm | AES-256-GCM |
| Master key | 256 bits, generated on first init |
| Nonce | 96 bits, generated per encryption |
config.encryption.mode:
local_key(default) — the key is stored as base64-encoded JSON in~/.authsome/master.keywith mode0600. File permissions are the only protection at rest.keyring— the key is stored in the OS keychain (macOS Keychain, GNOME Keyring, Windows Credential Manager) via thekeyringlibrary.
Sensitive fields
The following fields are always encrypted at rest:access_tokenrefresh_tokenapi_keyclient_secret- ID tokens, when stored
- Provider-issued secrets
client_id is not sensitive and is stored in plaintext.
Wire format
Each encrypted value is stored as a compact dot-separated string:LocalFileCrypto.encrypt and KeyringCrypto.encrypt produce in src/authsome/vault/crypto.py.
The portable spec (
docs/specs/authsome-v1.md §11.4) defines a richer JSON envelope ({enc, alg, kid, nonce, ciphertext, tag}) as the cross-language interop target. The current Python implementation uses the compact format above; a future migration may switch to the JSON envelope when a second-language port lands.The three states
Every provider in a profile is always in exactly one of three states. The state is derived at runtime from what is stored — it is not a persisted field.| State | Meaning |
|---|---|
available | The provider definition exists. No credentials are stored for this profile. |
configured | OAuth2 client credentials are saved for this profile. The user has not yet logged in. API-key providers skip this state. |
connected | A valid connection record exists with an access token or API key. |
connected, authsome login <provider> exits with an error. Pass --force to overwrite an existing connection.
Locking
Writes acquire an advisoryfcntl.flock on the per-profile lock file. Multiple authsome processes can read concurrently but serialize writes within the same profile. Locks across profiles are independent.