databricks-sdk-go icon indicating copy to clipboard operation
databricks-sdk-go copied to clipboard

[ISSUE] Azure CLI auth makes 3 unnecessary invocations to `az` CLI when user principal is used

Open nfx opened this issue 2 years ago • 2 comments

When authenticating entire machine via az, we use user-principals (most of the times). Getting token for https://management.core.windows.net/ is only required for service principals.

2023/10/17 11:39:10 [INFO] Refreshed OAuth token for 2ff814a6-3304-4ab8-85cb-cd0e6f879c1d from Azure CLI, which expires on 2023-10-17 12:34:58.000000
2023/10/17 11:39:10 [INFO] Using Azure CLI authentication with AAD tokens
2023/10/17 11:39:14 [INFO] Refreshed OAuth token for https://management.core.windows.net/ from Azure CLI, which expires on 2023-10-17 12:34:47.000000
2023/10/17 11:39:14 [INFO] Refreshed OAuth token for 2ff814a6-3304-4ab8-85cb-cd0e6f879c1d from Azure CLI, which expires on 2023-10-17 12:34:58.000000
2023/10/17 11:39:14 [INFO] Refreshed OAuth token for https://management.core.windows.net/ from Azure CLI, which expires on 2023-10-17 12:34:47.000000

nfx avatar Oct 17 '23 09:10 nfx

For my understanding, is there any functional issue where something isn't working?

mgyucht avatar Oct 18 '23 13:10 mgyucht

@mgyucht CLI subprocess takes 700ms per call (because az is in Python), slowing down an app.

nfx avatar Nov 25 '23 14:11 nfx