Skip to content

OCPSTRAT-3661: Add Sippy discovered exceptions for RBAC monitor test - #31616

Open
JoelSpeed wants to merge 1 commit into
openshift:mainfrom
JoelSpeed:admin-escalation-monitortest
Open

OCPSTRAT-3661: Add Sippy discovered exceptions for RBAC monitor test#31616
JoelSpeed wants to merge 1 commit into
openshift:mainfrom
JoelSpeed:admin-escalation-monitortest

Conversation

@JoelSpeed

@JoelSpeed JoelSpeed commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

This extends the tests added in #31536 based on new findings from Sippy

Also excludes OLM installed operators that have been picked up in tests where these do not have predictable names and cannot be added to the exceptions list cleanly

Summary by CodeRabbit

  • Bug Fixes
    • Improved RBAC escalation monitoring to recognize approved cluster-role bindings used by core platform and integrated services.
    • Added handling for service-account pull secrets, compatibility requirements, and other supported system configurations.
    • OLM-managed bindings generated for ClusterServiceVersions are now excluded from escalation findings, while unlabeled bindings continue to be audited.
  • Tests
    • Added coverage validating that OLM-managed bindings are skipped appropriately and unmarked bindings remain subject to auditing.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@JoelSpeed JoelSpeed changed the title Add Sippy discovered exceptions for RBAC monitor test OCPSTRAT-3661: Add Sippy discovered exceptions for RBAC monitor test Sep 7, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 7, 2026
@openshift-ci-robot

openshift-ci-robot commented Sep 7, 2026

Copy link
Copy Markdown

@JoelSpeed: This pull request references OCPSTRAT-3661 which is a valid jira issue.

Details

In response to this:

This extends the tests added in #31536 based on new findings from Sippy

Also excludes OLM installed operators that have been picked up in tests where these do not have predictable names and cannot be added to the exceptions list cleanly

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.

@openshift-ci
openshift-ci Bot requested review from deads2k and sjenning September 7, 2026 15:18
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 89f6ea64-5f15-40c2-9229-bc8d79a42f82

📥 Commits

Reviewing files that changed from the base of the PR and between c36d7ed and 8e42253.

📒 Files selected for processing (2)
  • pkg/monitortests/authentication/rbacadminescalationtests/monitortest.go
  • pkg/monitortests/authentication/rbacadminescalationtests/monitortest_test.go

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


Walkthrough

The RBAC escalation monitor adds tracked exceptions for platform controllers and excludes ClusterRoleBindings generated by OLM ClusterServiceVersions. Tests verify that removing the OLM ownership label restores normal evaluation.

Changes

RBAC escalation monitoring

Layer / File(s) Summary
Tracked platform exceptions
pkg/monitortests/authentication/rbacadminescalationtests/monitortest.go
Adds tracked exceptions for CVO, Istiod, Kubemacpool, Nmstate, OLM, CAPI, service-account pull-secrets, and compatibility requirements controllers.
OLM-generated binding filtering
pkg/monitortests/authentication/rbacadminescalationtests/monitortest.go, pkg/monitortests/authentication/rbacadminescalationtests/monitortest_test.go
Detects ClusterRoleBindings labeled as generated for a ClusterServiceVersion and skips them during evaluation. Tests verify labeled and unlabeled behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 8e422

This change adds RBAC-monitor exceptions and excludes CSV-owned OLM bindings while preserving evaluation for unlabeled bindings. The behavior is covered by targeted tests, with no remaining merge-readiness risk identified.

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 2 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The pull request adds no Ginkgo test title. The new test is TestOLMManagedSkipped, which is a stable Go test function name. Its generated-looking somehash value appears only in test setup, not in …
Test Structure And Quality ✅ Passed PASS. The added test is a standard Go testing unit test, not a Ginkgo test. It evaluates local RBAC objects only; it creates no cluster resources and uses no waits, Eventually, or Consistently. …
Microshift Test Compatibility ✅ Passed PASS: The pull request adds a standard Go unit test, TestOLMManagedSkipped(t *testing.T), not a new Ginkgo e2e test. The changed files contain no It, Describe, Context, or When test declarat…
Single Node Openshift (Sno) Test Compatibility ✅ Passed The pull request adds no Ginkgo e2e tests. The new test is a standard Go testing function, TestOLMManagedSkipped, and the production changes update RBAC monitor logic and exception data. No It, …
Topology-Aware Scheduling Compatibility ✅ Passed PASS: The pull request changes only pkg/monitortests/authentication/rbacadminescalationtests/monitortest.go and its Go test file. The changes add RBAC exception data, OLM label filtering, and unit-t…
Ote Binary Stdout Contract ✅ Passed PASS: The pull request adds only RBAC exception data, OLM label filtering, and a unit test. The changed package has no fmt.Print*, log, klog, os.Stdout, or Ginkgo stdout writes. The OTE entry point re…
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PASS: The pull request adds standard Go testing.T unit-test coverage and RBAC exception data. It adds no Ginkgo e2e declarations such as It, Describe, Context, or When. The changed code cont…
No-Weak-Crypto ✅ Passed The pull request changes only RBAC exception data, OLM label detection, binding evaluation, and tests. The changed lines add no MD5, SHA-1, DES, 3DES, RC4, Blowfish, ECB, cryptographic API, custom cry…
Container-Privileges ✅ Passed PASS: The pull request changes only Go RBAC-monitor logic and tests. The exact diff adds ClusterRoleBinding exception data, OLM label handling, and a unit test. No container or Kubernetes manifest fie…
No-Sensitive-Data-In-Logs ✅ Passed PASS: The pull request adds static RBAC exception identifiers and an OLM label check. It does not add logging or output of passwords, tokens, API keys, PII, hostnames, or customer data. Existing JUnit…
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding Sippy-discovered exceptions to the RBAC monitor test, including the related OLM handling.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci

openshift-ci Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoelSpeed

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:

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 7, 2026
@JoelSpeed

Copy link
Copy Markdown
Contributor Author

CC @neisw @everettraven

As you reviewed the first part of this

@openshift-ci openshift-ci Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label Sep 7, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@openshift-ci

openshift-ci Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

@JoelSpeed: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-metal-ipi-ovn-ipv6 8e42253 link true /test e2e-metal-ipi-ovn-ipv6

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants