registryauth

package
v0.2.0-beta.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package registryauth carries short-lived registry authorization between Gantry's mirror, peer, coordination, and origin request boundaries.

Index

Constants

View Source
const MaxAuthorizationBytes = 64 * 1024

MaxAuthorizationBytes bounds delegated credentials accepted from containerd or another Gantry peer. Registry credentials are normally a few KiB.

Variables

This section is empty.

Functions

func Authorization

func Authorization(ctx context.Context) string

Authorization returns the delegated registry Authorization header in ctx.

func Detach

func Detach(ctx context.Context) context.Context

Detach returns a background context containing only the delegated registry authorization. It is used for bounded work that must outlive the inbound mirror or coordination request without retaining unrelated request values.

func Normalize

func Normalize(value string) string

Normalize validates and normalizes an Authorization header value for delegation. Basic and Bearer are supported; other schemes are rejected. The returned value is empty for an absent, malformed, unsupported, or oversized header.

func WithAuthorization

func WithAuthorization(ctx context.Context, authorization string) context.Context

WithAuthorization returns a child context carrying a normalized registry authorization value. Empty or invalid values leave ctx unchanged.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL