auth

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package auth provides different keychains used in imgpkg

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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

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 IAASKeychain

type IAASKeychain string

IAASKeychain defines the type IAAS Keychain names

var (
	// GKEKeychain GKE keychain name
	GKEKeychain IAASKeychain = "gke"
	// AKSKeychain AKS keychain name
	AKSKeychain IAASKeychain = "aks"
	// ECRKeychain ECR keychain name
	ECRKeychain IAASKeychain = "ecr"
	// GithubKeychain Github keychain name
	GithubKeychain IAASKeychain = "github"
)

type KeychainOpts

type KeychainOpts struct {
	Username                string
	Password                string
	Token                   string
	Anon                    bool
	EnableIaasAuthProviders bool
	ActiveKeychains         []IAASKeychain
}

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

type SingleAuthKeychain

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

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

func NewSingleAuthKeychain

func NewSingleAuthKeychain(auth regauthn.Authenticator) SingleAuthKeychain

NewSingleAuthKeychain Builds a SingleAuthKeychain struct

func (SingleAuthKeychain) Resolve

Resolve returns the same authentication for all images

Directories

Path Synopsis
Package credentialprovider contains helper functions used in auth package
Package credentialprovider contains helper functions used in auth package

Jump to

Keyboard shortcuts

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