Documentation ¶
Index ¶
Constants ¶
View Source
const ProviderName = "SSMEC2RoleProvider"
ProviderName is the role provider name that is returned with credentials
View Source
const RegistrationType = "EC2"
Variables ¶
This section is empty.
Functions ¶
func EmptyCredentials ¶
func EmptyCredentials() credentials.Value
EmptyCredentials returns empty SSMEC2RoleProvider credentials
Types ¶
type InstanceInfo ¶
InstanceInfo contains information about current EC2 instance
type SSMEC2RoleProvider ¶
type SSMEC2RoleProvider struct { credentials.Expiry // ExpiryWindow will allow the credentials to trigger refreshing prior to // the credentials actually expiring. This is beneficial so race conditions // with expiring credentials do not cause request to fail unexpectedly // due to ExpiredTokenException exceptions. // // So a ExpiryWindow of 10s would cause calls to IsExpired() to return true // 10 seconds before the credentials are actually expired. // // If ExpiryWindow is 0 or less it will be ignored. ExpiryWindow time.Duration Config *appconfig.SsmagentConfig Log log.T IMDSClient iirprovider.IEC2MdsSdkClient InstanceInfo *InstanceInfo // contains filtered or unexported fields }
SSMEC2RoleProvider sends requests for credentials to systems manager signed with AWS SigV4
func (*SSMEC2RoleProvider) Retrieve ¶
func (p *SSMEC2RoleProvider) Retrieve() (credentials.Value, error)
Retrieve retrieves EC2 credentials from Systems Manager
func (*SSMEC2RoleProvider) RetrieveWithContext ¶
func (p *SSMEC2RoleProvider) RetrieveWithContext(ctx context.Context) (credentials.Value, error)
Click to show internal directories.
Click to hide internal directories.