-
Notifications
You must be signed in to change notification settings - Fork 73
WINC-1147: Implement node-specific RBAC for WICD #3133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
openshift-merge-bot
merged 1 commit into
openshift:master
from
mansikulkarni96:WINC-1147
Oct 9, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
bundle/manifests/system-wicd-nodes_rbac.authorization.k8s.io_v1_clusterrole.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/name: windows-machine-config-operator | ||
app.kubernetes.io/part-of: wicd | ||
name: system-wicd-nodes | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- nodes | ||
verbs: | ||
- list | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- nodes | ||
- nodes/status | ||
verbs: | ||
- get | ||
- patch | ||
- update | ||
- watch | ||
- apiGroups: | ||
- certificates.k8s.io | ||
resources: | ||
- certificatesigningrequests | ||
verbs: | ||
- create | ||
- get | ||
- list | ||
- watch |
16 changes: 16 additions & 0 deletions
16
bundle/manifests/system-wicd-nodes_rbac.authorization.k8s.io_v1_clusterrolebinding.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/name: windows-machine-config-operator | ||
app.kubernetes.io/part-of: wicd | ||
name: system-wicd-nodes | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: system-wicd-nodes | ||
subjects: | ||
- apiGroup: rbac.authorization.k8s.io | ||
kind: Group | ||
name: system:wicd-nodes |
4 changes: 4 additions & 0 deletions
4
bundle/manifests/windows-instance-config-daemon-service-account.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: windows-instance-config-daemon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: system-wicd-nodes | ||
labels: | ||
app.kubernetes.io/name: "windows-machine-config-operator" | ||
app.kubernetes.io/part-of: "wicd" | ||
rules: | ||
# Allow reading ConfigMaps for bootstrap phase and cleanup | ||
- apiGroups: [""] | ||
resources: ["configmaps"] | ||
verbs: ["get", "list"] | ||
# Allow listing nodes for node discovery (no resourceNames restriction needed) | ||
- apiGroups: [""] | ||
resources: ["nodes"] | ||
verbs: ["list"] | ||
# WICD certificate-based approach: broader access than OVN due to Windows management needs | ||
# Current implementation (Phase 1): Certificate authentication + group RBAC | ||
# - CSR controller ensures only legitimate nodes get certificates | ||
# - Certificate provides node-specific identity (system:wicd-node:nodename) | ||
# - Group RBAC grants necessary permissions for Windows node configuration | ||
# Future enhancement (Phase 2): Add admission webhook for operation-specific validation | ||
- apiGroups: [""] | ||
resources: ["nodes", "nodes/status"] | ||
verbs: ["get", "patch", "update", "watch"] | ||
mansikulkarni96 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# Allow creating CSRs for certificate renewal | ||
- apiGroups: ["certificates.k8s.io"] | ||
resources: ["certificatesigningrequests"] | ||
verbs: ["create", "get", "list", "watch"] |
15 changes: 15 additions & 0 deletions
15
config/rbac/wicd-certificate-group-clusterrolebinding.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: system-wicd-nodes | ||
labels: | ||
app.kubernetes.io/name: "windows-machine-config-operator" | ||
app.kubernetes.io/part-of: "wicd" | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: system-wicd-nodes | ||
subjects: | ||
- kind: Group | ||
name: system:wicd-nodes | ||
apiGroup: rbac.authorization.k8s.io |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added back for upgrade scenario, since during upgrade previous version of WICD binary will not have the capability and permissions to remove annotations from node using the certificate method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch