@@ -9,7 +9,7 @@ to refresh the credentials will be synchronized. But, the SDK is unable to
99ensure synchronous usage of the AssumeRoleProvider if the value is shared
1010between multiple Credentials, Sessions or service clients.
1111
12- Assume Role
12+ # Assume Role
1313
1414To assume an IAM role using STS with the SDK you can create a new Credentials
1515with the SDKs's stscreds package.
@@ -27,7 +27,7 @@ with the SDKs's stscreds package.
2727// from assumed role.
2828svc := s3.New(sess, &aws.Config{Credentials: creds})
2929
30- Assume Role with static MFA Token
30+ # Assume Role with static MFA Token
3131
3232To assume an IAM role with a MFA token you can either specify a MFA token code
3333directly or provide a function to prompt the user each time the credentials
@@ -49,7 +49,7 @@ credentials.
4949// from assumed role.
5050svc := s3.New(sess, &aws.Config{Credentials: creds})
5151
52- Assume Role with MFA Token Provider
52+ # Assume Role with MFA Token Provider
5353
5454To assume an IAM role with MFA for longer running tasks where the credentials
5555may need to be refreshed setting the TokenProvider field of AssumeRoleProvider
@@ -74,7 +74,6 @@ single Credentials with an AssumeRoleProvider can be shared safely.
7474// Create service client value configured for credentials
7575// from assumed role.
7676svc := s3.New(sess, &aws.Config{Credentials: creds})
77-
7877*/
7978package stscreds
8079
@@ -199,6 +198,10 @@ type AssumeRoleProvider struct {
199198// or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).
200199SerialNumber * string
201200
201+ // The SourceIdentity which is used to identity a persistent identity through the whole session.
202+ // For more details see https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
203+ SourceIdentity * string
204+
202205// The value provided by the MFA device, if the trust policy of the role being
203206// assumed requires MFA (that is, if the policy includes a condition that tests
204207// for MFA). If the role being assumed requires MFA and if the TokenCode value
@@ -320,6 +323,7 @@ func (p *AssumeRoleProvider) RetrieveWithContext(ctx credentials.Context) (crede
320323Tags : p .Tags ,
321324PolicyArns : p .PolicyArns ,
322325TransitiveTagKeys : p .TransitiveTagKeys ,
326+ SourceIdentity : p .SourceIdentity ,
323327}
324328if p .Policy != nil {
325329input .Policy = p .Policy
0 commit comments