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

Feature: Adds AWS Cognito OIDC Support #1762

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

ben-of-codecraft
Copy link
Contributor

This Implements an additional method for AWS OIDC that allows a project to leverage AWS Cognito Identity Pool to chain to AWS for deployments.

The reason for this extra step is well documented on this site:
https://catnekaise.github.io/

As it stands today, the exchange of identity between GitHub Actions and AWS IAM only allows aud and sub claims to be passed. If you want to lock down deployments more using other claims in the Github JWT it is not possible. By using a cognito identity custom mapping claims to attributes becomes possible allowing more secure limitations on Github Action assumed roles.

A walkthrough on how to set up a cognito identity pool with github action tokens as a provider can be found at https://catnekaise.github.io/github-actions-abac-aws/setup-using-aws-console/

Once the identity pool is set up and custom mapping performed you can then restricted Trust Policies by GitHub claims via PrincipalTags.

To use this, it requires new configuration options to be added to the digger.yml see below:

  - name: "my-secure-digger-project"
    dir: "prod"
    workflow: default
    workflow_file: digger_workflow.yml
    aws_role_to_assume:
      aws_role_region: "us-west-2"
      command: "arn:aws:iam::00000000000:role/github-action-deployment-role"
    aws_cognito_oidc:
      cognito_identity_pool_id: "us-east-1:00000000-0000-0000-0000-000000000000"
      aws_region: "us-east-1"
      aws_account_id: "000000000000"

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.

1 participant