credentials

package
v0.26.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 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"
)

Variables

This section is empty.

Functions

This section is empty.

Types

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 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 service principal 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 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