Skip to content

Commit

Permalink
chore: Use OIDC to authenticate to Azure in Github Actions (#3253)
Browse files Browse the repository at this point in the history
* chore: Use federated credential in readme.py

* chore: Update cli workflows to use federated credentials

* chore: Update tutorial workflows to use federated credentials

* chore: Update sdk workflows to use federated credentials

* chore: Normalize line-ending for sdk-foundation-models-azure_openai-oai-v1-openai_completions_finetune.yml

* chore: Use federated credentials in sdk-foundation-models-azure_openai-oai-v1-openai_completions_finetune.yml

* chore: Update remaining workflows to use federated credentials
  • Loading branch information
kdestin authored Jun 19, 2024
1 parent 51297a7 commit 9be775a
Show file tree
Hide file tree
Showing 386 changed files with 2,035 additions and 480 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/automated-cleanup-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
- .github/workflows/automated-cleanup-resources.yml
- infra/bootstrapping/**
- infra/scripts/**
permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -26,7 +28,9 @@ jobs:
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true
continue-on-error: true
- name: "Install Az Modules"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/bootstrapping-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ on:
- cli/**
- infra/bootstrapping/**

permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -46,7 +48,9 @@ jobs:
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }}
- name: bootstrap infra resources
run: |
[[ -z "${RUN_BOOTSTRAP:-}" ]] && RUN_BOOTSTRAP='true'
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/bootstrapping-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
- .github/workflows/bootstrapping-resources.yml
- cli/**
- infra/bootstrapping/**
permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -29,7 +31,9 @@ jobs:
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }}
- name: bootstrap resources
run: |
echo '${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}';
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cli-assets-component-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
- infra/bootstrapping/**
- .github/workflows/cli-assets-component-pipeline.yml
- cli/setup.sh
permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -28,7 +30,9 @@ jobs:
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }}
- name: bootstrap resources
run: |
bash bootstrap.sh
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cli-assets-component-train.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
- infra/bootstrapping/**
- .github/workflows/cli-assets-component-train.yml
- cli/setup.sh
permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -28,7 +30,9 @@ jobs:
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }}
- name: bootstrap resources
run: |
bash bootstrap.sh
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cli-assets-data-cloud-file-https.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
- infra/bootstrapping/**
- .github/workflows/cli-assets-data-cloud-file-https.yml
- cli/setup.sh
permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -28,7 +30,9 @@ jobs:
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }}
- name: bootstrap resources
run: |
bash bootstrap.sh
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cli-assets-data-cloud-file-wasbs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
- infra/bootstrapping/**
- .github/workflows/cli-assets-data-cloud-file-wasbs.yml
- cli/setup.sh
permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -28,7 +30,9 @@ jobs:
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }}
- name: bootstrap resources
run: |
bash bootstrap.sh
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cli-assets-data-cloud-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
- infra/bootstrapping/**
- .github/workflows/cli-assets-data-cloud-file.yml
- cli/setup.sh
permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -28,7 +30,9 @@ jobs:
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }}
- name: bootstrap resources
run: |
bash bootstrap.sh
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cli-assets-data-cloud-folder-https.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
- infra/bootstrapping/**
- .github/workflows/cli-assets-data-cloud-folder-https.yml
- cli/setup.sh
permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -28,7 +30,9 @@ jobs:
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }}
- name: bootstrap resources
run: |
bash bootstrap.sh
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cli-assets-data-cloud-folder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
- infra/bootstrapping/**
- .github/workflows/cli-assets-data-cloud-folder.yml
- cli/setup.sh
permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -28,7 +30,9 @@ jobs:
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }}
- name: bootstrap resources
run: |
bash bootstrap.sh
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cli-assets-data-cloud-mltable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
- infra/bootstrapping/**
- .github/workflows/cli-assets-data-cloud-mltable.yml
- cli/setup.sh
permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -28,7 +30,9 @@ jobs:
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }}
- name: bootstrap resources
run: |
bash bootstrap.sh
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cli-assets-data-iris-csv-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
- infra/bootstrapping/**
- .github/workflows/cli-assets-data-iris-csv-example.yml
- cli/setup.sh
permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -28,7 +30,9 @@ jobs:
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }}
- name: bootstrap resources
run: |
bash bootstrap.sh
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cli-assets-data-local-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
- infra/bootstrapping/**
- .github/workflows/cli-assets-data-local-file.yml
- cli/setup.sh
permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -28,7 +30,9 @@ jobs:
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }}
- name: bootstrap resources
run: |
bash bootstrap.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
- infra/bootstrapping/**
- .github/workflows/cli-assets-data-local-folder-sampledata.yml
- cli/setup.sh
permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -28,7 +30,9 @@ jobs:
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }}
- name: bootstrap resources
run: |
bash bootstrap.sh
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cli-assets-data-local-folder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
- infra/bootstrapping/**
- .github/workflows/cli-assets-data-local-folder.yml
- cli/setup.sh
permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -28,7 +30,9 @@ jobs:
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }}
- name: bootstrap resources
run: |
bash bootstrap.sh
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cli-assets-data-local-mltable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
- infra/bootstrapping/**
- .github/workflows/cli-assets-data-local-mltable.yml
- cli/setup.sh
permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -28,7 +30,9 @@ jobs:
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }}
- name: bootstrap resources
run: |
bash bootstrap.sh
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cli-assets-data-public-file-https.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
- infra/bootstrapping/**
- .github/workflows/cli-assets-data-public-file-https.yml
- cli/setup.sh
permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -28,7 +30,9 @@ jobs:
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }}
- name: bootstrap resources
run: |
bash bootstrap.sh
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cli-assets-environment-docker-context.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
- infra/bootstrapping/**
- .github/workflows/cli-assets-environment-docker-context.yml
- cli/setup.sh
permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -28,7 +30,9 @@ jobs:
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }}
- name: bootstrap resources
run: |
bash bootstrap.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
- infra/bootstrapping/**
- .github/workflows/cli-assets-environment-docker-image-plus-conda.yaml
- cli/setup.sh
permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -28,7 +30,9 @@ jobs:
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }}
- name: bootstrap resources
run: |
bash bootstrap.sh
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cli-assets-environment-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
- infra/bootstrapping/**
- .github/workflows/cli-assets-environment-docker-image.yml
- cli/setup.sh
permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -28,7 +30,9 @@ jobs:
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }}
- name: bootstrap resources
run: |
bash bootstrap.sh
Expand Down
Loading

0 comments on commit 9be775a

Please sign in to comment.