feat: remove pgedge_application built-in roles#365
Conversation
Removes `pgedge_application` and `pgedge_application_read_only` from the control plane. These roles are no longer needed now that services connect via the `connect_as` model (PLAT-557) and PostgREST's dependency on `pgedge_application_read_only` as a default anon role has been removed (PLAT-568). - Delete `CreateApplicationRole`, `CreateApplicationReadOnlyRole`, and `schemaReadOnly` from `postgres/roles.go` - Simplify `CreateBuiltInRoles` to only create `pgedge_superuser` - Remove application role grants from `GrantBuiltinRolePrivileges` - Remove both roles from the `builtinRoles` conflict-check list; users may now name their database users `pgedge_application` or `pgedge_application_read_only` without conflict - Delete `docs/development/service-credentials.md` (fully obsolete) - Remove stale role references from dev docs
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThe pull request removes application-specific database roles ( Changes
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | -4 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes. Give us feedback
jason-lynch
left a comment
There was a problem hiding this comment.
Thanks! We should talk about removing pgedge_superuser as well.
Summary
pgedge_applicationandpgedge_application_read_onlyuilt-in roles from the control planeCreateApplicationRole,CreateApplicationReadOnlyRole, andschemaReadOnlyfrompostgres/roles.goCreateBuiltInRolesto only createpgedge_superuserGrantBuiltinRolePrivilegesbuiltinRolesconflict-check listdocs/development/service-credentials.md(fully obsolete)Context
These roles were created alongside every database but had no remaining consumers:
pgedge_application_read_onlywas used as the PostgREST default anon role — removed in feat: require db_anon_role for PostgREST, remove pgedge_application_r… #361 (db_anon_roleis now required)pgedge_applicationlost its last consumer when thesvc_*service account model was replaced byconnect_asin feat: remove ServiceUserRole #358/docs: update service docs for connect_as #360This is the cleanup unblocked by those two PRs.
Behavior on existing databases
The roles are not dropped from existing databases. They will persist and continue to be replayed to new nodes via
pg_dumpall --roles-onlyfrom the primary. No privileges are revoked. New databases created after this change will never have these roles.Note
pgedge_applicationandpgedge_application_read_onlyare no longer reserved names. Users may now name theirdatabase_usersentries either of those strings without a validation error.