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 76ed511e18
commit 5f4e32e2e3
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
```