Support for registry (insecure / blocked) from registries.conf#541
Merged
jonesbusy merged 1 commit intooras-project:mainfrom Feb 14, 2026
Merged
Conversation
762d095 to
dd1e12d
Compare
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
7c9242d to
371cf26
Compare
There was a problem hiding this comment.
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
RegistriesConfto parse[[registry]]entries and exposeisBlocked()/isInsecure()lookups. - Update
Registry/ContainerRefbehavior to enforce blocked registries and auto-switch to insecure mode when configured. - Add/adjust tests to validate blocked/insecure behavior via
registries.confand 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.
Signed-off-by: Valentin Delaye <jonesbusy@users.noreply.github.com>
371cf26 to
bcfaf65
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Support for registry (insecure / blocked) from registries.conf#541
Testing done
Automated tests (both unit and integration)
Submitter checklist
mvn license:update-file-header,mvn spotless:apply,pre-commit run -a,mvn clean installbefore opening the PR