Azure / azureml-examples

Official community-driven Azure Machine Learning examples, tested with GitHub Actions.
https://docs.microsoft.com/azure/machine-learning
MIT License
1.73k stars 1.41k forks source link

fix(ci): Add workaround to circumvent azure-cli's lack of support for ID token refresh #3328

Closed kdestin closed 1 month ago

kdestin commented 2 months ago

Description

This pull request adds a workaround for an issue where some workflows would fail with the following error when requesting an access-token

ClientAuthenticationError: ERROR: AADSTS700024: Client assertion is not within its valid time range. Current time: 2024-07-31T13:29:11.3373885Z, assertion valid from 2024-07-31T12:49:53.0000000Z, expiry time of assertion 2024-07-31T12:54:53.0000000Z. Review the documentation at https://learn.microsoft.com/entra/identity-platform/certificate-credentials . Trace ID: 0ff4799d-034f-4a47-a51c-73b333b61a00 Correlation ID: fd15cb9d-734e-4a7c-9d96-0e2069f9c11b Timestamp: 2024-07-31 13:29:11Z
Interactive authentication is needed. Please run:
az login

Bugfix for #3253, root cause is likely https://github.com/Azure/login/issues/372

Background

Workflows in this repository were migrated to federated authentication using OIDC in #3253.

We've since run into a bug with several workflows similar to the bug described in https://github.com/Azure/login/issues/372: an authentication issue occurs with that authenticate with OIDC after running for sufficiently long.

A comment in the thread includes a collection of workarounds as a stopgap until the root cause is fixed in azure-cli: https://github.com/Azure/login/issues/372#issuecomment-2056289617

Checklist

kdestin commented 1 month ago

@microsoft-github-policy-service rerun