registryauth

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package registryauth signs short-lived Distribution registry access tokens.

Index

Constants

View Source
const Issuer = "mcp-runtime-registry-auth"
View Source
const Lifetime = 5 * time.Minute
View Source
const Service = "mcp-runtime-registry"

Variables

This section is empty.

Functions

func GenerateMaterial

func GenerateMaterial() ([]byte, []byte, error)

func SharedPullRepositories

func SharedPullRepositories() []string

SharedPullRepositories are the platform-owned repositories every namespace's node pull credential may read, in addition to the repositories the namespace already uses: the gateway sidecar image, and the doctor smoke image that `cluster doctor` and `cluster diagnostics` run inside tenant namespaces. Without the smoke image those checks are forbidden by the registry broker on installs that enforce scoped pull credentials.

Types

type Access

type Access struct {
	Type    string   `json:"type"`
	Name    string   `json:"name"`
	Actions []string `json:"actions"`
}

type PullScope

type PullScope struct {
	Namespace    string   `json:"namespace"`
	Repositories []string `json:"repositories"`
	Prefixes     []string `json:"prefixes"`
}

PullScope limits a node credential independently of platform API privileges.

func (PullScope) Allows

func (s PullScope) Allows(repo string) bool

type Signer

type Signer struct {
	// contains filtered or unexported fields
}

func NewSigner

func NewSigner(keyPEM, certPEM []byte) (*Signer, error)

func (*Signer) Sign

func (s *Signer) Sign(subject string, access []Access) (string, error)

func (*Signer) VerifyAccess

func (s *Signer) VerifyAccess(raw string) ([]Access, bool)

VerifyAccess accepts only this registry's RS256 tokens and exposes no raw parsing errors, which may otherwise include credential material.

Jump to

Keyboard shortcuts

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