Skip to content

Direct OCI Registry Support with Authentication #34

@Virviil

Description

@Virviil

Description

Add direct OCI registry communication with oci:// URLs and comprehensive authentication support, bypassing the need for Docker CLI.

Current Limitation

Currently uses Docker CLI to pull images, which limits authentication options and adds dependency on Docker installation.

Tasks

  • Create src/sources/registry.rs for direct OCI registry communication
  • Implement support for oci:// URL scheme
  • Add --auth-bearer <token> flag for bearer token authentication
  • Add --auth-basic <user:pass> flag for basic authentication
  • Support various registry types (Docker Hub, Harbor, ECR, GCR, etc.)
  • Integration with existing source flag selection
  • Comprehensive error handling for registry operations
  • Add tests for registry authentication scenarios

Skills Required

  • Rust programming
  • HTTP authentication protocols
  • OCI registry protocols and specifications
  • Credential management and security
  • Network programming and error handling

Authentication Methods

Bearer Token

oci2git --auth-bearer <token> oci://registry.example.com/repo/image:tag

Basic Authentication

oci2git --auth-basic username:password oci://registry.example.com/repo/image:tag

Registry Support

  • Docker Hub: Standard Docker registry v2 API
  • Harbor: Private registry with OIDC/LDAP
  • AWS ECR: IAM-based authentication
  • Google GCR: Service account authentication
  • Azure ACR: Azure AD authentication
  • Generic: Any OCI-compliant registry

Technical Implementation

  • HTTP client with authentication headers
  • Registry API v2 protocol implementation
  • Manifest and blob downloading
  • Credential validation and error handling
  • Integration with existing source selection logic

Files to Create

  • src/sources/registry.rs - Main registry client
  • Authentication helper modules

Files to Modify

  • src/sources/mod.rs - Add registry source
  • CLI argument parsing - Add auth flags
  • Source selection logic

Expected Impact

Direct registry access without Docker dependency, better authentication support, and support for more registry types.

This is an advanced task perfect for Hacktoberfest! 🎃

Hacktoberfest 2025 🍂

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthacktoberfestIssues perfect for Hacktoberfest contributions

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions