Security & Permissions
Data Security and Keys
Model storage, encryption behavior, and key management guidance
Data Security and Keys
Local CLI state uses encrypted SQLite stores:
- City-local state and credentials:
~/.downcity/downcity.db - Federation admin profiles and admin keys:
~/.downcity/federation.db - Project-level binding stays in
<project>/downcity.jsonasexecution.modelId
How secrets are protected
Provider apiKey, channel credentials, user sessions, and Federation admin keys are not stored in plaintext. They are encrypted before being written to the local SQLite stores.
Key source priority:
DC_MODEL_DB_KEY~/.downcity/main/model-db.key
Best practices
- Never commit
~/.downcityor any key material. - Use a secret manager to inject
DC_MODEL_DB_KEYin team/production environments. - After key rotation, validate model connectivity through CLI and one real invocation.