fix(msteams): use dynamic tenant ID for sts.windows.net JWT issuer#64276
fix(msteams): use dynamic tenant ID for sts.windows.net JWT issuer#64276mschaepers wants to merge 1 commit intoopenclaw:mainfrom
Conversation
The STS Windows issuer entry in BOT_FRAMEWORK_ISSUERS was hardcoded to a single tenant ID (d6d49420-...), causing JWT validation to fail for all other SingleTenant bot deployments. SingleTenant tokens from Azure Bot Service use issuer `https://sts.windows.net/{tenantId}/` (v1), so this must be a dynamic function like the other issuer entries. Fixes openclaw#64270 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Greptile SummaryThis PR fixes a long-standing bug where the Confidence Score: 5/5This PR is safe to merge — the fix is minimal, targeted, and consistent with the established pattern already used for the Entra v2.0 issuer entry. No P0 or P1 findings. The change is a one-line fix in sdk.ts plus a matching test update. The dynamic issuer function correctly scopes validation to the configured tenant (correct SingleTenant security behavior), the JWKS endpoint is shared and valid for both Azure AD v1 and v2.0, and all related code paths (allowedIssuers computation and resolveIssuerEntry) already handle function-based issuers correctly. No files require special attention. Reviews (1): Last reviewed commit: "fix(msteams): use dynamic tenant ID for ..." | Re-trigger Greptile |
|
Closing this as implemented after Codex review. Current What I checked:
So I’m closing this as already implemented rather than keeping a duplicate issue open. Review notes: reviewed against 11804a484ded; fix evidence: release v2026.4.23, commit a9797214338b. |
Summary
sts.windows.netissuer entry inBOT_FRAMEWORK_ISSUERSwas hardcoded to a single tenant ID (d6d49420-f39b-4df7-a1dc-d59a935871db), causing JWT validation to reject tokens from all other SingleTenant bot deployments(tenantId) => \https://sts.windows.net/${tenantId}/\`` matching the pattern used by thelogin.microsoftonline.comentrytenantIdinstead of the hardcoded valueContext
SingleTenant Azure Bot registrations (required since Microsoft deprecated MultiTenant after 2025-07-31) issue tokens with issuer
https://sts.windows.net/{tenantId}/(Azure AD v1 endpoint). The current code only accepts this issuer for one specific tenant, so every other SingleTenant deployment gets401 Unauthorizedon all incoming Bot Framework webhooks.Fixes #64270
Test plan
creds.tenantIdinstead of hardcoded UUIDvitest run --config vitest.extension-msteams.config.tspasses🤖 Generated with Claude Code