identity

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAssumeRoleCredentials

func GetAssumeRoleCredentials(roleIdentityProvider *AWSRolePrincipalTypeProvider, awsConfig *aws.Config) *credentials.Credentials

GetAssumeRoleCredentials will return the Credentials of a given AWSRolePrincipalTypeProvider.

Types

type AWSPrincipalTypeProvider

type AWSPrincipalTypeProvider interface {
	credentials.Provider
	// Hash returns a unique hash of the data forming the credentials
	// for this Principal
	Hash() (string, error)
	Name() string
}

AWSPrincipalTypeProvider defines the interface for AWS Principal Type Provider.

type AWSRolePrincipalTypeProvider

type AWSRolePrincipalTypeProvider struct {
	Principal *infrav1.AWSClusterRoleIdentity
	// contains filtered or unexported fields
}

AWSRolePrincipalTypeProvider defines the specs for a AWSPrincipalTypeProvider with a role.

func NewAWSRolePrincipalTypeProvider

func NewAWSRolePrincipalTypeProvider(identity *infrav1.AWSClusterRoleIdentity, sourceProvider *AWSPrincipalTypeProvider, log logger.Wrapper) *AWSRolePrincipalTypeProvider

NewAWSRolePrincipalTypeProvider will create a new AWSRolePrincipalTypeProvider from an AWSClusterRoleIdentity.

func (*AWSRolePrincipalTypeProvider) Hash

Hash returns the byte encoded AWSRolePrincipalTypeProvider.

func (*AWSRolePrincipalTypeProvider) IsExpired

func (p *AWSRolePrincipalTypeProvider) IsExpired() bool

IsExpired checks the expiration state of the AWSRolePrincipalTypeProvider.

func (*AWSRolePrincipalTypeProvider) Name

Name returns the name of the AWSRolePrincipalTypeProvider.

func (*AWSRolePrincipalTypeProvider) Retrieve

Retrieve returns the credential values for the AWSRolePrincipalTypeProvider.

type AWSStaticPrincipalTypeProvider

type AWSStaticPrincipalTypeProvider struct {
	Principal *infrav1.AWSClusterStaticIdentity

	// these are for tests :/
	AccessKeyID     string
	SecretAccessKey string
	SessionToken    string
	// contains filtered or unexported fields
}

AWSStaticPrincipalTypeProvider defines the specs for a static AWSPrincipalTypeProvider.

func NewAWSStaticPrincipalTypeProvider

func NewAWSStaticPrincipalTypeProvider(identity *infrav1.AWSClusterStaticIdentity, secret *corev1.Secret) *AWSStaticPrincipalTypeProvider

NewAWSStaticPrincipalTypeProvider will create a new AWSStaticPrincipalTypeProvider from a given AWSClusterStaticIdentity.

func (*AWSStaticPrincipalTypeProvider) Hash

Hash returns the byte encoded AWSStaticPrincipalTypeProvider.

func (*AWSStaticPrincipalTypeProvider) IsExpired

func (p *AWSStaticPrincipalTypeProvider) IsExpired() bool

IsExpired checks the expiration state of the AWSStaticPrincipalTypeProvider.

func (*AWSStaticPrincipalTypeProvider) Name

Name returns the name of the AWSStaticPrincipalTypeProvider.

func (*AWSStaticPrincipalTypeProvider) Retrieve

Retrieve returns the credential values for the AWSStaticPrincipalTypeProvider.

Jump to

Keyboard shortcuts

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