1
0
Fork 0
mirror of https://github.com/imjasonh/krust synced 2026-07-08 06:45:32 +00:00

feat: Add credential helper support to oci-distribution

- Move Docker config parsing and credential helper execution from krust
- Add automatic auth resolution methods (*_auto) to the client
- Support standard Docker config locations and environment variables
- Add comprehensive tests and examples
- Simplify krust to use the new credential helper functionality
This commit is contained in:
Jason Hall 2025-06-08 10:30:41 -04:00
parent 4af701e617
commit a6ae83c3b2
Failed to extract signature
12 changed files with 887 additions and 15 deletions

11
src/auth/simple.rs Normal file
View file

@ -0,0 +1,11 @@
//! Simple authentication wrapper using oci-distribution's credential helper
use anyhow::Result;
use oci_distribution::credential_helper::resolve_docker_auth;
use oci_distribution::secrets::RegistryAuth;
/// Resolve authentication for a given resource using Docker config and credential helpers
pub fn resolve_auth(resource: &str) -> Result<RegistryAuth> {
resolve_docker_auth(resource)
.map_err(|e| anyhow::anyhow!("Failed to resolve auth: {}", e))
}