identity

package
v2.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// #nosec
	NamespacedSecretName = "aso-credential"
	// #nosec
	FederatedTokenFilePath = "/var/run/secrets/tokens/azure-identity"
)

Variables

This section is empty.

Functions

func NewClientCertificateCredential

func NewClientCertificateCredential(tenantID, clientID string, clientCertificate, password []byte) (*azidentity.ClientCertificateCredential, error)

Types

type Credential

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

Credential describes a credential used to connect to Azure

func NewDefaultCredential

func NewDefaultCredential(tokenCred azcore.TokenCredential, namespace string, subscriptionID string) *Credential

func (*Credential) CredentialFrom

func (c *Credential) CredentialFrom() types.NamespacedName

func (*Credential) SecretsEqual

func (c *Credential) SecretsEqual(other *Credential) bool

func (*Credential) SubscriptionID

func (c *Credential) SubscriptionID() string

func (*Credential) TokenCredential

func (c *Credential) TokenCredential() azcore.TokenCredential

type CredentialProvider

type CredentialProvider interface {
	GetCredential(ctx context.Context, obj genruntime.MetaObject) (*Credential, error)
}

func NewCredentialProvider

func NewCredentialProvider(
	globalCredential *Credential,
	kubeClient kubeclient.Client,
	opts *CredentialProviderOptions,
) CredentialProvider

type CredentialProviderOptions added in v2.8.0

type CredentialProviderOptions struct {
	TokenProvider TokenCredentialProvider
}

type TokenCredentialProvider added in v2.8.0

type TokenCredentialProvider interface {
	NewClientSecretCredential(tenantID string, clientID string, clientSecret string, options *azidentity.ClientSecretCredentialOptions) (*azidentity.ClientSecretCredential, error)
	NewClientCertificateCredential(tenantID, clientID string, clientCertificate, password []byte) (*azidentity.ClientCertificateCredential, error)
	NewManagedIdentityCredential(options *azidentity.ManagedIdentityCredentialOptions) (*azidentity.ManagedIdentityCredential, error)
	NewWorkloadIdentityCredential(options *azidentity.WorkloadIdentityCredentialOptions) (*azidentity.WorkloadIdentityCredential, error)
}

func DefaultTokenCredentialProvider added in v2.8.0

func DefaultTokenCredentialProvider() TokenCredentialProvider

Jump to

Keyboard shortcuts

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