Feat/registries auth mecanism#368
Closed
Leay15 wants to merge 28 commits intosuperradcompany:toks/fix-image-pullingfrom
Closed
Feat/registries auth mecanism#368Leay15 wants to merge 28 commits intosuperradcompany:toks/fix-image-pullingfrom
Leay15 wants to merge 28 commits intosuperradcompany:toks/fix-image-pullingfrom
Conversation
…d credential management
…registry authentication commands
…ring and managing credentials
…environment variable overrides
…te non-validation
…n registry credentials loading
…figuration and handler files
…uthentication files
…stry authentication files
Author
|
This PR was open by request on #364 |
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.
This pull request rebases on #351, it introduces robust registry authentication support for image pulling and pushing in the microsandbox CLI and core library.
It adds:
These improvements make private registry access easier, safer, and more consistent for users and developers.
Registry authentication and credential management
msb loginandmsb logoutfor storing and removing registry credentials locally, with detailed documentation and security notes indocs/references/cli.md.MSB_REGISTRY_TOKEN,MSB_REGISTRY_USERNAME,MSB_REGISTRY_PASSWORD, etc.), which take priority over stored credentials. [1] [2]~/.microsandbox/registry_auth.jsonwith guidance to restrict file permissions.Core authentication resolution logic
resolve_registry_auth,normalize_registry_host, andregistry_host_for_referencefunctions inmicrosandbox-core/lib/oci/auth.rs, providing unified logic for resolving registry authentication based on environment, stored credentials, and fallback to anonymous access.Integration into image pull/push workflow
Registry::newand image pull logic to accept and use resolved registry authentication, ensuring all image operations use correct credentials. [1] [2] [3] [4] [5]CLI argument and option enhancements
MicrosandboxSubcommandenum to supportloginandlogoutcommands with registry, username, password, token, and--alloptions.Utility and dependency updates
serde,serde_json,base64) for credential serialization and management inmicrosandbox-utils.These changes collectively enable secure, flexible, and user-friendly registry authentication for microsandbox image workflows.