Repository navigation
Conversation
|
❗ By default, the pull request is configured to backport to all release branches.
|
There was a problem hiding this comment.
Nice follow-up of #11684: shipping the per-resource editor roles and keeping the aggregation opt-in looks right to me.
Inline: the overlap with DatabaseRole through inline managed roles (in the role and on the page), and the permissions some kubectl cnpg commands need.
|
Overall, the role separation looks reasonable. Two possible documentation gaps:
One additional suggestion: expand the AI Disclosure: I used GPT-Astra 6 Medium Reasoning and Opus 5.5 to perform blind adversarial reviews and then merged/validated their findings by hand. |
069a081 to
62b461e
Compare
|
/test |
|
@litaocdl, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/43430559919 |
|
/test |
|
@litaocdl, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/43543391496 |
|
ok-to-merge |
|
/ok-to-merge |
Add `cnpg-editor-role`, an aggregate role for CI/CD and GitOps tooling, limited to the namespaced resources that are not close to PostgreSQL superuser access. Add the missing `ImageCatalog`, `ClusterImageCatalog` and `DatabaseRole` editor roles, and ship the existing `Cluster`, `Backup`, `ScheduledBackup` and `Pooler` ones, keeping the high-privilege roles separate. Document the roles and the opt-in aggregation into the built-in edit and admin roles. Closes #11685 Assisted-by: Claude Signed-off-by: Gabriele Bartolini <[email protected]>
Co-authored-by: Valerio Del Sarto <[email protected]> Signed-off-by: Gabriele Bartolini <[email protected]>
Co-authored-by: Valerio Del Sarto <[email protected]> Signed-off-by: Gabriele Bartolini <[email protected]>
Co-authored-by: Valerio Del Sarto <[email protected]> Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Leonardo Cecchi <[email protected]>
Signed-off-by: Tao Li <[email protected]>
Write access to Cluster already gives PostgreSQL superuser access and the ability to create arbitrary Pods, through inline managed roles and the podPatch annotation. Keeping DatabaseRole and Pooler out of the aggregate role did not limit anything, and it made the role look safer than it is. Signed-off-by: Marco Nenciarini <[email protected]>
The Database role can install any extension available in the image, including untrusted ones, and the operator does not control the image. Signed-off-by: Marco Nenciarini <[email protected]>
Restarting a replica needs get and delete on Pods, not only delete. ImageCatalog and ClusterImageCatalog control the image a Cluster runs, so their roles are high privilege. Signed-off-by: Marco Nenciarini <[email protected]>
|
/test ft=smoke |
|
@mnencia, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/43886605133 |
Automation (CI/CD, GitOps) that writes CloudNativePG resources had no shipped role short of a widened
cnpg-managerorcluster-admin. Addcnpg-editor-role, an aggregate role for the namespaced resources, includingCluster,PoolerandDatabaseRole, whose write access is equivalent to PostgreSQL superuser access. Add the missingImageCatalog,ClusterImageCatalogandDatabaseRoleeditor roles, and ship the existingCluster,Backup,ScheduledBackupandPoolerones. Document the roles and the opt-in aggregation into the built-in edit and admin roles.Closes #11685
Assisted-by: Claude