I am deploying a container app in Azure using GitHub Actions. I encountered an issue with the federated identity when trying to login with Azure CLI through OIDC.
The error from the GitHub Action log is as follows:
AADSTS700213: No matching federated identity record found for presented assertion subject 'repo:yeshpal-test17/container-app-bot:ref:refs/tags/alpha-v1'. Please note that the matching is done using a case-sensitive comparison. Check your federated identity credential Subject, Audience and Issuer against the presented assertion.
It seems the issue is related to the subject identifier in the federated credentials. I tried using a wildcard pattern in the subject identifier, such as: repo:yeshpal-test17/container-app-bot:ref:refs/tags/alpha-v*
and repo:yeshpal-test17/container-app-bot:ref:refs/tags/*
However, both attempts returned the same error. The only time the action succeeds is when I specify the exact tag in the subject identifier like this: repo:yeshpal-test17/container-app-bot:ref:refs/tags/alpha-v2
Is there a way to configure the subject identifier to allow wildcard pattern matching for different tags in a single federated identity credential? Or is there a recommended approach to handle this scenario in Azure and GitHub Actions?
Thanks in advance!