Skip to content

Commit 360af98

Browse files
wesselclaude
andcommitted
fix: support AWS RDS by reading pg_roles instead of pg_authid
On AWS RDS, SELECT on pg_authid is denied to all roles (including the master user and rds_superuser), so every Role reconcile failed with "permission denied for table pg_authid" (SQLSTATE 42501). The same applies to any non-superuser role on vanilla PostgreSQL. - RoleService reads role state from the world-readable pg_roles view (roleExists, roleLoginMatches, fetchCurrentFlags); pg_roles added to jOOQ codegen and regenerated. - PostgreSQLAuthenticationService.checkPassword returns MATCH/MISMATCH/UNVERIFIABLE, returning UNVERIFIABLE on SQLSTATE 42501 instead of throwing. - On UNVERIFIABLE (RDS), the reconciler detects password changes by comparing the password Secret's resourceVersion against Role.status.appliedPasswordSecretVersion, so no password-derived material is stored in etcd. KubernetesService.getSecretRefData returns credentials and the Secret resourceVersion together. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 0bcd728 commit 360af98

12 files changed

Lines changed: 862 additions & 61 deletions

File tree

generated/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jooq {
3939
| pg_default_acl
4040
| pg_get_userbyid
4141
| pg_namespace
42+
| pg_roles
4243
| shobj_description
4344
""".trimIndent()
4445
excludes = """

generated/src/main/java/it/aboutbits/postgresql/core/infrastructure/persistence/PgCatalog.java

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generated/src/main/java/it/aboutbits/postgresql/core/infrastructure/persistence/Tables.java

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generated/src/main/java/it/aboutbits/postgresql/core/infrastructure/persistence/tables/PgRoles.java

Lines changed: 298 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)