OSAC-3668: grant osac-operator networkclasses RBAC for hub-access escalation - #173
Conversation
…alation OSAC-2352 added subnets/networkclasses read rules to the hub-access-hosted- clusters ClusterRole but did not grant osac-operator matching networkclasses permissions. Since the operator creates per-ClusterOrder RoleBindings referencing that ClusterRole, Kubernetes RBAC escalation prevention blocked the binding — the operator SA cannot grant permissions it does not hold. Fix: add networkclasses get/list/watch to osac-operator's ClusterRole via kubebuilder markers on clusterorder_controller.go. Also re-apply the reverted OSAC-2352 changes to bare-metal-fulfillment-operator and osac-installer hub-access ClusterRole. Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Dan Manor <dmanor@redhat.com>
|
@danmanor: This pull request references OSAC-3668 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danmanor The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Warning Review limit reached
Next review available in: 57 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository: osac-project/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
WalkthroughThe pull request adds read-only RBAC permissions for ChangesController RBAC access
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Regenerated CRDs picked up upstream JobRecord.target field addition. Required by check-helm-crds CI check. Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Dan Manor <dmanor@redhat.com>
|
/retest |
|
Re-triggered failed runs:
|
8f25533
into
osac-project:main
OSAC-3668: Grant osac-operator networkclasses RBAC for hub-access escalation
Jira: https://redhat.atlassian.net/browse/OSAC-3668
Fixes regression from: OSAC-2352 / #111
Root cause
OSAC-2352 added
subnetsandnetworkclassesread rules to thehub-access-hosted-clustersClusterRole but did not grant the osac-operator SA matchingnetworkclassespermissions. The osac-operator creates per-ClusterOrder RoleBindings referencing that ClusterRole (OSAC-1121). Kubernetes RBAC escalation prevention blocked the binding — the operator SA cannot grant permissions it does not hold. Result: ClusterOrder stuck with no phase, no HostedCluster created.Fix
networkclassesget/list/watch kubebuilder RBAC marker toclusterorder_controller.go, regenerateconfig/rbac/role.yaml, update Helm chart clusterrolesubnets/networkclassesmarkers + regenerated manifestssubnets/networkclassesrules tohub-access-hosted-clustersClusterRoleTesting
make lint— 0 issues (both operators)make test— all pass (both operators)helm lint— pass (osac-installer)Summary by CodeRabbit