Commit aab6757
Adir Atias
fix: resolve ARM token resource from AZURE_AUTHORITY_HOST for sovereign cloud ACR auth
ArgoCD hardcodes the ARM token scope to the commercial endpoint
(https://management.core.windows.net) when exchanging a Workload Identity
access token for an ACR refresh token. On sovereign clouds, this causes
401 Unauthorized because the token audience does not match the cloud ARM
resource.
This change resolves the ARM token resource from AZURE_AUTHORITY_HOST,
which is the only cloud-identifying env var injected by the AKS Workload
Identity mutating webhook into workload pods. AZURE_ENVIRONMENT is NOT
injected into pods (only into the webhook controller itself).
Supported clouds:
- Azure Public (login.microsoftonline.com) -> management.core.windows.net
- Azure US Government (login.microsoftonline.us) -> management.core.usgovcloudapi.net
- Azure China (login.partner.microsoftonline.cn) -> management.core.chinacloudapi.cn
- Azure US Nat (login.microsoftonline.eaglex.ic.gov) -> management.core.eaglex.ic.gov
- Azure US Sec (login.microsoftonline.microsoft.scloud) -> management.core.microsoft.scloud
- Azure Bleu (login.sovcloud-identity.fr) -> management.sovcloud-api.fr
- Azure Delos (login.sovcloud-identity.de) -> management.sovcloud-api.de
AZURE_ARM_TOKEN_RESOURCE env var is preserved as an explicit override for
backward compatibility and any unrecognized cloud environments.
Signed-off-by: Adir Atias <adatias@microsoft.com>1 parent f71239c commit aab6757
1 file changed
Lines changed: 51 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | | - | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
184 | | - | |
| 185 | + | |
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
| |||
292 | 293 | | |
293 | 294 | | |
294 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
0 commit comments