Skip to content

Commit

Permalink
Merge pull request #421 from karelyatin/OSPRH-4297
Browse files Browse the repository at this point in the history
Do not allow arbitary hostPath mounts via spec.extraMounts
  • Loading branch information
openshift-merge-bot[bot] authored Oct 8, 2024
2 parents 1a2449d + 41b5ae7 commit 29b4baf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ rules:
- security.openshift.io
resourceNames:
- anyuid
- hostmount-anyuid
resources:
- securitycontextconstraints
verbs:
Expand Down
4 changes: 2 additions & 2 deletions controllers/neutronapi_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ type NeutronAPIReconciler struct {
// +kubebuilder:rbac:groups="rbac.authorization.k8s.io",resources=roles,verbs=get;list;watch;create;update;patch
// +kubebuilder:rbac:groups="rbac.authorization.k8s.io",resources=rolebindings,verbs=get;list;watch;create;update;patch
// service account permissions that are needed to grant permission to the above
// +kubebuilder:rbac:groups="security.openshift.io",resourceNames=anyuid;hostmount-anyuid,resources=securitycontextconstraints,verbs=use
// +kubebuilder:rbac:groups="security.openshift.io",resourceNames=anyuid,resources=securitycontextconstraints,verbs=use
// +kubebuilder:rbac:groups="",resources=pods,verbs=create;delete;get;list;patch;update;watch;patch

// Reconcile - neutron api
Expand Down Expand Up @@ -763,7 +763,7 @@ func (r *NeutronAPIReconciler) reconcileNormal(ctx context.Context, instance *ne
rbacRules := []rbacv1.PolicyRule{
{
APIGroups: []string{"security.openshift.io"},
ResourceNames: []string{"anyuid", "hostmount-anyuid"},
ResourceNames: []string{"anyuid"},
Resources: []string{"securitycontextconstraints"},
Verbs: []string{"use"},
},
Expand Down

0 comments on commit 29b4baf

Please sign in to comment.