Skip to content

Conversation

@orhanrauf
Copy link
Contributor

@orhanrauf orhanrauf commented Oct 28, 2025

Summary

Eliminates hardcoded shared accounts in production to comply with CASA-22 requirements while maintaining development usability.

Changes

  • Environment-aware migrations: Modified database migrations to only grant admin privileges to [email protected] in non-production environments
  • Documentation: Added clear dev/test-only comments to docker-compose.test.yml

Implementation Details

Migrations now check settings.ENVIRONMENT != 'prd' before granting admin rights to the test account. Production databases only grant admin privileges to @airweave.ai email addresses.

Testing

  • Existing tests continue to work with [email protected] in dev/test environments
  • Production deployments will not auto-provision the test account with admin privileges

Related

  • Linear: ENG-169
  • Companion PR in infra-core for production Helm config changes

Resolves #ENG-169


Summary by cubic

Removes shared/default admin accounts from production to meet CASA-22. In prod, admin is granted only to @airweave.ai emails; the test [email protected] stays in dev/test (per Linear ENG-169).

  • Migration
    • Make is_admin updates environment-aware: only add [email protected] when ENVIRONMENT != 'prd'.
    • In production, set is_admin=true only for @airweave.ai accounts.
    • Add dev/test-only notes in docker-compose.test.yml for local superuser creds; never use in prod.

- Make database migrations environment-aware to only grant [email protected] privileges in non-production
- Add clear documentation to docker-compose.test.yml marking credentials as dev/test only
- Migrations now check ENVIRONMENT != 'prd' before granting admin to test account
- Production databases only grant admin rights to @airweave.ai email addresses
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Copy link
Collaborator

@felixschmetz felixschmetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants