The barman-plugin-objectstore-editor-role and barman-plugin-objectstore-viewer-role ClusterRoles are missing the standard Kubernetes RBAC aggregation labels. Without them, users bound to the built-in admin, edit, or view ClusterRoles can't access ObjectStore resources, even in namespaces where they have full access otherwise.
Any service account that relies on aggregated roles (e.g. an ArgoCD account bound to admin) gets a 403 on ObjectStore CRs:
objectstores.barmancloud.cnpg.io "my-store" is forbidden: User
"system:serviceaccount:my-namespace:my-service-account" cannot get resource "objectstores" in API
group "barmancloud.cnpg.io" in the namespace "my-namespace"
The fix is adding aggregation labels to both ClusterRoles.
On barman-plugin-objectstore-editor-role:
metadata:
labels:
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
On barman-plugin-objectstore-viewer-role:
metadata:
labels:
rbac.authorization.k8s.io/aggregate-to-view: "true"
The main CloudNative-PG operator already does this for its CRDs. Without these labels, every deployer has to create RoleBindings for the ObjectStore ClusterRoles manually in each namespace.
The
barman-plugin-objectstore-editor-roleandbarman-plugin-objectstore-viewer-roleClusterRoles are missing the standard Kubernetes RBAC aggregation labels. Without them, users bound to the built-inadmin,edit, orviewClusterRoles can't access ObjectStore resources, even in namespaces where they have full access otherwise.Any service account that relies on aggregated roles (e.g. an ArgoCD account bound to
admin) gets a 403 on ObjectStore CRs:The fix is adding aggregation labels to both ClusterRoles.
On
barman-plugin-objectstore-editor-role:On
barman-plugin-objectstore-viewer-role:The main CloudNative-PG operator already does this for its CRDs. Without these labels, every deployer has to create RoleBindings for the ObjectStore ClusterRoles manually in each namespace.