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

adding repo to trust policy does not allow role assumption #42

Open
zachdorow opened this issue May 14, 2024 · 0 comments
Open

adding repo to trust policy does not allow role assumption #42

zachdorow opened this issue May 14, 2024 · 0 comments

Comments

@zachdorow
Copy link

zachdorow commented May 14, 2024

When making a role like so

    const githubActionsRole = new GithubActionsRole(this, roleName, {
      roleName: roleName,
      provider,
      owner: 'f',
      repo: 'catalog',
      filter: 'ref:refs/heads/main'
    })
    

it makes a policy like this

            "Condition": {
                "StringEquals": {
                    "token.actions.githubusercontent.com:aud": "sts.amazonaws.com"
                },
                "StringLike": {
                    "token.actions.githubusercontent.com:sub": "repo:f/catalog:ref:refs/head/main"
                }
            }

but it will not work with github unless it is this

            "Condition": {
                "StringEquals": {
                    "token.actions.githubusercontent.com/jamf:sub": "repo:f/catalog:ref:refs/heads/main",
                    "token.actions.githubusercontent.com/jamf:aud": "sts.amazonaws.com"
                }
            }

behaves similarly with or without the filter defined

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

1 participant