Skip to content

docs: add authenticated silo connection sample - #10497

Closed
ReubenBond wants to merge 12 commits into
dotnet:mainfrom
ReubenBond:rb-authenticated-silo-connections
Closed

docs: add authenticated silo connection sample#10497
ReubenBond wants to merge 12 commits into
dotnet:mainfrom
ReubenBond:rb-authenticated-silo-connections

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Aug 11, 2026

Copy link
Copy Markdown
Member

Note

Depends on #10496. The sample uses the connection-authentication APIs and Entra provider introduced there, so its snippet and sample builds cannot pass against main until that prerequisite lands.

Adds a maintained sample and host documentation for securing silo-to-silo connections with mutual TLS and Microsoft Entra workload identities. The guidance covers certificate and token validation, cluster-scoped authorization, enforcement rollout and rollback, token expiry, and operational monitoring, and registers the sample in the docs navigation and sample gallery.

Microsoft Reviewers: Open in CodeFlow

Copilot AI lite review requested due to automatic review settings August 12, 2026 00:24
@ReubenBond
ReubenBond force-pushed the rb-authenticated-silo-connections branch from 1f20547 to d3f700e Compare August 12, 2026 00:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new maintained sample and accompanying hosting documentation for securing Orleans silo-to-silo connections using mutual TLS (mTLS) plus Microsoft Entra workload identity authentication, and wires the sample into the docs navigation and sample gallery.

Changes:

  • Adds the AuthenticatedSiloConnections sample project (options/config validation, TLS policy, Entra configuration, OpenTelemetry + structured logging).
  • Registers the sample in Samples.slnx, samples/README.md, and samples/gallery.json.
  • Adds a new hosting doc page + snippet project, and links it from the docs TOC and TLS doc.
Show a summary per file
File Description
samples/Samples.slnx Adds the new sample project to the samples solution.
samples/README.md Adds the sample to the samples list/table.
samples/gallery.json Registers the sample in the sample gallery manifest.
samples/AuthenticatedSiloConnections/SiloAuthentication.cs Implements TLS + Entra configuration and certificate pinning helper policy.
samples/AuthenticatedSiloConnections/SampleOptions.cs Adds strongly-typed configuration binding + validation for the sample.
samples/AuthenticatedSiloConnections/README.md Provides setup and operational guidance for running the sample.
samples/AuthenticatedSiloConnections/Program.cs Bootstraps the sample host (logging, OTEL metrics, Orleans, credential + cert loading).
samples/AuthenticatedSiloConnections/AuthenticatedSiloConnections.csproj New sample project file + dependencies.
samples/AuthenticatedSiloConnections/appsettings.json Default config template with placeholders for required values.
docs/site/src/content/docs/tutorials-and-samples/index.md Adds the sample to the docs “Tutorials and samples” index.
docs/site/src/content/docs/toc.yml Adds a new “Authenticated silo connections” entry under Hosting.
docs/site/src/content/docs/host/transport-layer-security.md Cross-links TLS docs to the new authenticated connections doc.
docs/site/src/content/docs/host/snippets/authenticated-silo-connections/csharp/AuthenticatedSiloConnections.Snippets.csproj Adds a snippet build project linking the sample code into docs snippets.
docs/site/src/content/docs/host/authenticated-silo-connections.md New end-to-end how-to guidance for silo connection authentication and rollout/monitoring.

Review details

Tip

Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 14/14 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread samples/AuthenticatedSiloConnections/Program.cs
Comment thread samples/AuthenticatedSiloConnections/SampleOptions.cs Outdated
ReubenBond and others added 11 commits August 11, 2026 19:35
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e71c4ddd-5362-4204-910f-9a742ddd63de
Add a bounded bearer-token handshake for silo-to-silo connections and an Entra workload identity provider with strict JWT and metadata validation.

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

Copilot-Session: e71c4ddd-5362-4204-910f-9a742ddd63de
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1a69ae4d-a036-4ccd-9a33-1e97fd1378cf
Use the finalized bounded authentication options, configure cluster audience binding and the security meter, and keep Required mode on built-in certificate validation.

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

Copilot-Session: e71c4ddd-5362-4204-910f-9a742ddd63de
Include the source-backed authenticated silo example in the aggregate host snippets solution.

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

Copilot-Session: e71c4ddd-5362-4204-910f-9a742ddd63de
Add independent gateway and external-client TLS plus bearer-token authentication using the existing generic and Entra mechanisms. Preserve silo registration compatibility, isolate client policies, and extend samples, docs, telemetry, API surfaces, and integration coverage.

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

Copilot-Session: e71c4ddd-5362-4204-910f-9a742ddd63de
Apply CheckCertificateRevocation consistently to TLS client and server authentication, cover both silo and external-client outbound paths, and align the TLS guidance.

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

Copilot-Session: e71c4ddd-5362-4204-910f-9a742ddd63de
Document secure topology planning, Entra and certificate provisioning, silo and client configuration, fail-closed test cases, staged rollout, monitoring, rotation, incident recovery, and production readiness.

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

Copilot-Session: e71c4ddd-5362-4204-910f-9a742ddd63de
State that authenticated silos and clients are admitted into the same coarse-grained trust boundary, that Orleans does not sandbox clients per grain call, and that configured storage and providers are trusted cluster infrastructure.

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

Copilot-Session: e71c4ddd-5362-4204-910f-9a742ddd63de
Use package references and sample-local central package versions so the authenticated connections sample satisfies the standalone sample validation introduced on main.

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

Copilot-Session: e71c4ddd-5362-4204-910f-9a742ddd63de
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 12, 2026 02:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

Suppressed comments (2)

samples/AuthenticatedSiloConnections/Program.cs:29

  • The OpenTelemetry resource uses Environment.MachineName as the serviceInstanceId, but this sample is intended to run two silo processes on the same machine. That results in identical resource attributes for both instances, making metrics/log correlation ambiguous in collectors/backends which key on service.name + service.instance.id.
    .ConfigureResource(resource => resource.AddService(
        serviceName: "authenticated-orleans-silo",
        serviceInstanceId: Environment.MachineName))

samples/AuthenticatedSiloConnections/SiloAuthentication.cs:86

  • SHA-256 certificate fingerprints are commonly formatted with spaces (in addition to colons). The current normalization only removes ':', so valid fingerprints like "AA BB ..." will fail parsing even though they represent the same bytes.
            var normalized = value.Replace(":", "", StringComparison.Ordinal);
  • Files reviewed: 14/14 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 12, 2026 09:13
@ReubenBond
ReubenBond force-pushed the rb-authenticated-silo-connections branch from 931feae to 0e70416 Compare August 12, 2026 09:13
@ReubenBond

Copy link
Copy Markdown
Member Author

CI investigation found two PR-caused failures on the previous head: the authenticated sample did not have its required sample-level Directory.Packages.props, and the documentation snippet referenced the Entra source project even though that dependency was absent from the branch. I rebased/stacked this branch onto #10496 at 0e7041615, where the corrected standalone package references, package versions, and snippet dependency are present. The SQL Server net8.0 failure was unrelated infrastructure behavior: seven tests failed after the SQL Server container began returning Login failed for user 'sa'; this PR does not modify ADO.NET code. The branch update has triggered fresh CI runs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

  • Files reviewed: 66/66 changed files
  • Comments generated: 2
  • Review effort level: Lite

@ReubenBond

Copy link
Copy Markdown
Member Author

Closing as an exact duplicate of #10496: both PRs currently point to commit 0e70416 and contain the same 66-file change. The authenticated-connection sample and guidance remain in #10496.

@ReubenBond ReubenBond closed this Aug 12, 2026
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.

2 participants