plugins/rest: add support for web identity for assume role credentials#8386
plugins/rest: add support for web identity for assume role credentials#8386tiagogviegas wants to merge 1 commit intoopen-policy-agent:mainfrom
Conversation
✅ Deploy Preview for openpolicyagent ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for openpolicyagent ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for openpolicyagent ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@srenatus Can this PR be reviewed ? |
johanfylling
left a comment
There was a problem hiding this comment.
Thank you!
Looks good to me 👍
| assertEq(creds.AccessKey, ts.accessKey, t) | ||
| } | ||
|
|
||
| func TestAssumeRoleCredentialServiceUsingWebIdentityCredentialsProvider(t *testing.T) { |
There was a problem hiding this comment.
Have you also confirmed this works in your AWS setup?
There was a problem hiding this comment.
Tested it now. Had to do a minor fix for the STS path and also include the role_arn and web_identity_token_file as parameters on the config yml. Confirmed working.
Added support for web identity credentials in the AWS signing plugin. This allows users to configure the plugin to use a web identity token file for authentication when assuming a role, which is particularly useful in environments like Kubernetes where service accounts can be used to provide AWS credentials. Signed-off-by: Tiago Viegas <tiago.viegas@siemens.com>
✅ Deploy Preview for openpolicyagent ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Why the changes in this PR are needed?
On kubernetes it's common to use the service account to retrieve AWS credentials, which is currently supported by the web identity credentials. However if access to another AWS account is needed (cross IAM) the current assume role credentials doesn't support this.
What are the changes in this PR?
Add support for web identity credentials for the assume role credentials
Notes to assist PR review:
Closes #8378
Further comments:
Cross Account IAM