Commit 360af98
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
- src/main/java/it/aboutbits/postgresql/core/infrastructure/persistence
- tables
- records
- operator/src
- main/java/it/aboutbits/postgresql
- core
- crd/role
- test/java/it/aboutbits/postgresql/crd/role
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
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