Repository navigation
Default labs 16-33 to Entra ID and asset-scoped runtime access - #78
Open
Paul Yuknewicz (paulyuk) wants to merge 2 commits into
Open
Paul Yuknewicz (paulyuk) wants to merge 2 commits into
Paul Yuknewicz (paulyuk) wants to merge 2 commits into
Conversation
Scope runtime roles to aliases and tool servers, refresh delegated SDK tokens, and keep key-only clients behind explicit Owner enablement. Align model-router examples with supported models and observed routing. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…requirements The samples import labs/shared/utils.py for runtime_token_provider, which needs azure-identity and requests. A fresh environment that installs only infra/requirements.txt failed with ModuleNotFoundError. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
2ee4f5526f0b49ad6b288ffe04a569df490e3644↑ Strict labs build, plugin check, Bicep build, Terraform fmt and validate, notebook compile and Bash/PowerShell syntax gates pass on this revision.
↑ Live authorization boundaries, three streaming callers, router objectives and model-pool assertions passed; temporary resources were removed and Foundry accounts purged.
↓ Private-network managed identity, hosted/Foundry exchanges, full enterprise/tool smoke, embeddings/RAG and the external TypeSafe backend were not exercised live. Existing portal screenshots remain explicitly labeled as older captures.
Problem and solution
Several labs still create runtime keys automatically or teach callers to capture a key or access token. That conflicts with the Entra default and gives callers more access than the aliases and tool servers they actually use.
Make Entra ID the default throughout labs 16-33. Grant AI Gateway Models User only on each exercised alias and AI Gateway Tools User only on each exercised tool server. Keep local callers, hosted agents, Foundry projects and deployment smoke identities distinct. Preserve the existing Entra paths from #75, including labs 20 and 33.
Depends on #77 and targets
paulyuk-lab-catalog-identity-migration.Changes
Data.All; app-only and managed identities use.default. AvoidAzureCliCredentialtranslating the delegated scope to--resource.api-keyheader. Preserve outbound hook and backend authentication.Canonical local-user commands
Use the lab's
RG,GATEWAYandALIAS. Assign only the aliases that caller exercises. These commands do not print the token.For an MCP caller, use Tools User (
dce03f8d-857f-4e40-a90d-67770fa6ecd2) on<gateway-id>/workspaces/default/toolServers/<server>instead. Never substitute a workspace-wide grant. SDK samples acquire refreshed credentials per request rather than retaining the raw-command token.Exceptions and observed behavior
2026-09-22. Actual Balanced, Cost and caller Quality batches all selected GPT-5-mini. The examples now record those results, verify objective headers and configured pool membership, and prove GPT-6-sol reachability with a single-model override instead of promising a particular split. Older GPT-5.5 screenshots retain accurate historical captions.disableLocalAuthproperty or risk-acknowledgment CLI flag is introduced.Validation
Local gates passed: labs sync/build/strict check with zero warnings, plugin checker, changed Bicep and enterprise parameter compilation, all 14 changed Terraform roots formatted and validated, helper/runtime-auth tests, Python checks, TypeScript type-check, eight notebook JSON/code/output checks, Bash and PowerShell syntax, and whitespace checks.
Live isolated verification passed: allowed alias
200, ungranted alias403, unauthenticated401; Bash, Python and TypeScript streaming; Terraform apply and a zero-change plan; Balanced/Cost/Quality requests and objective headers; both single-model pools and invalid-selector rejection. All verification resource groups were removed and Foundry accounts purged. The unexercised paths are listed in the assessment above. No local browser tests were run. The final commit is personally signed and GitHub reports its signature as verified.