credentials

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AzureCloud represents the public cloud plane name for UCP.
	AzureCloud = "azurecloud"

	// AWSPublic represents the aws public cloud plane name for UCP.
	AWSPublic = "aws"

	// AzureServicePrincipalCredentialKind represents the kind of Azure service principal credential.
	AzureServicePrincipalCredentialKind = ucp_dm.AzureServicePrincipalCredentialKind

	// AzureWorkloadIdentityCredentialKind represents the kind of Azure workload identity credential.
	AzureWorkloadIdentityCredentialKind = ucp_dm.AzureWorkloadIdentityCredentialKind

	// AWSAccessKeyCredentialKind represents the kind of AWS access key credential.
	AWSAccessKeyCredentialKind = ucp_dm.AWSAccessKeyCredentialKind

	// AWSIRSACredentialKind represents the kind of AWS IRSA credential.
	AWSIRSACredentialKind = ucp_dm.AWSIRSACredentialKind
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSAccessKeyCredential added in v0.36.0

type AWSAccessKeyCredential = ucp_dm.AWSAccessKeyCredentialProperties

AWSAccessKeyCredential represents a credential for AWS access key.

type AWSCredential

type AWSCredential = ucp_dm.AWSCredentialProperties

AWSCredential represents a credential for AWS IAM.

type AWSCredentialProvider

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

AWSCredentialProvider is UCP credential provider for Azure.

func NewAWSCredentialProvider

func NewAWSCredentialProvider(provider *provider.SecretProvider, ucpConn sdk.Connection, credential azcore.TokenCredential) (*AWSCredentialProvider, error)

NewAWSCredentialProvider creates a new AWSCredentialProvider struct using the given SecretProvider, UCP connection and TokenCredential, and returns it or an error if one occurs.

func (*AWSCredentialProvider) Fetch

func (p *AWSCredentialProvider) Fetch(ctx context.Context, planeName, name string) (*AWSCredential, error)

Fetch fetches the AWS IAM access keys from UCP and then from an internal storage (e.g. Kubernetes secret store). It returns an AWSCredential struct or an error if the fetch fails.

type AWSIRSACredential added in v0.36.0

type AWSIRSACredential = ucp_dm.AWSIRSACredentialProperties

AWSIRSACredential represents a RoleARN for AWS IRSA.

type AzureCredential

type AzureCredential = ucp_dm.AzureCredentialProperties

AzureCredential represents a credential for Azure AD.

type AzureCredentialProvider

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

AzureCredentialProvider is UCP credential provider for Azure.

func NewAzureCredentialProvider

func NewAzureCredentialProvider(provider *provider.SecretProvider, ucpConn sdk.Connection, credential azcore.TokenCredential) (*AzureCredentialProvider, error)

NewAzureCredentialProvider creates a new AzureCredentialProvider by creating a new AzureCredentialClient with the given credential and connection, and returns an error if one occurs.

func (*AzureCredentialProvider) Fetch

func (p *AzureCredentialProvider) Fetch(ctx context.Context, planeName, name string) (*AzureCredential, error)

Fetch fetches the Azure credentials from UCP and the internal storage (e.g. Kubernetes secret store) and returns an AzureCredential struct. If an error occurs, an error is returned.

type AzureServicePrincipalCredential added in v0.35.0

type AzureServicePrincipalCredential = ucp_dm.AzureServicePrincipalCredentialProperties

AzureServicePrincipalCredential represents a credential for Azure AD service principal.

type AzureWorkloadIdentityCredential added in v0.35.0

type AzureWorkloadIdentityCredential = ucp_dm.AzureWorkloadIdentityCredentialProperties

AzureWorkloadIdentityCredential represents a credential for Azure AD workload identity.

type CredentialProvider

type CredentialProvider[T any] interface {
	// Fetch gets the credentials from secret storage.
	Fetch(ctx context.Context, planeName, name string) (*T, error)
}

CredentialProvider is an UCP credential provider interface.

Jump to

Keyboard shortcuts

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