Skip to content

docs: add explanation of non-personal database users in Cloud SQL#840

Open
Starefossen wants to merge 2 commits intomainfrom
doc/non-personal-database-users
Open

docs: add explanation of non-personal database users in Cloud SQL#840
Starefossen wants to merge 2 commits intomainfrom
doc/non-personal-database-users

Conversation

@Starefossen
Copy link
Copy Markdown
Member

What

Adds a new explanation page documenting all non-personal database users in Cloud SQL on Nais.

Why

Teams answering MKR-ØS (Minimum kontrollrammeverk for Økonomisystem) requirements need documentation they can link to about non-personal database user accounts. This was requested in #minimum-kontrollrammeverk-økonomisystem.

What's covered

  • Google system users (cloudsqladmin, cloudsqlagent, etc.) — all Google-managed, no Nav access
  • cloudsqlsuperuser — clarified as a role, not a user
  • The postgres user — not used by Nais in the golden path
  • Application user — provisioning flow, credential management (naiserator, sqeletor)
  • Personal access — IAM-based, time-limited, who can grant it
  • Audit logging — Cloud Audit Logs (Admin Activity vs Data Access) and pgAudit (opt-in)
  • Audit log retention — searchable 2yr + archived 11yr in locked buckets

Placement

docs/persistence/cloudsql/explanations/non-personal-database-users.md

Listed alongside existing explanations like cloud-sql-credentials and grants-and-privileges.

Starefossen and others added 2 commits April 14, 2026 19:51
Documents all non-personal database users (system users, postgres,
application user, personal IAM access) for teams answering MKR-ØS
control framework requirements about non-personal user accounts.

Covers:
- Google system users (cloudsqladmin, cloudsqlagent, etc.)
- The postgres user and golden path usage
- Application user provisioning and credential management
- Personal access via IAM
- Audit logging (Cloud Audit Logs + pgAudit)
- Audit log retention and storage

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix Cloud Audit Logs: database/user CRUD and logins are Data Access
  events, not Admin Activity. Add warning about enabling Data Access logs.
- Fix personal access: clarify it's the IAM role binding that's
  time-limited, not the DB user object. Add specific role names and TTLs.
- Fix credential flow: add the Secret → SQLUser/Config Connector → Cloud
  SQL step that was missing.
- Fix secret keys: use PREFIX notation and mention SSL keys for private IP.
- Fix cloudsqlsuperuser: qualify as built-in auth users only.
- Fix pgAudit: change 'default config' to 'recommended config' since the
  CLI doesn't enforce write,ddl,role — it's from the how-to guide.
- Fix overview table: soften 'only app pod' to acknowledge secret access.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant