Skip to content

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

@zachdorow

Description

@zachdorow

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions