Add Docker config authentication for OCI registry pulls#565
Closed
Add Docker config authentication for OCI registry pulls#565
Conversation
Copilot
AI
changed the title
[WIP] Add OCI authentication infrastructure and Docker config support
Add Docker config authentication for OCI registry pulls
Nov 12, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds Docker config authentication support for OCI registry pulls, enabling Wassette to access private registries. The implementation reads credentials from standard Docker config locations and falls back gracefully to anonymous access when credentials are not found.
Key Changes:
- New
oci_authmodule withget_registry_auth()function that reads Docker config files - Updated OCI pull flow to use authentication for both single-layer and multi-layer artifacts
- Added 5 unit tests for config parsing, credential extraction, and fallback behavior
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| crates/wassette/src/oci_auth.rs | New authentication module implementing Docker config parsing with docker_credential crate |
| crates/wassette/src/loader.rs | Updated to call get_registry_auth() before OCI pulls and pass auth to both pull paths |
| crates/wassette/src/oci_multi_layer.rs | All functions updated to accept auth parameter instead of hardcoded Anonymous |
| crates/wassette/src/lib.rs | Exposed oci_auth module as public API |
| crates/wassette/Cargo.toml | Added docker_credential 1.3 dependency |
| tests/oci_integration_test.rs | Updated test to pass auth parameter to multi-layer pull function |
| Cargo.lock | Dependency lock file updated with new docker_credential crate |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0020a6a to
f7fb64f
Compare
- Add docker_credential dependency to wassette crate - Create new oci_auth module with get_registry_auth() function - Update loader.rs to use authentication for OCI pulls - Update oci_multi_layer.rs to accept and use auth parameter - Add comprehensive unit tests for Docker config parsing - Handle missing config files gracefully (fallback to Anonymous) - Support both single-layer and multi-layer OCI artifact authentication Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
f7fb64f to
db17c1e
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.
Wassette hardcoded
RegistryAuth::Anonymousfor all OCI registry pulls, preventing access to private registries.Changes
New
oci_authmodule (crates/wassette/src/oci_auth.rs)get_registry_auth()reads Docker config from standard locations ($DOCKER_CONFIG/config.json,~/.docker/config.json)docker_credentialcrate for credential extractionAnonymouswhen config missing or credentials not foundUpdated OCI pull flow
loader.rs: Callsget_registry_auth()before pulls, passes auth to both single-layer (oci-wasm) and multi-layer pathsoci_multi_layer.rs: All functions now accept&RegistryAuthparameterExample usage:
Testing
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
registry.mcpsearchtool.com/home/REDACTED/work/wassette/wassette/target/debug/deps/oci_integration_test-644033edc17adf35(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.