auth

package
v0.31.4-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package auth contains authentication methods to talk to the registry

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIaasKeychain

func NewIaasKeychain(ctx context.Context, environFunc func() []string) (authn.Keychain, error)

NewIaasKeychain implements an authn.Keychain interface by using credentials provided by the iaas metadata services

Types

type CustomRegistryKeychain

type CustomRegistryKeychain struct {
	Opts KeychainOpts
}

CustomRegistryKeychain implements an authn.Keychain interface by using credentials provided by imgpkg's auth options

func (CustomRegistryKeychain) Resolve

Resolve looks up the most appropriate credential for the specified target.

type EnvKeychain

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

EnvKeychain implements an authn.Keychain interface by using credentials provided by imgpkg's auth environment vars

func NewEnvKeychain added in v0.23.0

func NewEnvKeychain(environFunc func() []string) *EnvKeychain

NewEnvKeychain builder for Environment Keychain

func (*EnvKeychain) Resolve

func (k *EnvKeychain) Resolve(target regauthn.Resource) (regauthn.Authenticator, error)

Resolve looks up the most appropriate credential for the specified target.

type KeychainOpts

type KeychainOpts struct {
	Username string
	Password string
	Token    string
	Anon     bool
}

KeychainOpts Contains credentials (passed down via flags) used by custom keychain to auth with a registry

type SingleAuthKeychain added in v0.23.0

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

SingleAuthKeychain This Keychain will always provide the same authentication for all images

func NewSingleAuthKeychain added in v0.23.0

func NewSingleAuthKeychain(auth regauthn.Authenticator) SingleAuthKeychain

NewSingleAuthKeychain Builds a SingleAuthKeychain struct

func (SingleAuthKeychain) Resolve added in v0.23.0

Resolve returns the same authentication for all images

Jump to

Keyboard shortcuts

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