Repository navigation
feat(credentials): Microsoft app credentials for Power BI and Azure Data Explorer, with national clouds - #9931
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
[Medium impact] The PR appears safe to merge; no actionable issues remain from this review. SummaryAdds Microsoft app credentials for Power BI and a new saved-credential Azure Data Explorer block.
No new actionable issues were found.
|
c7a71c9 to
5e55a34
Compare
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 51 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
5e55a34 to
772c042
Compare
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
…l national cloud Microsoft app credentials resolve each service's token audience from one table and cache minted tokens per credential, stored-secret version, and audience, so services that need a different resource no longer share a Graph-or-Dataverse key. A credential can name a national cloud (US Government GCC High or DoD, or China); its Entra endpoint, certificate assertion audience, and save-time Graph check follow that cloud. Global credentials store no cloud field, so existing secrets and older workers read them exactly as before, and Graph and Dataverse services refuse a national-cloud credential because their tools call the global cloud.
The Power BI service offers the Microsoft app credential beside its delegated OAuth connection. A run or selector with an app credential gets an app-only token for the Power BI REST API audience (https://analysis.windows.net/powerbi/api/.default), cached apart from the credential's Graph token; national-cloud credentials are refused because the tools call api.powerbi.com. Delegated connections and every tool's params are unchanged. The Power BI integration suite proves a run and a selector end to end with a persisted app credential.
Adds azure_data_explorer_v2, a credential-only successor whose picker selects a Microsoft app credential (client secret, certificate, or keyless federated credential) in place of the inline tenant ID, client ID, and client secret. The executor authorizes the credential and the operation mints a token for the cluster each call names: the audience is the allowlisted cluster (or resource override) host as https://<host>, and the credential's cloud must be one that host belongs to, so a US Government or China cluster takes a matching national-cloud credential. Inline secrets are never read on that path. The legacy block keeps its inline fields and behavior and is marked legacy with azure_data_explorer_v2 as its replacement. The connect dialog gains a Cloud choice; a global credential's payload and stored secret are unchanged.
…and scope the ADX operation - Token cache key is named before decrypting, so a cached token skips the decrypt and parse; Azure Data Explorer authorization no longer decrypts, and its cluster key includes the resource's clouds. - The ADX operation re-checks the credential against the run's workspace or organization, as the AWS operation path does. - A credential in the wrong Microsoft cloud is refused as cloud_mismatch with its own message instead of "reconnect the credential"; ADX tool errors come from the refusal code, not log detail. - The operation-minted service comes from the shared ADX credential config. - Reconnect reopens a national-cloud credential on its stored cloud. - China signs in at login.partner.microsoftonline.cn (Entra national-cloud reference) for both ADX auth paths; Kusto authorities derive from MICROSOFT_CLOUDS. - Drop the one-line ADX operations passthrough; refresh TSDoc and the Power BI description.
…r Dataverse as a cloud mismatch
…gh one per-provider map
…e a cross-cloud ADX resource A Microsoft app reconnect now waits for the stored cloud, or asks for one when it cannot be read (an organization credential or a failed lookup), instead of saving as global. The ADX schema refuses a resource override whose cloud differs from the cluster's before any credential is decrypted, and the Power BI description says app credentials run in the global cloud only.
772c042 to
55199c7
Compare
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
cloudon the credential: Global (default), US Gov GCC High, US Gov DoD, or China (21Vianet). The Entra endpoint, the certificate assertion audience and the save-time Graph check follow the cloud. China signs in atlogin.partner.microsoftonline.cn, the endpoint the Entra national-cloud reference lists and the one legacy inline ADX sign-ins already use. Graph, Power BI and Dataverse services refuse a national-cloud credential with a newcloud_mismatchcode, whose message names the cloud mismatch instead of asking the user to reconnect. A reconnect opens on the credential's stored cloud. The reconnect reads the stored mode and cloud through one per-provider map, with no provider-specific branch.https://analysis.windows.net/powerbi/api/.default. Global cloud only.azure_data_explorer_v2, a credential-only block. The token audience is the allowlisted cluster (or resource-override) host. The credential's cloud must match the cluster's cloud, so a national-cloud cluster needs a matching national-cloud credential. The operation re-checks the credential against the run's workspace or organization, as the AWS operation path does. The legacy block keeps its inline fields and is marked legacy.Not in this PR (design memos):
Azure DevOps service principal. The service-principal guide (https://learn.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/service-principal-managed-identity) uses the token scope
https://app.vssps.visualstudio.com/.default, sent as Bearer. Azure DevOps ignores Entra app permissions. The service principal must be added to each organization as a user, with Basic or higher access, and it takes a paid license. Two things block it:serviceAccountProviderId(lib/oauth/types.ts), and Azure DevOps already uses it for its PAT credential. Offering an app credential needs either a list-valued provider-id field across pickers, the resolver and the block contract, or a new provider id.BasicPAT header. Switching to Bearer means passing the credential kind throughcredentialParamsin every tool, which changes their tool schemas.It needs a product decision on the credential model and a live proof.
Azure OpenAI via Entra. The Entra guide (https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/managed-identity) uses the data-plane scope
https://ai.azure.com/.default. It requires a custom-subdomain endpoint and the Cognitive Services OpenAI User role. The provider takes an inline API key and a user-supplied endpoint, and model providers have no saved-credential path yet. It needs that model-credential pattern, an endpoint host allowlist (*.openai.azure.com) and a client cache keyed by credential and expiry.Planner/Outlook app-only. Graph's
/merequires a signed-in user, and application permissions are not supported there (https://learn.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0). These tools call/me. App-only would need a new user or mailbox parameter that switches to/users/{id}, and tenant-wide mailbox scope is a product and security decision.Product update (if relevant)
Type of Change
Testing
cloud_mismatchrefusals for Graph, Dataverse, Power BI and ADX.cloudfield, old workers fail closed on a national-cloud secret, and legacy inline ADX authorities are unchanged.requestAzureDataExplorerAsApp.Checklist