close
Skip to content

Support for registry (insecure / blocked) from registries.conf#541

Merged
jonesbusy merged 1 commit intooras-project:mainfrom
jonesbusy:feature/registries-blocking
Feb 14, 2026
Merged

Support for registry (insecure / blocked) from registries.conf#541
jonesbusy merged 1 commit intooras-project:mainfrom
jonesbusy:feature/registries-blocking

Conversation

@jonesbusy
Copy link
Copy Markdown
Collaborator

@jonesbusy jonesbusy commented Feb 13, 2026

Description

Support for registry (insecure / blocked) from registries.conf#541

Testing done

Automated tests (both unit and integration)

Submitter checklist

  • I have read and understood the CONTRIBUTING guide
  • I have run mvn license:update-file-header, mvn spotless:apply, pre-commit run -a, mvn clean install before opening the PR

@jonesbusy jonesbusy force-pushed the feature/registries-blocking branch from 762d095 to dd1e12d Compare February 14, 2026 07:00
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 14, 2026

Codecov Report

❌ Patch coverage is 87.23404% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.76%. Comparing base (5e0eb8a) to head (bcfaf65).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/main/java/land/oras/Registry.java 80.32% 2 Missing and 10 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #541      +/-   ##
============================================
+ Coverage     87.27%   87.76%   +0.49%     
- Complexity      712      749      +37     
============================================
  Files            42       42              
  Lines          2137     2207      +70     
  Branches        245      266      +21     
============================================
+ Hits           1865     1937      +72     
+ Misses          173      163      -10     
- Partials         99      107       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jonesbusy jonesbusy added the enhancement New feature or request label Feb 14, 2026
@jonesbusy jonesbusy force-pushed the feature/registries-blocking branch 10 times, most recently from 7c9242d to 371cf26 Compare February 14, 2026 12:02
@jonesbusy jonesbusy requested a review from Copilot February 14, 2026 13:01
@jonesbusy jonesbusy marked this pull request as ready for review February 14, 2026 13:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for honoring [[registry]] entries in registries.conf, enabling registries to be treated as blocked or insecure based on configuration, and expands the test suite to validate the behavior.

Changes:

  • Extend RegistriesConf to parse [[registry]] entries and expose isBlocked() / isInsecure() lookups.
  • Update Registry / ContainerRef behavior to enforce blocked registries and auto-switch to insecure mode when configured.
  • Add/adjust tests to validate blocked/insecure behavior via registries.conf and make several test classes package-private.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/main/java/land/oras/auth/RegistriesConf.java Adds registry config model + parsing and lookup helpers for blocked/insecure.
src/main/java/land/oras/Registry.java Enforces blocked checks and auto-insecure fallback for several registry operations; introduces asInsecure() and changes copy() signature.
src/main/java/land/oras/ContainerRef.java Adds isBlocked/isInsecure checks against registries.conf and a checkBlocked guard.
src/test/java/land/oras/auth/RegistryConfTest.java New unit test covering RegistryConfig blocked/insecure boolean semantics.
src/test/java/land/oras/RegistryWireMockTest.java Adds tests ensuring insecure=true from registries.conf is honored for tag/repo listing.
src/test/java/land/oras/RegistryTest.java Adds integration tests validating insecure registry behavior driven by registries.conf.
src/test/java/land/oras/ContainerRefTest.java Adds tests for blocked/insecure behavior derived from registries.conf.
src/test/java/land/oras/utils/TomlUtilsTest.java Makes test class package-private.
src/test/java/land/oras/utils/SupportedAlgorithmTest.java Makes test class package-private.
src/test/java/land/oras/utils/JsonUtilsTest.java Makes test class package-private.
src/test/java/land/oras/utils/DigestUtilsTest.java Makes test class package-private.
src/test/java/land/oras/utils/DescriptorTest.java Makes test class package-private.
src/test/java/land/oras/utils/ConstTest.java Makes test class package-private.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/java/land/oras/auth/RegistriesConf.java
Comment thread src/main/java/land/oras/Registry.java
Comment thread src/test/java/land/oras/auth/RegistryConfTest.java Outdated
Comment thread src/main/java/land/oras/Registry.java
Comment thread src/main/java/land/oras/auth/RegistriesConf.java
Signed-off-by: Valentin Delaye <jonesbusy@users.noreply.github.com>
@jonesbusy jonesbusy force-pushed the feature/registries-blocking branch from 371cf26 to bcfaf65 Compare February 14, 2026 13:31
@jonesbusy jonesbusy merged commit 9fff41e into oras-project:main Feb 14, 2026
8 checks passed
@jonesbusy jonesbusy deleted the feature/registries-blocking branch February 14, 2026 13:35
@jonesbusy jonesbusy self-assigned this Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants