Skip to content

Commit

Permalink
OCPBUGS-31353: Minimize wildcard privileges for CRDs and namespaces
Browse files Browse the repository at this point in the history
- Scoped namespace permissions to read-only to enable informer watches.
- Restricted wildcard namespace permissions exclusively to operand namespaces (routers and canary).
- Scoped CRD permissions to read-only to enable informer watches.
- Restricted wildcard CRD permissions exclusively to Gateway API.
  • Loading branch information
alebedev87 committed Nov 26, 2024
1 parent 8be1749 commit d3f57f2
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion manifests/00-cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ rules:
- ""
resources:
- configmaps
- namespaces
- serviceaccounts
- endpoints
- services
Expand All @@ -25,6 +24,25 @@ rules:
verbs:
- "*"

- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch

- apiGroups:
- ""
resources:
- namespaces
resourceNames:
- openshift-ingress
- openshift-ingress-canary
verbs:
- "*"

- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -172,6 +190,20 @@ rules:
resources:
- customresourcedefinitions
verbs:
- get
- list
- watch

- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
resourceNames:
- gatewayclasses.gateway.networking.k8s.io
- gateways.gateway.networking.k8s.io
- httproutes.gateway.networking.k8s.io
- referencegrants.gateway.networking.k8s.io
verbs:
- '*'

- apiGroups:
Expand Down

0 comments on commit d3f57f2

Please sign in to comment.