aws auth displayName (#14954)

* set displayName to include RoleSessionName
This commit is contained in:
Jose Estrada 2022-04-08 14:37:49 -07:00 committed by GitHub
parent a0dbb30757
commit 103dd2ad0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -1407,6 +1407,11 @@ func (b *backend) pathLoginUpdateIam(ctx context.Context, req *logical.Request,
Name: identityAlias,
},
}
if entity.Type == "assumed-role" {
auth.DisplayName = strings.Join([]string{entity.FriendlyName, entity.SessionInfo}, "/")
}
roleEntry.PopulateTokenAuth(auth)
if err := identityConfigEntry.IAMAuthMetadataHandler.PopulateDesiredMetadata(auth, map[string]string{
"client_arn": callerID.Arn,

3
changelog/14954.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:change
auth/aws: Add RoleSession to DisplayName when using assumeRole for authentication
```