Closed melzayet closed 1 year ago
Hey @melzayet, the support you are asking for is under a separate task: Azure/login@v1. So, that task will have same behavior across all workflows. Here are some samples:
thanks @patelchandni! Azure/login@v1 already supports workload federated identity, but I wanted to know if Azure/functions@v1 would support a service principal that was logged in with Azure/login@v1 using the workload federated identity model
This issue is idle because it has been open for 14 days with no activity.
We are also interested in the workload federation identity support
This issue is idle because it has been open for 14 days with no activity.
I think the question here is if I do an Azure/login step beforehand will this action reuse the credentials there to do the publishing without the need for a user to specify a publish-profile?
This would allow for a user to use OIDC to do the login process and then never have to store any credentials in GitHub.
I just did a test and was able to deploy using OIDC just fine. Here is a sample of my workflow:
on:
push:
permissions:
id-token: write
contents: read
jobs:
build-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Az CLI login
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Function Publish
uses: Azure/functions-action@v1
with:
app-name: ....
package: ...
I can also confirm that it is working as described by @tjcorr. But I am facing the issue #116 from time to time
Yes, the solution from @tjcorr worked for me as well, Thank you !
As "functions-actions" already supports RBAC, is logging to Azure through GitHub Open ID a supported flow?
For example, app service deploy GH action does document the support for Open ID: https://docs.microsoft.com/en-us/azure/app-service/deploy-github-actions?tabs=openid
Basically, an Azure login action will use an SP following Open ID connect flow, then web app deploy action will use that SP
Thanks