Documentation ¶
Overview ¶
Package identity provides the AWSPrincipalTypeProvider interface and its implementations.
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, 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) IsExpired ¶
func (p *AWSRolePrincipalTypeProvider) IsExpired() bool
IsExpired checks the expiration state of the AWSRolePrincipalTypeProvider.
func (*AWSRolePrincipalTypeProvider) Name ¶
func (p *AWSRolePrincipalTypeProvider) Name() string
Name returns the name of the AWSRolePrincipalTypeProvider.
func (*AWSRolePrincipalTypeProvider) Retrieve ¶
func (p *AWSRolePrincipalTypeProvider) Retrieve() (credentials.Value, 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) IsExpired ¶
func (p *AWSStaticPrincipalTypeProvider) IsExpired() bool
IsExpired checks the expiration state of the AWSStaticPrincipalTypeProvider.
func (*AWSStaticPrincipalTypeProvider) Name ¶
func (p *AWSStaticPrincipalTypeProvider) Name() string
Name returns the name of the AWSStaticPrincipalTypeProvider.
func (*AWSStaticPrincipalTypeProvider) Retrieve ¶
func (p *AWSStaticPrincipalTypeProvider) Retrieve() (credentials.Value, error)
Retrieve returns the credential values for the AWSStaticPrincipalTypeProvider.