Skip to content

Add network-isolated Foundry IQ recipe for prompt and hosted agents - #53

Draft
Farzad Sunavala (farzad528) wants to merge 5 commits into
mainfrom
farzad528/network-isolated-foundry-iq
Draft

Farzad Sunavala (farzad528) wants to merge 5 commits into
mainfrom
farzad528/network-isolated-foundry-iq

Conversation

@farzad528

@farzad528 Farzad Sunavala (farzad528) commented Jun 16, 2026 •

Copy link
Copy Markdown
Contributor

What changed

This draft now contains an offline-tested foundation for BYO-VNet Microsoft Foundry and Foundry IQ: one private Blob-backed hybrid knowledge base, separate prompt-agent and hosted-agent source/configuration, pinned infrastructure, and a fail-closed evidence harness.

Recipe: network-isolated-foundry-iq · Author: Farzad Sunavala (@farzad528)

  • Merged current main, resolved the registry conflict, and preserved unrelated existing PR content.
  • Rewrote the notebook as eight Python cells with genuine clean-kernel offline outputs, professional decision notes, a rendered architecture SVG, immutable helper links, and current Microsoft Learn references.
  • Added private-ingestion definitions, checked-in hosted Responses/Toolbox source, frozen dependencies, private-image configuration, scoped approval records, and sanitized evidence output.
  • Fixed false-positive isolation classifications, Search receipts mislabeled as other services, incorrect retrieve methods, authenticated redirects, missing transport-failure receipts, and the Blob folder-prefix boundary.
  • Added project instructions requiring the recipe-factory authoring/review workflow and honest scoring. The app configuration requires user acceptance before taking effect.

Reviewed asset snapshot · Updated notebook

Verification performed

Check Result
Real clean Jupyter kernel All 8 cells executed successfully; offline only
Regression and asset tests 37 passed, zero skips, including Bicep compilation
Bicep 0.47.16 Zero errors; 27 inherited vendor warnings retained, not suppressed
Notebook and evidence schemas Passed
Registry validation 19 recipes, zero warnings
Production/PR-base site build Passed; 20 pages, 19 indexed recipes
Local recipe, Markdown and SVG HTTP 200; diagram renders; 390px layout has no horizontal overflow
Immutable GitHub links All 13 notebook/helper/directory URLs return HTTP 200
Final build/accessibility CI Passed
Final CodeQL CI Passed
Focused static security review No high-confidence vulnerabilities reported; not a penetration test or cloud assurance
Hosted preview deployment Blocked: deployment run fails at the contributor-team check because its github-token input is empty

Preview prerequisite: the base-branch workflow requires the repository secret FORGEBOOK_TEAM_READ_TOKEN for its contributor-team membership check. A maintainer must configure an appropriately scoped, organization-authorized token and rerun the failed deployment workflow. This revision does not bypass the authorization gate or alter credentials. An existing preview URL must not be treated as proof that this final commit was deployed.

The original classifier was reproduced from its pinned revision with mocked transports: five of eight error fixtures falsely passed isolation. The corrected tests reject those false positives. That is offline regression evidence, not Azure evidence.

Readiness and remaining work

Not production-ready and not ready to merge. All 17 required live controls remain BLOCKED. No Azure resources were provisioned or changed and no live model/agent/KB invocations were performed for this revision.

I will report the controls actually exercised, their evidence, and their limits. A finite test suite cannot prove that a setup is “100% secure,” and private endpoints do not place every Azure PaaS or Foundry platform component inside a customer-owned VNet. Preview dependencies remain explicitly labeled.

Before publication:

  • Confirm the disposable lab's tenant/subscription, region, exact resources and permissions; approve an itemized cost estimate. Public unit-price inputs are not a completed or approved quote.
  • Complete remaining service-specific live collectors, the prompt-tool canary, fault injection and repeated-run orchestration. The current CLI intentionally cannot certify the entire live matrix.
  • Run ARM validation/what-if, resolve platform-support discrepancies, and deploy the approved private configuration without public-access, key, or trusted-bypass fallbacks.
  • Demonstrate both actual deployed agents using observed identities, pinned versions, correlated KB tool calls, source-faithful citations and unrelated-question abstention.
  • Prove paired inside/outside ingress, native private ingestion/embeddings, private image pulling, runtime/tool-service egress, authorization boundaries and failure behavior across repeated trials.
  • Save reviewed, sanitized live receipts and obtain separate approval for exact run-owned cleanup.
  • Restore the preview-deployment prerequisite and verify the final Linux-built hosted preview.

Current review score: upstream Forgebook ten-axis rubric 73/100. The factory adds a learning-objectives axis: 78/105 (74.3/100 normalized). These are disclosed draft scores, not a fabricated 100/100; live evidence and incomplete adapters remain publication blockers.

Documentation anchors

The draft stays open until these acceptance gates and the remaining implementation are resolved.

@github-actions

github-actions Bot commented Jun 16, 2026 •

Copy link
Copy Markdown
Contributor

🔍 Preview

A live preview of this PR is available at:
https://microsoft-foundry.github.io/forgebook/preview/pr-53/

A checklist-driven, IT-admin cookbook that proves Foundry IQ (Azure AI Search
Knowledge Bases) and the Foundry Agent Service consuming it over MCP run fully
inside a customer VNet. Every command and output was executed against a real
West US 3 deployment and verified against 9 acceptance criteria (AC1-AC9),
including an off-VNet negative test that returns 403 publicNetworkAccess:Disabled.

Covers choosing BYO VNet vs. Managed VNet, a Bastion-first developer flow, and
an appendix documenting a validated Network Security Perimeter (NSP) pattern
that runs with the Azure trusted-service bypass turned OFF.

- notebooks/network-isolated-foundry-iq.ipynb
- notebooks/data/network-isolated-foundry-iq/ (NERC CIP / grid sample docs)
- notebooks/media/network-isolated-foundry-iq/ (screenshot placeholders)
- registry.yaml entry (tags: iq, azure-ai-search, security, agents, agent-service, mcp)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@farzad528
Farzad Sunavala (farzad528) force-pushed the farzad528/network-isolated-foundry-iq branch from bb7e674 to 22a0c97 Compare June 18, 2026 09:53
Elisa (ElisaPiccin) and others added 2 commits June 19, 2026 08:31
Co-authored-by: Elisa Piccin <elisapiccin+microsoft@microsoft.com>
Preserve every registry entry and the existing custom-schema notebook change while incorporating current main. Add project-scoped recipe-author and cookbook-review requirements with honest evidence and scoring gates, without automatic execution.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@farzad528 Farzad Sunavala (farzad528) changed the title Add network-isolated Foundry IQ verified enterprise blueprint recipe Add network-isolated Foundry IQ recipe for prompt and hosted agents Sep 23, 2026
Import revision-pinned private-lab infrastructure and both agent definitions, preserve all live controls as blocked, and add fail-closed classifier, request, and prefix regressions. Record actual clean-kernel outputs, local Bicep compilation, honest scores, unapproved pricing inputs, and a portable SVG architecture.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Provide immutable notebook and helper permalinks plus clone-checkout guidance for draft PR readers. Preserve relative executable data paths, record the tested asset revision, and wrap long prose without site changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Critical validation, authorization, and publication blockers remain, and live Azure controls are unverified.

Review effort: Lite
Findings: 4 High severity · 4 Medium severity

Open (8)
What changed in this PR

Adds an offline-tested, network-isolated Microsoft Foundry IQ recipe with private networking, prompt/hosted agents, infrastructure, and evidence tooling. Live Azure controls remain blocked.

Changes:

  • Adds recipe documentation, fixtures, provenance, and architecture assets.
  • Adds private-network Bicep infrastructure, RBAC, monitoring, and hosted-agent configuration.
  • Adds offline verification, regression tests, approval gates, and deployment tooling.
File Summary
registry.yaml Critical: publication is enabled despite blocked live controls and the stated draft status.
notebooks/​media/​network-isolated-foundry-iq/​01-private-paths.svg Adds the network architecture diagram.
notebooks/​media/​network-isolated-foundry-iq/​.gitkeep Reserves recipe media storage.
notebooks/​data/​network-isolated-foundry-iq/​verify.py Critical: truthy placeholders and malformed evidence can pass verification.
notebooks/​data/​network-isolated-foundry-iq/​test_offline.py Adds offline verifier regressions.
notebooks/​data/​network-isolated-foundry-iq/​test_assets.py Validates recipe assets and infrastructure.
notebooks/​data/​network-isolated-foundry-iq/​substation-incident-response-runbook.md Adds fictional retrieval data.
notebooks/​data/​network-isolated-foundry-iq/​scada-network-segmentation-standard.md Adds fictional retrieval data.
notebooks/​data/​network-isolated-foundry-iq/​review.md Records scoring and readiness blockers.
notebooks/​data/​network-isolated-foundry-iq/​requirements.txt Pins notebook dependencies.
notebooks/​data/​network-isolated-foundry-iq/​reproduce-original-isolation-classifier.py Reproduces baseline classifier behavior.
notebooks/​data/​network-isolated-foundry-iq/​README.md Documents operation and limitations.
notebooks/​data/​network-isolated-foundry-iq/​provenance.json Records source and validation provenance.
notebooks/​data/​network-isolated-foundry-iq/​original-classifier-reproduction.json Stores baseline reproduction results.
notebooks/​data/​network-isolated-foundry-iq/​nerc-cip-access-control-policy.md Adds fictional retrieval data.
notebooks/​data/​network-isolated-foundry-iq/​LICENSE-foundry-samples.txt Preserves vendored sample licensing.
notebooks/​data/​network-isolated-foundry-iq/​lab.py Provides bounded lab operations and receipts.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​vnet.bicep Defines the standard VNet.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​validate-search-aad-auth.bicep Guards Search authentication configuration.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​validate-existing-resources.bicep Validates existing resource references.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​subnet.bicep Defines delegated subnets.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​standard-dependent-resources.bicep Defines Search, Storage, and Cosmos resources.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​private-endpoint-and-dns.bicep Moderate: BYO accounts are reconstructed in the current scope instead of using the cross-scope resource ID.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​network-agent-vnet.bicep Selects a new or existing VNet.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​monitor-private-link-scope.bicep Defines private monitoring links.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​format-project-workspace-id.bicep Formats project workspace identifiers.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​existing-vnet.bicep Moderate: cross-subscription VNet references omit the subscription scope.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​cosmosdb-account-role-assignment.bicep Adds Cosmos account role assignments.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​cosmos-container-role-assignments.bicep Adds Cosmos container roles.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​container-registry.bicep Defines the private container registry.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​blob-storage-container-role-assignments.bicep Adds scoped Blob roles.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​azure-storage-account-role-assignment.bicep Adds the storage account role.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​application-insights.bicep Moderate: local authentication is disabled while tracing uses only an ApiKey-backed connection.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​application-insights-role-assignment.bicep Adds monitoring role assignments.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​ai-search-role-assignments.bicep Critical: the runtime receives Search Contributor rather than the narrower read-only role.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​ai-project-identity.bicep Defines project identity and connections.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​ai-account-identity.bicep Creates or references the Foundry account identity.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​add-project-capability-host.bicep Defines the project capability host.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​modules-network-secured/​add-account-capability-host.bicep Defines the account capability host.
notebooks/​data/​network-isolated-foundry-iq/​infra/​standard/​main.bicep Moderate: the BYO-account capability-host module lacks the derived cross-scope deployment.
notebooks/​data/​network-isolated-foundry-iq/​infra/​parameters.example.json Provides unresolved deployment parameters.
notebooks/​data/​network-isolated-foundry-iq/​infra/​network.bicep Defines isolated networking and runners.
notebooks/​data/​network-isolated-foundry-iq/​infra/​main.bicep Composes the disposable lab deployment.
notebooks/​data/​network-isolated-foundry-iq/​infra/​knowledge-resources.bicep Defines embeddings, Blob, Search, and related links.
notebooks/​data/​network-isolated-foundry-iq/​hosted/​uv.toml Enables system certificates for hosted dependencies.
notebooks/​data/​network-isolated-foundry-iq/​hosted/​pyproject.toml Defines hosted-agent dependencies.
notebooks/​data/​network-isolated-foundry-iq/​hosted/​main.py Implements the hosted Responses agent.
notebooks/​data/​network-isolated-foundry-iq/​hosted/​egress_probe.py Moderate: default redirects can forward canary requests to another host.
notebooks/​data/​network-isolated-foundry-iq/​hosted/​Dockerfile Defines the hosted image.
notebooks/​data/​network-isolated-foundry-iq/​hosted/​azure.yaml Configures hosted deployment.
notebooks/​data/​network-isolated-foundry-iq/​hosted/​.dockerignore Restricts image build context.
notebooks/​data/​network-isolated-foundry-iq/​evidence.schema.json Defines the evidence projection schema.
notebooks/​data/​network-isolated-foundry-iq/​evidence.json Stores blocked offline evidence.
notebooks/​data/​network-isolated-foundry-iq/​definitions.py Moderate: generated toolbox output omits the required tool name and uses an inconsistent server label.
notebooks/​data/​network-isolated-foundry-iq/​cost-inputs.json Stores candidate pricing inputs.
notebooks/​data/​network-isolated-foundry-iq/​configure_agents.py Gates prompt-agent configuration behind approval.
notebooks/​data/​network-isolated-foundry-iq/​approval.example.json Provides an approval envelope template.
notebooks/​data/​network-isolated-foundry-iq/​.gitignore Excludes credentials and local artifacts.
notebooks/​azure-ai-search-custom-schema-citations.ipynb Adds Search citation prerequisites.
.github/​github-app.yml Adds repository-scoped authoring and review guidance.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +20 to +24
resource searchIndexDataContributorAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
scope: searchService
name: guid(projectPrincipalId, searchIndexDataContributorRole.id, searchService.id)
properties: {
principalId: projectPrincipalId
Comment on lines +87 to +89
required = ("source", "indexer", "status", "shared_links", "expected_targets", "source_content_evidence", "embedding_evidence", "sku")
if not all(observation.get(k) for k in required):
return Result(Status.BLOCKED, "Missing ingestion readback, source content or embedding evidence")
Comment on lines +148 to +152
keys = ("invocation_id", "canary_positive_control", "canary_ownership_evidence",
"allowed_dependency_success", "network_deny_evidence", "runtime_identity_evidence")
if not all(receipt.get(k) for k in keys) or receipt.get("canary_received") is not False:
return Result(Status.INCONCLUSIVE, "Need allowed dependency, positive control and correlated deny evidence")
return Result(Status.PASS, "Task-owned canary denial corroborated from the required runtime")
Comment thread registry.yaml
Comment on lines +272 to +276
- slug: network-isolated-foundry-iq
path: notebooks/network-isolated-foundry-iq.ipynb
title: "Verify Private Retrieval with Foundry IQ"
description: "Build a disposable BYO-VNet lab for one Blob-backed knowledge base and two agents, then distinguish network isolation from authorization failures. Live verification is pending."
date: "2026-05-29"
Comment on lines +101 to +104
return {"description": "The same private Blob-backed KB, using the observed hosted agent identity.",
"tools": [{"type": "mcp", "server_label": "knowledge-base", "server_url": mcp_endpoint(c),
"project_connection_id": c["hosted_connection"], "require_approval": "never",
"allowed_tools": ["knowledge_base_retrieve"]}]}
nonce = str(uuid.UUID(nonce))
request = Request(origin.rstrip("/") + "/canary/" + nonce, method="GET")
try:
with urlopen(request, timeout=10) as response:
Comment on lines +56 to +57
DisableLocalAuth: true
}
// Reference the existing virtual network
resource existingVNet 'Microsoft.Network/virtualNetworks@2024-05-01' existing = {
name: vnetName
scope: resourceGroup(vnetResourceGroupName)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants