Skip to content

Verify KMS for resendApiKeyEncrypted column #28

@jusso-dev

Description

@jusso-dev

Why

Column name suggests encryption, but no KMS wrapper is visible. If the value is stored plaintext, tenants Resend keys are exposed in the DB dump.

Scope

  • Audit current write path of organisations.resendApiKeyEncrypted.
  • If plaintext: introduce the same AES-GCM sealTotpSecret style or migrate to a real KMS, AWS KMS or GCP KMS, wrapped DEK.
  • Migrate existing rows on next admin save.

Acceptance

  • DB dump shows ciphertext for the field.
  • Decrypt path test passes; wrong key fails closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:platformbugSomething isn't workinghardeningSecurity/correctness hardening

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions