File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -15,12 +15,13 @@ locals {
1515 (local. identity_account_name ) = var.aws_teams_rbac[* ].aws_team
1616 }, {
1717 (local. this_account_name ) = var.aws_team_roles_rbac[* ].aws_team_role
18- root = [" *" ]
1918 })
2019
2120 aws_teams_auth = [for role in var . aws_teams_rbac : {
22- rolearn = module.iam_arns.principals_map[local.identity_account_name][role.aws_team]
23- username = format (" %s-%s" , local. identity_account_name , role. aws_team )
21+ rolearn = module.iam_arns.principals_map[local.identity_account_name][role.aws_team]
22+ # Include session name in the username for auditing purposes.
23+ # See https://aws.github.io/aws-eks-best-practices/security/docs/iam/#use-iam-roles-when-multiple-users-need-identical-access-to-the-cluster
24+ username = format (" %s-%s::{{SessionName}}" , local. identity_account_name , role. aws_team )
2425 groups = role.groups
2526 }]
2627
You can’t perform that action at this time.
0 commit comments