{"id":22800910,"url":"https://github.com/colindembovsky/azure-oidc-demo","last_synced_at":"2026-02-21T06:04:18.446Z","repository":{"id":147341325,"uuid":"426355352","full_name":"colindembovsky/azure-oidc-demo","owner":"colindembovsky","description":"Demo Azure OIDC connection","archived":false,"fork":false,"pushed_at":"2021-12-01T15:50:09.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T07:51:03.203Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/colindembovsky.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-09T19:12:45.000Z","updated_at":"2025-07-10T21:20:52.000Z","dependencies_parsed_at":"2023-04-19T06:06:00.747Z","dependency_job_id":null,"html_url":"https://github.com/colindembovsky/azure-oidc-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/colindembovsky/azure-oidc-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colindembovsky%2Fazure-oidc-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colindembovsky%2Fazure-oidc-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colindembovsky%2Fazure-oidc-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colindembovsky%2Fazure-oidc-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/colindembovsky","download_url":"https://codeload.github.com/colindembovsky/azure-oidc-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colindembovsky%2Fazure-oidc-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29674938,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T05:54:28.202Z","status":"ssl_error","status_checked_at":"2026-02-21T05:53:42.585Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-12-12T08:08:24.751Z","updated_at":"2026-02-21T06:04:18.412Z","avatar_url":"https://github.com/colindembovsky.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure OIDC Login Demo\n\nThis repo has an Action that tests logging in to Azure [using OIDC](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure).\n\nFull write-up [here](https://colinsalmcorner.com/actions-authenticate-to-azure-without-a-secret/).\n\nFor this demo to work, you need 2 SPNs in Azure and 2 environments. The jobs target `dev` and `prod` environments.\n\n# Update: 11/18\n\nYou no longer need the composite workflow, since you no longer have to install the `az cli` beta. You can just collapse to this:\n\n```yml\n  - uses: azure/login@v1\n    name: Log in using OIDC\n    with:\n      tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n      client-id: ${{ secrets.AZURE_CLIENT_ID }}\n      subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n```\n\nand you'd be good to go from there!\n\n## Azure Configuration\n\nSteps:\n1. Create a `dev` service principal (App Registration) in Azure\n2. On the **Certificates and Secrets** tab of the App, click **Federated credentials**\n3. Click **+ Add credential** and enter the `org`, `repo` and `environment` (in this case `dev`)\n4. On the **Overview** tab, note the `Application (client) ID` for this SPN\n5. Give the SPN access to a subscription or Resource Group within the tenant\n\nRepeat these steps for a `prod` SPN, giving it access to a different subscription or set of resource groups.\n\n## GitHub Configuration\n\nSteps:\n1. Create a `dev` environment in the repo **Environments** tab under **Settings**\n2. Add the `dev` clientID as a secret called `AZURE_CLIENT_ID`\n\nRepeat for the `prod` environment, creating the same secret but use the clientID of the `prod` SPN.\n\nOn the repo, configure 2 additional secrets:\n\n- `AZURE_TENANT_ID` - the AAD tenant ID\n- `AZURE_SUBSCRIPTION_ID` - the ID of the Azure subscription\n\n\u003e **Note**: If you have different subscriptions for `dev` and `prod`, define the `AZURE_SUBSCRIPTION_ID` at the corresponding environment, rather than sharing a single subscription at the repo level.\n\n## Queue the Workflow\n\nNow you can navigate to the **Actions** tab, click on the `OIDC Demo` workflow and queue it.\n\n## Results\n\nYou should see successful deployments to `dev` and `prod`, but the `bad prod` job should fail (I hardcoded the `dev` appID for that job to try to deploy to the `prod` environment with the `dev` SPN).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolindembovsky%2Fazure-oidc-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolindembovsky%2Fazure-oidc-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolindembovsky%2Fazure-oidc-demo/lists"}