Skip to content

Drop privileged SCC from RBAC grants#601

Open
gouthampacha wants to merge 2 commits into
openstack-k8s-operators:mainfrom
gouthampacha:drop-privileged-scc-rbac
Open

Drop privileged SCC from RBAC grants#601
gouthampacha wants to merge 2 commits into
openstack-k8s-operators:mainfrom
gouthampacha:drop-privileged-scc-rbac

Conversation

@gouthampacha

Copy link
Copy Markdown
Contributor

Summary

  • Remove the privileged SCC from kubebuilder RBAC markers, runtime policy rules, and generated ClusterRole/Role manifests
  • The namespace-scoped Role that existed solely for the privileged SCC is eliminated
  • Only the anyuid SCC remains, which is sufficient for all manila services

Follow-up to #597 which removed the privileged security context from the manila-share StatefulSet.

Jira: OSPRH-32347

Test plan

  • make manifests regenerates config/rbac/role.yaml without privileged
  • make generate succeeds
  • CI functional tests pass
  • grep -r 'privileged' internal/ config/rbac/ returns no SCC-related hits

🤖 Generated with Claude Code

@openshift-ci openshift-ci Bot requested review from abays and silvacarloss July 10, 2026 19:26
@gouthampacha gouthampacha requested review from fmount and removed request for abays and silvacarloss July 10, 2026 19:27

@fmount fmount left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm thanks a lot for this one!

@openshift-ci

openshift-ci Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fmount, gouthampacha

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [fmount,gouthampacha]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@centosinfra-prod-github-app

Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/d3eca927587549558be12769b5920c24

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 07m 44s
manila-operator-kuttl FAILURE in 52m 37s
manila-operator-tempest FAILURE in 1h 44m 55s

@fmount

fmount commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

@gouthampacha the CI issue seems a real problem w/ manila-db-sync job that is not running. I think this is related to the fact we build the job with [1] and we should probably remove:

SeccompProfile: &corev1.SeccompProfile{
			Type: corev1.SeccompProfileTypeRuntimeDefault,
		},

that is incompatible w/ anyuid. I guess we had that because we used privileged, but we need to fix the securityContext as well if we remove the rbac entirely.

[1] https://github.com/openstack-k8s-operators/manila-operator/blob/main/internal/manila/funcs.go#L43

@fmount

fmount commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

@gouthampacha retriggering CI with the updated SecurityContext (see my previous comment)

gouthampacha and others added 2 commits July 11, 2026 10:55
manila-share no longer runs with a privileged security context,
so remove the privileged SCC from kubebuilder RBAC markers, the
runtime policy rules, and the generated ClusterRole/Role manifests.
Only the anyuid SCC is needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
As we removed scc from the rbac roles assigned to manila sa, we need to
fix the SeccompProfile assigned to the manila jobs (both dbsync and
cronjobs). In addition, this patch removes the hostPath /etc/machine-id
mount that prevent the final removal of privileged rbac.

Signed-off-by: Francesco Pantano <fpantano@redhat.com>
@fmount fmount force-pushed the drop-privileged-scc-rbac branch from 11499d7 to cd90138 Compare July 11, 2026 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants