Skip to content

NO-JIRA: kms to kms key identifier check#941

Merged
openshift-merge-bot[bot] merged 2 commits into
openshift:masterfrom
gangwgr:kmstokms
Jul 20, 2026
Merged

NO-JIRA: kms to kms key identifier check#941
openshift-merge-bot[bot] merged 2 commits into
openshift:masterfrom
gangwgr:kmstokms

Conversation

@gangwgr

@gangwgr gangwgr commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

kms to kms key identifier check

Summary by CodeRabbit

  • Tests
    • Strengthened end-to-end encryption validation for token-of-life data during migration by using KMS-specific checks.
    • Updated test indexer stubs to support additional sync/bookmark-related methods required by controller test scenarios.
  • Bug Fixes
    • Improved the formatting of emitted token max-age change values for more accurate event logs.
  • Chores
    • Refreshed module dependency versions and added a pinned library replacement to align with the updated module source.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

This PR updates Go module dependencies, redirects library-go to a pinned fork, uses a KMS-specific migration assertion, fixes token age event formatting, and extends external OIDC test indexers.

Changes

Authentication operator updates

Layer / File(s) Summary
Module dependency resolution
Untitled, go.mod
Updates direct and indirect dependency versions, redirects library-go to github.com/gangwgr/library-go, and adds the Ginkgo replacement directive.
Encryption migration validation
test/e2e-encryption-kms/encryption_kms_2.go
Uses the KMS-specific encryption assertion with the expected namespace and component selector.
Token observation event formatting
pkg/controllers/configobservation/oauth/observe_tokenconfig.go
Formats floating-point token age values with %g in change events.
External OIDC test indexers
pkg/controllers/externaloidc/..., test/library/waits.go
Adds bookmark and last-sync-resource-version methods to indexer test doubles and reorders imports in the wait helper.

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

Suggested reviewers: flavianmissi, p0lyn0mial, everettraven

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 No changed Ginkgo titles contain dynamic or unstable values; the PR only touches assertions and test doubles, not test names.
Test Structure And Quality ✅ Passed The only Ginkgo change is a single scenario call with the existing [Timeout:120m] pattern; no new cleanup, wait, or multi-assertion issues were introduced.
Microshift Test Compatibility ✅ Passed No new Ginkgo specs were added; the e2e diff only swaps an assertion helper and the other changes are unit-test stubs.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The modified e2e test only changes an encryption assertion; it creates/validates a token in etcd and makes no node-count, scheduling, or HA assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed Changed files are dependency bumps and tests only; no new node selectors, anti-affinity, topology spread, or replica logic were added.
Ote Binary Stdout Contract ✅ Passed Touched files add no stdout writes in main/init/TestMain/suite setup; the only process-level logging found is klog.LogToStderr(true), which routes output to stderr.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The changed e2e test only switches to a KMS-specific assertion and uses existing in-cluster Vault providers; no IPv4-only literals or public internet dependencies found.
No-Weak-Crypto ✅ Passed The PR only updates dependency pins, test helpers, and a log format; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret/token comparisons were added.
Container-Privileges ✅ Passed PASS: The PR diff adds no privileged/hostPID/hostNetwork/hostIPC/allowPrivilegeEscalation/SYS_ADMIN fields, and the touched non-vendor files are deps/tests only.
No-Sensitive-Data-In-Logs ✅ Passed The only added log/event text is a numeric accessTokenMaxAgeSeconds message; no new logs include tokens, secrets, PII, or hostnames.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and relevant to the main KMS-to-KMS migration assertion change.
✨ 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 requested review from flavianmissi and p0lyn0mial July 3, 2026 07:27

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
test/e2e-encryption-kms/encryption_kms_2.go (1)

43-44: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Duplicated namespace/label-selector literals.

"openshift-config-managed" and the component label selector string at Lines 43-44 duplicate the values already set in the BasicScenario literal at Lines 30-31. Consider referencing local variables to avoid drift if either changes.

♻️ Suggested consolidation
+	namespace := "openshift-config-managed"
+	labelSelector := "encryption.apiserver.operator.openshift.io/component" + "=" + "openshift-oauth-apiserver"
+
 	library.TestEncryptionProvidersMigration(ctx, t, library.ProvidersMigrationScenario{
 		BasicScenario: library.BasicScenario{
-			Namespace:                       "openshift-config-managed",
-			LabelSelector:                   "encryption.apiserver.operator.openshift.io/component" + "=" + "openshift-oauth-apiserver",
+			Namespace:                       namespace,
+			LabelSelector:                   labelSelector,
 			...
 		},
 		AssertResourceEncryptedFunc: func(t testing.TB, cs library.ClientSet, resource runtime.Object) {
 			library.AssertTokenOfLifeEncrypted(t, cs, resource)
-			library.AssertKMSEncryptedWithWriteKey(t, cs.Kube, "openshift-config-managed",
-				"encryption.apiserver.operator.openshift.io/component=openshift-oauth-apiserver",
+			library.AssertKMSEncryptedWithWriteKey(t, cs.Kube, namespace, labelSelector,
 				[]byte(library.GetRawTokenOfLife(t, cs)),
 				library.AuthTargetGRs[0],
 			)
 		},
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/e2e-encryption-kms/encryption_kms_2.go` around lines 43 - 44, The
namespace and label-selector literals in the KMS encryption assertion are
duplicated from the BasicScenario setup, so update the call in the
encryption_kms_2 test to reuse the existing local values instead of hardcoding
them. Use the BasicScenario fields/variables already initialized in this test to
keep the namespace and component selector in sync with the scenario
configuration.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@test/e2e-encryption-kms/encryption_kms_2.go`:
- Around line 43-44: The namespace and label-selector literals in the KMS
encryption assertion are duplicated from the BasicScenario setup, so update the
call in the encryption_kms_2 test to reuse the existing local values instead of
hardcoding them. Use the BasicScenario fields/variables already initialized in
this test to keep the namespace and component selector in sync with the scenario
configuration.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e6f33694-055f-4a92-935d-9b53742d6eb9

📥 Commits

Reviewing files that changed from the base of the PR and between 2fbe1fb and 5b02176.

⛔ Files ignored due to path filters (11)
  • go.sum is excluded by !**/*.sum
  • vendor/github.com/openshift/library-go/pkg/operator/encryption/controllers/kms_preflight_controller.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/library-go/pkg/operator/encryption/kms/preflight/assets/kms-preflight-pod.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/library-go/pkg/operator/encryption/kms/preflight/checker.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/library-go/pkg/operator/encryption/kms/preflight/cmd.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/library-go/pkg/operator/encryption/kms/preflight/deployer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/library-go/pkg/operator/encryption/kms/preflight/pod_status.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/library-go/pkg/operator/encryption/kms/preflight/pod_template.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/library-go/test/library/encryption/assertion.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/library-go/test/library/encryption/scenarios.go is excluded by !**/vendor/**, !vendor/**
  • vendor/modules.txt is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (4)
  • Untitled
  • go.mod
  • test/e2e-encryption-kms/encryption_kms_2.go
  • test/library/waits.go

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 8, 2026
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 16, 2026
@gangwgr
gangwgr force-pushed the kmstokms branch 2 times, most recently from 04c8bab to 5af977b Compare July 16, 2026 13:27

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@go.mod`:
- Line 112: Update the go.opentelemetry.io/otel/sdk dependency from v1.40.0 to
v1.43.0 or later, then regenerate the module dependency metadata and verify the
dependency graph contains no remaining vulnerable v1.40.0 reference.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

Comment thread go.mod
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0 // indirect
go.opentelemetry.io/otel/metric v1.41.0 // indirect
go.opentelemetry.io/otel/sdk v1.40.0 // indirect

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

curl -sSf https://api.osv.dev/v1/query \
  -H 'Content-Type: application/json' \
  --data '{"package":{"name":"go.opentelemetry.io/otel/sdk","ecosystem":"Go"},"version":"v1.40.0"}' |
  jq .

Repository: openshift/cluster-authentication-operator

Length of output: 3980


Upgrade go.opentelemetry.io/otel/sdk to v1.43.0+
v1.40.0 is affected by GHSA-hfvc-g4fc-pqhx (PATH hijacking). Update the pin and regenerate dependency metadata so no vulnerable version remains in the graph.

🧰 Tools
🪛 OSV Scanner (2.4.0)

[HIGH] 112-112: go.opentelemetry.io/otel/sdk 1.40.0: opentelemetry-go: BSD kenv command not using absolute path enables PATH hijacking

(GHSA-hfvc-g4fc-pqhx)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@go.mod` at line 112, Update the go.opentelemetry.io/otel/sdk dependency from
v1.40.0 to v1.43.0 or later, then regenerate the module dependency metadata and
verify the dependency graph contains no remaining vulnerable v1.40.0 reference.

Source: Linters/SAST tools

@gangwgr
gangwgr force-pushed the kmstokms branch 2 times, most recently from 69ed7f0 to cac41fa Compare July 16, 2026 13:54
gangwgr added 2 commits July 16, 2026 19:38
Wrap KMS-to-KMS assert for the new helper signature, add Bookmark
methods for Indexer mocks, and fix Eventf float formatting.
@gangwgr

gangwgr commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

/pipeline required

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-agnostic
/test e2e-agnostic-upgrade
/test e2e-console-login
/test e2e-gcp-operator-disruptive
/test e2e-oidc
/test e2e-operator

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-operator-encryption-kms
/test e2e-aws-operator-encryption-kms-2
/test e2e-gcp-operator-encryption-perf
/test e2e-gcp-operator-encryption-rotation
/test e2e-oidc-techpreview
/test e2e-operator-encryption

@tjungblu

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 17, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage.

@tjungblu

Copy link
Copy Markdown
Contributor

we need to unblock ourselves here with the kube rebase

/label acknowledge-critical-fixes-only
/approve

@openshift-ci openshift-ci Bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label Jul 17, 2026
@openshift-ci

openshift-ci Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tjungblu

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 Jul 17, 2026
@gangwgr

gangwgr commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

/hold
till ci passed

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 17, 2026
@gangwgr

gangwgr commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

/unhold

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 17, 2026
@gangwgr gangwgr changed the title kms to kms key identifier check NO-JIRA: kms to kms key identifier check Jul 17, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@gangwgr: This pull request explicitly references no jira issue.

Details

In response to this:

kms to kms key identifier check

Summary by CodeRabbit

  • Tests
  • Strengthened end-to-end encryption validation for token-of-life data during migration by using KMS-specific checks.
  • Updated test indexer stubs to support additional sync/bookmark-related methods required by controller test scenarios.
  • Bug Fixes
  • Improved the formatting of emitted token max-age change values for more accurate event logs.
  • Chores
  • Refreshed module dependency versions and added a pinned library replacement to align with the updated module source.

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-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 17, 2026
@gangwgr

gangwgr commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

/verified by ci runs

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 17, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@gangwgr: This PR has been marked as verified by ci runs.

Details

In response to this:

/verified by ci runs

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.

@gangwgr

gangwgr commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

/retest required

@gangwgr

gangwgr commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-agnostic
/test e2e-agnostic-upgrade

@gangwgr

gangwgr commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-agnostic-upgrade

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 86b98f9 and 2 for PR HEAD 5ecc6bf in total

@gangwgr

gangwgr commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-agnostic

2 similar comments
@gangwgr

gangwgr commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-agnostic

@gangwgr

gangwgr commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-agnostic

@openshift-ci

openshift-ci Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@gangwgr: all tests passed!

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.

@openshift-merge-bot
openshift-merge-bot Bot merged commit def3591 into openshift:master Jul 20, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. 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. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants