Skip to content

Add cloud-aware endpoints and harden GCC blueprint setup - #478

Merged
Rick Brighenti (rbrighenti) merged 14 commits into
mainfrom
feature/cloud-agnostic-endpoints
Sep 28, 2026
Merged

Rick Brighenti (rbrighenti) merged 14 commits into
mainfrom
feature/cloud-agnostic-endpoints

Conversation

@rbrighenti

@rbrighenti Rick Brighenti (rbrighenti) commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds cloud-aware Microsoft Graph, OAuth authority, and Agent 365 Tools routing, with GCC Moderate validation for ordinary blueprint agents. Commercial endpoints remain the defaults; configurable endpoints and resource mappings do not imply certification of every government cloud.

  • Applies validated Graph/authority overrides consistently across setup, authentication, consent, queries, cleanup, and instance creation.
  • Uses the configured discovery endpoint's origin for related Agent 365 routes, while preserving explicit create/delete overrides.
  • Selects the appropriate Observability resource for the configured environment and migrates stale commercial Observability permissions.
  • Makes blueprint discovery and permission reads fail safely instead of creating duplicates or reporting unreadable grants as absent; preserves stored blueprint selection, valid secrets, and customized manifest names.
  • Fixes instance consent reporting and registration-only failure exit codes.
  • Addresses the remaining review findings: isolates Graph token caches/acquisition locks by normalized authority and tolerates malformed unrelated lookup rows without accepting invalid blueprint results.
  • Validates explicit messaging-endpoint create/delete overrides with the same HTTPS URL contract as discovery, rejecting user information, query strings, and fragments while retaining custom paths.
  • Integrates current main, including the BYO MCP device-code improvements, without rewriting branch history.

Configuration

For the GCC Moderate scenario exercised here:

export A365_ENVIRONMENT=gcc
export A365_DISCOVER_ENDPOINT_GCC=https://gcc.agent365.svc.cloud.microsoft/agents/v2/discoverMCPServers

GCC Moderate uses the default Graph and authority hosts. The environment name alone does not switch Agent 365 discovery away from the commercial service. Other environments can supply graphBaseUrl / authorityHost in config or higher-precedence A365_GRAPH_BASE_URL_{ENV} / A365_AUTHORITY_HOST_{ENV} variables. Graph/authority overrides must be HTTPS origins; environment suffixes are normalized, e.g. gcc-high becomes GCC_HIGH.

The CLI architecture documentation and Unreleased notes describe the behavior.

Validation evidence

Live results below were obtained on a18beb7de6 before this PR refresh. They are not a claim that the newly merged revision has already completed its live retest.

Area Observed result
GCC setup and registration Ordinary-blueprint provisioning, registration reuse/read-back, and separate S2S and OBO agent setup passed. Disposable-resource cleanup was verified in the earlier tenant; retained validation agents were not deleted.
Runtime telemetry Actual SDK exporters accepted success, controlled-failure, and restart traces in S2S and genuine delegated OBO flows. September 25 replay: six HTTP200 exports, twelve spans.
Defender The user confirmed visibility in the earlier tenant on September 21. Visibility in the newer tenant remains unconfirmed; ingestion HTTP200 alone is not backend visibility.
MCP sample Isolated CLI add/list/remove/configuration and scoped token acquisition passed. A Node protocol probe initialized GCC SimpleTools, listed its tools, and called read-only ListSampleProducts, returning Phone, Tablet, Laptop with isError:false.
Review regressions New tests reproduced the reported defects before the fixes; the focused merged-code run passes 170 tests. The subsequent endpoint-override fix has eight red-before/green-after cases and a passing 73-test endpoint/configuration/messaging selection.
Local suite With an isolated authentication-cache directory: 2,239 passed, 12 skipped, one host-dependent WSL test failed. The WSL failure and an initial populated-cache failure both reproduce on unchanged main; assertions were not weakened. Local execution uses .NET 10 roll-forward for net8 targets, not native .NET 8 coverage.

Copilot AI lite review requested due to automatic review settings July 24, 2026 16:00

This comment was marked as outdated.

This comment was marked as outdated.

Normalize cloud keys for environment overrides and route consent/token/Graph URL generation through cloud-aware helpers so arbitrary cloud names can be configured without code changes

Make client-credential token authority cloud-aware
@rbrighenti
Rick Brighenti (rbrighenti) force-pushed the feature/cloud-agnostic-endpoints branch from 84723d1 to c0d736c Compare July 24, 2026 16:09
Copilot AI review requested due to automatic review settings July 24, 2026 16:09

This comment was marked as outdated.

@github-actions github-actions Bot added documentation Improvements or additions to documentation feature labels Jul 24, 2026
@github-actions

This comment has been minimized.

This comment was marked as outdated.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 27, 2026 09:53

This comment was marked as outdated.

This comment was marked as outdated.

- InteractiveGraphAuthService: append /v1.0 to the cloud-specific Graph
  BaseUrl so overriding RequestAdapter.BaseUrl doesn't drop the API
  version segment and 404 every request; add regression test.
- BootstrapConfigResolver: pass the caller's CancellationToken into the
  'az cloud show' invocation so bootstrap can be cancelled.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 27, 2026 11:39

This comment was marked as outdated.

Copilot AI review requested due to automatic review settings September 9, 2026 13:29

This comment was marked as outdated.

Preserve cloud-aware routing alongside the BYO MCP device-code flow. Partition Graph token caches by authority and validate blueprint lookup rows without losing the stored blueprint. Add regression coverage and clarify explicit GCC endpoint configuration.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 25, 2026 14:45

This comment was marked as outdated.

@rbrighenti Rick Brighenti (rbrighenti) changed the title Add cloud-aware authority/graph endpoint resolution Add cloud-aware endpoints and harden GCC blueprint setup Sep 25, 2026
Apply the discovery HTTPS URL contract to explicit create/delete overrides before token acquisition, preserving valid custom paths and independent override precedence. Add regression tests for unsafe URL components and normalization.

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

This comment was marked as resolved.

Preserve the requested display-name-first single-result recovery behavior. Warn with stored and selected object IDs before setup persists the replacement; keep ambiguous and malformed lookups fail-closed. Document the requirement and cover mismatch, matching/no stored ID, and ambiguous results.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 25, 2026 15:18

This comment was marked as resolved.

Resolve the Observability resource inside existing cloud validation so AzureUSGovernment returns false with actionable guidance before Graph configuration or state writes. Cover all, identity and licenses runner modes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 25, 2026 15:50

This comment was marked as low quality.

@rbrighenti
Rick Brighenti (rbrighenti) merged commit 16e3d1e into main Sep 28, 2026
10 checks passed
@rbrighenti
Rick Brighenti (rbrighenti) deleted the feature/cloud-agnostic-endpoints branch September 28, 2026 15:50
Krishnadheeraj (DheerajPannala) added a commit that referenced this pull request Sep 28, 2026
…y-permissions

Conflict resolutions:
- GetFixedApiPermissionSpecs / admin-consent URL builders take both the
  cloud environment (#478) and includeObservability (#501); the skipped
  Observability spec, URL, and combined-URL scope stay omitted in every cloud.
- Portal walkthrough filter and ClearSkippedObservabilityConsentUrl match any
  cloud's Observability app ID (ConfigConstants.IsObservabilityApiAppId).
- S2S PowerShell keeps the spec-driven per-target block (resource IDs come from
  the cloud-aware specs); delegated Observability block keeps the skip gate and
  uses #478's cloud resource ID and Graph base URL.
- Registration failure keeps RecordRegistrationFailure (a superset of #478's
  --agent-registration-only error); #478's registration-only test now accepts
  the longer message, and #501's duplicate registration-only test is removed.
- CHANGELOG: kept all #478 entries, dropped the "full setup continues to treat
  registration as best-effort" clause that #501 changes for blueprint agents,
  and pointed Option B at the Observability app ID for the user's cloud.
- Tests: GCC cases pin the cross-cloud skip filter and consent-URL clear.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5cbf5f6b-cc40-4b7e-a591-65848db73a12
Krishnadheeraj (DheerajPannala) added a commit that referenced this pull request Sep 28, 2026
After merging #478, sovereign clouds use their own Observability app IDs, so
the README's opt-back-in command no longer hard-codes the commercial ID.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5cbf5f6b-cc40-4b7e-a591-65848db73a12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants