Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Incorrect token audience #291

Closed
jatinmehrotra opened this issue Oct 19, 2021 · 2 comments
Closed

Error: Incorrect token audience #291

jatinmehrotra opened this issue Oct 19, 2021 · 2 comments

Comments

@jatinmehrotra
Copy link

Till yesterday the actions was working perfectly well, but from today I am seeing this error. Is it due to the latest commit?

- name: Configure AWS Credentials
        uses: aws-actions/configure-aws-credentials@master
        with:
          aws-region: ap-southeast-1
          role-to-assume: ${{secrets.ROLE_ARN}}
@bryantbiggs
Copy link

@jatinmehrotra I think you need to update the audience from sigstore to sts.amazonaws.com per #280 (comment)

@jatinmehrotra
Copy link
Author

@bryantbiggs Thank you for the help, this works.

rtyley added a commit to guardian/cdk that referenced this issue Jun 23, 2022
This is an update to the construct that creates IAM resources for GitHub
Actions, first introduced with #823
in early October 2021.

Apparently the `ClientIdList` field should no longer be `sigstore`, as
of 19th October 2021:

aws-actions/configure-aws-credentials#291
aws-actions/configure-aws-credentials#280 (comment)
aws-actions/configure-aws-credentials#284

The new value is `sts.amazonaws.com`, which I think corresponds to this
line in the docs:

> For the "Audience": Use sts.amazonaws.com if you are using the official action.
https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services#adding-the-identity-provider-to-aws

With the old value of `sigstore` in the `AWS::IAM::OIDCProvider` `ClientIdList` field,
running the `aws-actions/configure-aws-credentials` GitHub Action will give you
a "Error: Incorrect token audience" error:

https://github.com/guardian/facia-scala-client/runs/7025740057?check_suite_focus=true#step:3:6
rtyley added a commit to guardian/cdk that referenced this issue Jun 23, 2022
This is an update to the construct that creates IAM resources for GitHub
Actions, first introduced with #823
in early October 2021.

Apparently the `ClientIdList` field should no longer be `sigstore`, as
of 19th October 2021:

aws-actions/configure-aws-credentials#291
aws-actions/configure-aws-credentials#280 (comment)
aws-actions/configure-aws-credentials#284

The new value is `sts.amazonaws.com`, which I think corresponds to this
line in the docs:

> For the "Audience": Use sts.amazonaws.com if you are using the official action.
https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services#adding-the-identity-provider-to-aws

With the old value of `sigstore` in the `AWS::IAM::OIDCProvider` `ClientIdList` field,
running the `aws-actions/configure-aws-credentials` GitHub Action will give you
a "Error: Incorrect token audience" error:

https://github.com/guardian/facia-scala-client/runs/7025740057?check_suite_focus=true#step:3:6
rtyley added a commit to guardian/cdk that referenced this issue Jun 23, 2022
This is an update to the construct that creates IAM resources for GitHub
Actions, first introduced with #823
in early October 2021.

Apparently the `ClientIdList` field should no longer be `sigstore`, as
of 19th October 2021:

aws-actions/configure-aws-credentials#291
aws-actions/configure-aws-credentials#280 (comment)
aws-actions/configure-aws-credentials#284

The new value is `sts.amazonaws.com`, which I think corresponds to this
line in the docs:

> For the "Audience": Use sts.amazonaws.com if you are using the official action.
https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services#adding-the-identity-provider-to-aws

With the old value of `sigstore` in the `AWS::IAM::OIDCProvider` `ClientIdList` field,
running the `aws-actions/configure-aws-credentials` GitHub Action will give you
a "Error: Incorrect token audience" error:

https://github.com/guardian/facia-scala-client/runs/7025740057?check_suite_focus=true#step:3:6
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

No branches or pull requests

2 participants