Skip to content

Commit

Permalink
fix alb role trust policy to match wildcard names (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
Berk Dehrioglu authored Apr 26, 2024
1 parent 5572db8 commit 0a6e51d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Changed service account matching `StringLike` to accommodate wildcard full names.

## [0.22.0] - 2024-04-15

### Changed
Expand Down
2 changes: 1 addition & 1 deletion controllers/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ var ALBControllerRoleInfo = RoleInfo{
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"StringLike": {
"irsa.test.gaws.gigantic.io:sub": "system:serviceaccount:*:aws-load-balancer-controller"
}
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/iam/route53_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const albControllerTrustIdentityPolicyIRSA = `{
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"StringLike": {
"{{.CloudFrontDomain}}:sub": "system:serviceaccount:*:{{.ServiceAccount}}"
}
}
Expand All @@ -54,7 +54,7 @@ const albControllerTrustIdentityPolicyIRSA = `{
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"StringLike": {
"{{.AdditionalCloudFrontDomain}}:sub": "system:serviceaccount:*:{{.ServiceAccount}}"
}
}
Expand Down

0 comments on commit 0a6e51d

Please sign in to comment.