Skip to content

Comments

OCPBUGS-72408: change allow-all allowedregistries to deny-all with sane exceptions#607

Open
dusk125 wants to merge 1 commit intoopenshift:mainfrom
dusk125:imagestreamimport
Open

OCPBUGS-72408: change allow-all allowedregistries to deny-all with sane exceptions#607
dusk125 wants to merge 1 commit intoopenshift:mainfrom
dusk125:imagestreamimport

Conversation

@dusk125
Copy link

@dusk125 dusk125 commented Feb 20, 2026

Change the default behavior of an empty/unspecified AllowRegistriesForImport from allow-all to deny-all.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 20, 2026
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Feb 20, 2026
@openshift-ci-robot
Copy link

@dusk125: This pull request references Jira Issue OCPBUGS-72408, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @xiuwang

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In 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.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Feb 20, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 20, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dusk125
Once this PR has been reviewed and has the lgtm label, please assign ricardomaraschini for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

Walkthrough

This pull request removes an unused context import and eliminates a fallback mechanism in the apiserver that previously defaulted to whitelisting all registries when the allowed registries list was empty. After these changes, the whitelister will be nil in that scenario instead of providing a default "allow all" implementation.

Changes

Cohort / File(s) Summary
API Server Configuration
pkg/image/apiserver/apiserver.go
Removed unused context import and removed fallback initialization of whitelister in newV1RESTStorage, so when AllowedRegistriesForImport is empty the whitelister remains nil instead of defaulting to "whitelist all".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Stable And Deterministic Test Names ✅ Passed Pull request modifies only non-test file; no test files changed so no test names to evaluate.
Test Structure And Quality ✅ Passed PR does not add or modify any test files; change is limited to production code only.
Title check ✅ Passed The title accurately reflects the main change: shifting the default behavior of AllowedRegistriesForImport from allow-all to deny-all, which is the primary objective stated in the PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@openshift-ci-robot
Copy link

@dusk125: This pull request references Jira Issue OCPBUGS-72408, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @xiuwang

Details

In response to this:

Summary by CodeRabbit

  • Chores

  • Removed unused import from API server.

  • Refactor

  • Modified default registry whitelist behavior when no specific registries are configured, changing from a permissive default to an uninitialized state.

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.

@dusk125
Copy link
Author

dusk125 commented Feb 20, 2026

openshift/cluster-openshift-apiserver-operator#651 would need to merge first so that we don't deny everything and break ourselves.
/hold

@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 Feb 20, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 20, 2026

@dusk125: 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-aws-ovn 7f30dae link true /test e2e-aws-ovn

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.

@dusk125
Copy link
Author

dusk125 commented Feb 20, 2026

This failure proves that the deny-all is working properly and that the defaults in the linked operator PR will be necessary: link.

@dusk125
Copy link
Author

dusk125 commented Feb 20, 2026

/testwith ?

@dusk125
Copy link
Author

dusk125 commented Feb 20, 2026

/testwith openshift/openshift-apiserver/main/e2e-aws-ovn openshift/cluster-openshift-apiserver-operator#651

@dusk125 dusk125 changed the title WIP: OCPBUGS-72408: change allow-all allowedregistries to deny-all with sane exceptions OCPBUGS-72408: change allow-all allowedregistries to deny-all with sane exceptions Feb 20, 2026
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 20, 2026
@dusk125
Copy link
Author

dusk125 commented Feb 20, 2026

/testwith openshift/openshift-apiserver/main/e2e-aws-ovn openshift/cluster-openshift-apiserver-operator#651

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

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants