Documentation
¶
Overview ¶
Package identity provides the AWSPrincipalTypeProvider interface and its implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAssumeRoleCredentialsCache ¶ added in v2.9.0
func GetAssumeRoleCredentialsCache(ctx context.Context, roleIdentityProvider *AWSRolePrincipalTypeProvider, optFns []func(*config.LoadOptions) error) (*aws.CredentialsCache, error)
GetAssumeRoleCredentialsCache will return the CredentialsCache of a given AWSRolePrincipalTypeProvider.
Types ¶
type AWSPrincipalTypeProvider ¶
type AWSPrincipalTypeProvider interface {
aws.CredentialsProvider
// Hash returns a unique hash of the data forming the V2 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, region string, log logger.Wrapper) *AWSRolePrincipalTypeProvider
NewAWSRolePrincipalTypeProvider will create a new AWSRolePrincipalTypeProvider from an AWSClusterRoleIdentity.
func (*AWSRolePrincipalTypeProvider) Hash ¶
func (p *AWSRolePrincipalTypeProvider) Hash() (string, error)
Hash returns the byte encoded AWSRolePrincipalTypeProvider.
func (*AWSRolePrincipalTypeProvider) Name ¶
func (p *AWSRolePrincipalTypeProvider) Name() string
Name returns the name of the AWSRolePrincipalTypeProvider.
func (*AWSRolePrincipalTypeProvider) Retrieve ¶
func (p *AWSRolePrincipalTypeProvider) Retrieve(ctx context.Context) (aws.Credentials, error)
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 ¶
func (p *AWSStaticPrincipalTypeProvider) Hash() (string, error)
Hash returns the byte encoded AWSStaticPrincipalTypeProvider.
func (*AWSStaticPrincipalTypeProvider) Name ¶
func (p *AWSStaticPrincipalTypeProvider) Name() string
Name returns the name of the AWSStaticPrincipalTypeProvider.
func (*AWSStaticPrincipalTypeProvider) Retrieve ¶
func (p *AWSStaticPrincipalTypeProvider) Retrieve(ctx context.Context) (aws.Credentials, error)
Retrieve returns the credential values for the AWSStaticPrincipalTypeProvider.