Security & credentials
Halyard binds every credential to a project and a user, encrypts secrets at rest, and isolates tenants at the database layer. This page covers each mechanism.
AI credentials
Section titled “AI credentials”A project_ai_credentials row records, per project and per member, which of
that member’s own credentials a provider (claude / gemini) uses. Each
member picks their own from the project’s Settings → AI Credentials; row-level
security is per-user, so a teammate never sees another member’s picks.
- AI keys are stored encrypted at rest with application-level AES-256-GCM, and are write-only through the API: you can set one, but only a masked hint (the last few characters) is ever read back. An AI key powers only server-side features — the ones that call your provider directly over HTTPS from the control plane, such as planning chat and PR review’s own analysis.
- AI CLI logins are also stored encrypted at rest the same way. A session — an Implement run, a PR-review coding step, a CI-fix retry, anything dispatched through the work queue, on a node or in the cloud — authenticates only with your own CLI login for that session’s provider, which the control plane decrypts and injects at dispatch. A session never uses an AI key, and there is no fallback: if you haven’t connected a CLI login for a project and provider, a session on it won’t start until you do, in Settings → AI Credentials.
Git credentials
Section titled “Git credentials”Git provider tokens bind per project too, as a project VCS connection, stored encrypted. Configure them from the project’s Settings → Integrations.
API tokens
Section titled “API tokens”hly_ API tokens are stored as a SHA-256 hash, not in plaintext. Halyard can
verify a token presented to it, but cannot recover or display one after it’s
issued. See Authentication for how tokens and scopes
work.
Tenant isolation
Section titled “Tenant isolation”Every tenant-scoped table carries a Postgres row-level security (RLS) policy, so one tenant’s rows are never visible to another’s queries, even if application code has a bug. This is enforced at the database layer, not just in application logic.
Encryption at rest and in transit
Section titled “Encryption at rest and in transit”Data at rest is encrypted with AWS KMS. Traffic between clients, the API, and nodes runs over TLS. Secrets that the application itself needs to read back (AI keys, Git tokens) get an additional application-level AES-256-GCM layer on top, so a database dump alone doesn’t expose them.