{"id":21710842,"url":"https://github.com/jareechang/github-oidc-example-granular-permissions","last_synced_at":"2026-05-08T15:53:56.579Z","repository":{"id":45222876,"uuid":"443006809","full_name":"Jareechang/github-oidc-example-granular-permissions","owner":"Jareechang","description":"Github OpenID Connect with granular permissions","archived":false,"fork":false,"pushed_at":"2022-05-14T19:02:34.000Z","size":59,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T18:14:52.141Z","etag":null,"topics":["authetication","aws","aws-s3","githubactions","iam","iam-role","oidc","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jareechang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-30T07:56:47.000Z","updated_at":"2021-12-30T08:10:04.000Z","dependencies_parsed_at":"2022-07-19T00:47:05.995Z","dependency_job_id":null,"html_url":"https://github.com/Jareechang/github-oidc-example-granular-permissions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jareechang%2Fgithub-oidc-example-granular-permissions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jareechang%2Fgithub-oidc-example-granular-permissions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jareechang%2Fgithub-oidc-example-granular-permissions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jareechang%2Fgithub-oidc-example-granular-permissions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jareechang","download_url":"https://codeload.github.com/Jareechang/github-oidc-example-granular-permissions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244666499,"owners_count":20490287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authetication","aws","aws-s3","githubactions","iam","iam-role","oidc","terraform"],"created_at":"2024-11-25T23:18:01.766Z","updated_at":"2026-05-08T15:53:51.533Z","avatar_url":"https://github.com/Jareechang.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Github OpenID connect with AWS (Granular permissions)\n\nThis is an example of Github Actions deployment to AWS with OpenID connect (OIDC) using terraform.\n\nBuilding on our [example](https://github.com/Jareechang/github-oidc-example). We address a few problems related to permissions where it works for all workflows (pull requests, all branches and forks).\n\nWe want more granularity, which is what we are doing here.\n\n## Changes\n\nSo, there are a few things we need to change:\n\n- Create Separate the IAM roles (one for pull request, and deployment)\n- Update our Subject filter and the condition operators\n- Separate github actions workflows (pull request and deployment)\n\n## Separate roles\n\n### Deployment (write only)\n\n![Deployment role](./images/aws-github-permission-write-only.png)\n\n### Pull request (read only)\n\n![Pull request role](./images/aws-github-permission-read-only.png)\n\n## Full Tutorial\n\nFull article available at [jerrychang.ca - Security harden Github Action deployments to AWS with OIDC](https://www.jerrychang.ca/writing/security-harden-github-actions-deployments-to-aws-with-oidc)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjareechang%2Fgithub-oidc-example-granular-permissions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjareechang%2Fgithub-oidc-example-granular-permissions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjareechang%2Fgithub-oidc-example-granular-permissions/lists"}