Skip to content

plugins/rest: add support for web identity for assume role credentials#8386

Open
tiagogviegas wants to merge 1 commit intoopen-policy-agent:mainfrom
tiagogviegas:main
Open

plugins/rest: add support for web identity for assume role credentials#8386
tiagogviegas wants to merge 1 commit intoopen-policy-agent:mainfrom
tiagogviegas:main

Conversation

@tiagogviegas
Copy link

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

@netlify
Copy link

netlify bot commented Feb 27, 2026

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit e62aa29
🔍 Latest deploy log https://app.netlify.com/projects/openpolicyagent/deploys/69a163233caf4b00081d67b8
😎 Deploy Preview https://deploy-preview-8386--openpolicyagent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Feb 27, 2026

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit 07c94cb
🔍 Latest deploy log https://app.netlify.com/projects/openpolicyagent/deploys/69a163b5d8030200089283a7
😎 Deploy Preview https://deploy-preview-8386--openpolicyagent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@tiagogviegas tiagogviegas changed the title feature: add support for web identity for assume role credentials plugins/rest: add support for web identity for assume role credentials Mar 2, 2026
@netlify
Copy link

netlify bot commented Mar 9, 2026

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit b80bfd8
🔍 Latest deploy log https://app.netlify.com/projects/openpolicyagent/deploys/69aed1aacf697a00083917e2
😎 Deploy Preview https://deploy-preview-8386--openpolicyagent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@tiagogviegas
Copy link
Author

@srenatus Can this PR be reviewed ?

Copy link
Contributor

@johanfylling johanfylling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Looks good to me 👍

assertEq(creds.AccessKey, ts.accessKey, t)
}

func TestAssumeRoleCredentialServiceUsingWebIdentityCredentialsProvider(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you also confirmed this works in your AWS setup?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@netlify
Copy link

netlify bot commented Mar 14, 2026

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit f366aec
🔍 Latest deploy log https://app.netlify.com/projects/openpolicyagent/deploys/69b5c9a7fdd2290008999977
😎 Deploy Preview https://deploy-preview-8386--openpolicyagent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AWS Signing - Allow Service Account (Web Identity) credentials for Assume Role Credentials

2 participants