azure

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: Apache-2.0 Imports: 19 Imported by: 3

Documentation

Index

Constants

View Source
const ProviderName = "azure"

ProviderName is the name of the Azure authentication provider.

Variables

This section is empty.

Functions

func NewTokenCredential added in v0.11.0

func NewTokenCredential(ctx context.Context, opts ...auth.Option) azcore.TokenCredential

NewTokenCredential creates a new token credential for the given options.

Types

type Implementation added in v0.11.0

type Implementation interface {
	NewDefaultAzureCredential(options *azidentity.DefaultAzureCredentialOptions) (azcore.TokenCredential, error)
	NewDefaultAzureCredentialWithoutShellOut(options *azidentity.DefaultAzureCredentialOptions) (azcore.TokenCredential, error)
	NewClientAssertionCredential(tenantID string, clientID string, getAssertion func(context.Context) (string, error), options *azidentity.ClientAssertionCredentialOptions) (azcore.TokenCredential, error)
	SendRequest(req *http.Request, client *http.Client) (*http.Response, error)
}

Implementation provides the required methods of the Azure libraries.

type Provider added in v0.11.0

type Provider struct{ Implementation }

Provider implements the auth.Provider interface for Azure authentication.

func (Provider) GetAudience added in v0.11.0

GetAudience implements auth.Provider.

func (Provider) GetIdentity added in v0.11.0

func (Provider) GetIdentity(serviceAccount corev1.ServiceAccount) (string, error)

GetIdentity implements auth.Provider.

func (Provider) GetName added in v0.11.0

func (Provider) GetName() string

GetName implements auth.Provider.

func (Provider) NewArtifactRegistryCredentials added in v0.12.0

func (p Provider) NewArtifactRegistryCredentials(ctx context.Context, registryURL string,
	accessToken auth.Token, opts ...auth.Option) (*auth.ArtifactRegistryCredentials, error)

NewArtifactRegistryCredentials implements auth.Provider.

func (Provider) NewControllerToken added in v0.12.0

func (p Provider) NewControllerToken(ctx context.Context, opts ...auth.Option) (auth.Token, error)

NewControllerToken implements auth.Provider.

func (Provider) NewTokenForServiceAccount added in v0.11.0

func (p Provider) NewTokenForServiceAccount(ctx context.Context, oidcToken string,
	serviceAccount corev1.ServiceAccount, opts ...auth.Option) (auth.Token, error)

NewTokenForServiceAccount implements auth.Provider.

func (Provider) ParseArtifactRepository added in v0.12.0

func (Provider) ParseArtifactRepository(artifactRepository string) (string, error)

ParseArtifactRepository implements auth.Provider. ParseArtifactRepository returns the ACR registry URL.

type Token added in v0.11.0

type Token struct{ azcore.AccessToken }

Token is the Azure token.

func (*Token) Credential added in v0.11.0

func (t *Token) Credential() azcore.TokenCredential

Credential gets a token credential for the token to use with Azure libraries.

func (*Token) GetDuration added in v0.11.0

func (t *Token) GetDuration() time.Duration

GetDuration implements auth.Token.

Jump to

Keyboard shortcuts

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