Skip to content

No OpenIDConnect provider found in your account for https://token.actions.githubusercontent.com #721

@srinivasuluparanduru

Description

@srinivasuluparanduru

Describe the bug

AssumeRoleAndCallIdentity
No OpenIDConnect provider found in your account for https://token.actions.githubusercontent.com

Expected Behavior

Able to authenticate and proceed further

Current Behavior

Reproduce as it is using Githubactions using the link -https://aws.amazon.com/blogs/security/use-iam-roles-to-connect-github-actions-to-actions-in-aws/

Getting Error as AssumeRoleAndCallIdentity
No OpenIDConnect provider found in your account for https://token.actions.githubusercontent.com

Reproduction Steps

terrafrom.yml

on:
workflow_dispatch:

env:

AWS_REGION : us-west-2 #Change to reflect your Region

Permission can be added at job level or workflow level

permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
AssumeRoleAndCallIdentity:
runs-on: ubuntu-latest
steps:
- name: Git clone the repository
uses: actions/checkout@v3
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::*********:role/GitHubAction-AssumeRoleWithAction-S3FullAccess #change to reflect your IAM role’s ARN
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: ${{ env.AWS_REGION }}
role-skip-session-tagging: true
# Hello from AWS: WhoAmI
- name: Sts GetCallerIdentity
run: |
aws sts get-caller-identity


  1. IAM Role : GitHubAction-AssumeRoleWithAction-S3FullAccess

Trusted relationship : {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Federated": "arn:aws:iam::****** :oidc-provider/token.actions.githubusercontent.com"
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"token.actions.GitHubusercontent.com:aud": "sts.amazonaws.com",
"token.actions.githubusercontent.com:sub": "repo:SriniFreelanceProjects/GitHubActions_AWS_TF_AssumeRole:*"
}
}
}
]
}


  1. Followed the steps as it is - https://aws.amazon.com/blogs/security/use-iam-roles-to-connect-github-actions-to-actions-in-aws/
  2. After running the workflow and i am getting error as

No OpenIDConnect provider found in your account for https://token.actions.githubusercontent.com

cant able to resolve the issue

Possible Solution

No response

Additional Information/Context

Seems the same error occured long based on pull request and its repeating once again. Please help to resolve the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions