You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`crates/aisix-provider-azure-openai/src/aad_token_mint.rs:140-160` declares `token_endpoint_override: Option` BUT both the field and its setter `with_token_endpoint_override` are `#[cfg(test)]` only. Production builds always POST to the hardcoded:
An operator deploying behind a corporate proxy, on Azure Government cloud (`login.microsoftonline.us`), Azure China (`login.partner.microsoftonline.cn`), or pointing at a mock for e2e cannot redirect AAD token minting.
Customer impact
Azure Government / Azure China customers blocked — they use entirely different AAD endpoints (`.us` / `.cn` suffixes). The bridge hardcodes `.com`.
AISIX-Cloud AAD live e2e blocked — `adapter-azure-live.spec.ts` currently only exercises the api-key path because mock-llm has no way to receive AAD client_credentials requests.
Compare to peers
Vertex bridge — production override works via the SA JSON's `token_uri` field (industry-standard GCP SA shape). `crates/aisix-provider-vertex/src/token_mint.rs:269` uses `sa.token_uri.clone()` in production.
Bug — same class as #390/#391
`crates/aisix-provider-azure-openai/src/aad_token_mint.rs:140-160` declares `token_endpoint_override: Option` BUT both the field and its setter `with_token_endpoint_override` are `#[cfg(test)]` only. Production builds always POST to the hardcoded:
```
https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token
```
An operator deploying behind a corporate proxy, on Azure Government cloud (`login.microsoftonline.us`), Azure China (`login.partner.microsoftonline.cn`), or pointing at a mock for e2e cannot redirect AAD token minting.
Customer impact
Compare to peers
Suggested fix
Add an optional `aad_token_endpoint` field to the AAD secret JSON:
```json
{
"tenant_id": "abc-123",
"client_id": "...",
"client_secret": "...",
"aad_token_endpoint": "https://login.microsoftonline.us/abc-123/oauth2/v2.0/token"
}
```
Default: derive from `tenant_id` against `login.microsoftonline.com` (current behavior).
Implementation:
~30-50 LOC change + tests + docs note. Surface area: one new optional JSON field, fully backward compatible.
Blocks
Surfaced via
P1 #4 of #302 follow-up audit (AISIX-Cloud), discovered during scoping of mock-llm `/{tenant}/oauth2/v2.0/token` endpoint addition.