Skip to content

[SECURITY] Encrypt org credentials at rest (BYOK storage) #60

Closed

Description

@OkiriGabriel

Problem

Org credentials are stored as plaintext JSON at {org_id}/config/credentials.json via OrgConfig.save() → storage.put_json().

SECURITY_GUARANTEES.md claims credentials are encrypted at rest and references an ENCRYPT_CREDENTIALS flag, but no encryption code exists in the Python codebase.

Impact

A storage bucket compromise, backup leak, or overly broad IAM policy exposes all tenant API keys (Anthropic, GitHub, cloud providers, Jira, PagerDuty, etc.) in one shot.

Proposed solution

  1. Add envelope encryption before writing credentials (KMS-backed or app-level master key)
  2. Optionally support read-through from AWS Secrets Manager, GCP Secret Manager, or HashiCorp Vault instead of object storage
  3. Align SECURITY_GUARANTEES.md with actual implementation
  4. Add tests verifying ciphertext at rest and that status/logs never expose secret values

References

  • services/org_config.py (save(), get())
  • storage/s3_storage.py, storage/gcs_storage.py, storage/azure_storage.py
  • SECURITY_GUARANTEES.md (encryption claims)

Activity

  1. added
    enhancement
    security
    on Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementsecurity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions