acrhelper

package module
v0.0.0-...-6094f4f Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: MIT Imports: 9 Imported by: 0

README

Docker Credential Helper for Azure Container Registry

This is a small project that tries to implement the docker-credential-helpers credentials.Helper interface without using the Microsoft SDKs but rather the manicminer/hamilton Go SDK for Microsoft Graph.

This project is currently using a fork of hamilton and waiting for the following two PRs to merge:

Alternatives:

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewACRHelper

func NewACRHelper(setters ...Option) credentials.Helper

NewACRHelper will return a credentials.Helper that has implemented Get() for Azure Container Registry

Types

type ACRHelper

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

func (ACRHelper) Add

Add appends credentials to the store. NOT implemented.

func (ACRHelper) Delete

func (ACRHelper) Delete(_ string) error

Delete removes credentials from the store. NOT implemented.

func (ACRHelper) Get

func (acr ACRHelper) Get(serverURL string) (string, string, error)

Get retrieves credentials from the store. It returns username and secret as strings.

func (ACRHelper) List

func (acr ACRHelper) List() (map[string]string, error)

List returns the stored serverURLs and their associated usernames. NOT implemented.

type Option

type Option func(*Options)

Option is a function to set Options

func WithCacheAuthorizerAtConstruction

func WithCacheAuthorizerAtConstruction(opt bool) Option

WithCacheAuthorizerAtConstruction will, if enabled, try to create an Azure AD authorizer at construction (`NewACRHelper()`) Default: true

func WithClientCertPassword

func WithClientCertPassword(opt string) Option

WithClientCertPassword will set the client certificate password to use for requesting Azure AD tokens Default (environment variable): AZURE_CERTIFICATE_PASSWORD

func WithClientCertPath

func WithClientCertPath(opt string) Option

WithClientCertPath will set the client certificate path to use for requesting Azure AD tokens Default (environment variable): AZURE_CERTIFICATE_PATH

func WithClientID

func WithClientID(opt string) Option

WithClientID will set the client id to use for requesting Azure AD tokens Default (environment variable): AZURE_CLIENT_ID

func WithClientSecret

func WithClientSecret(opt string) Option

WithClientSecret will set the client secret to use for requesting Azure AD tokens Default (environment variable): AZURE_CLIENT_SECRET

func WithEnvironment

func WithEnvironment(opt *environments.Environment) Option

WithEnvironment will set the Azure environment to use Default: &environments.Global

func WithGitHubRequestToken

func WithGitHubRequestToken(opt string) Option

WithGitHubRequestToken will set the GitHub request token to use for requesting Azure AD tokens Default (environment variable): ACTIONS_ID_TOKEN_REQUEST_TOKEN

func WithGitHubRequestTokenURL

func WithGitHubRequestTokenURL(opt string) Option

WithGitHubRequestTokenURL will set the GitHub request token URL to use for requesting Azure AD tokens Default (environment variable): ACTIONS_ID_TOKEN_REQUEST_URL

func WithTenantID

func WithTenantID(opt string) Option

WithTenantID will set the tenant id to use for requesting Azure AD tokens Default (environment variable): AZURE_TENANT_ID

func WithTimeout

func WithTimeout(opt time.Duration) Option

WithTimeout will set the timeout for contexts created inside of ACRHelper Default: 10 seconds

func WithTokenVersion

func WithTokenVersion(opt auth.TokenVersion) Option

WithTokenVersion will set the Azure AD token version to request Default: auth.TokenVersion2

type Options

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

Options for the ACRHelper

Jump to

Keyboard shortcuts

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