Fix wrong `credStore` format by jonesbusy · Pull Request #456 · oras-project/oras-java

Pull Request Overview

This PR fixes the incorrect format of credsStore in the Docker/Podman configuration file handling. Previously, credsStore was incorrectly treated as a Map<String, String> when it should be a simple String according to the Docker config specification.

Key Changes:

  • Changed credsStore type from Map<String, String> to String in the ConfigFile record
  • Implemented fallback logic to use credsStore as an all-registries credential helper when no registry-specific helper is found
  • Added test coverage for the credsStore field and fallback behavior

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/main/java/land/oras/auth/AuthStore.java Updated ConfigFile record to treat credsStore as a String; added ALL_REGISTRIES_HELPER constant and fallback logic to use the all-registries credential helper
src/test/java/land/oras/auth/AuthStoreTest.java Added credsStore field to test configurations; added new test to verify null handling when all-registries helper is not found

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