docs: add authenticated silo connection sample - #10497
Conversation
1f20547 to
d3f700e
Compare
There was a problem hiding this comment.
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
AuthenticatedSiloConnectionssample project (options/config validation, TLS policy, Entra configuration, OpenTelemetry + structured logging). - Registers the sample in
Samples.slnx,samples/README.md, andsamples/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
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>
There was a problem hiding this comment.
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>
931feae to
0e70416
Compare
|
CI investigation found two PR-caused failures on the previous head: the authenticated sample did not have its required sample-level |
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
mainuntil 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