Skip to content

Commit afc2a98

Browse files
CopilotReubenBond
andcommitted
Update TLS documentation to follow OS default protocol best practices
Co-authored-by: ReubenBond <[email protected]>
1 parent 5382b9c commit afc2a98

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

docs/orleans/host/snippets/transport-layer-security/csharp/SiloExample/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ public static async Task ConfigureAdvancedTls()
121121
options.OnAuthenticateAsClient = (connection, sslOptions) =>
122122
{
123123
sslOptions.TargetHost = "my-certificate-subject";
124-
sslOptions.EnabledSslProtocols = SslProtocols.Tls12 | SslProtocols.Tls13;
125124
};
126125

127126
options.CheckCertificateRevocation = true;

docs/orleans/host/snippets/transport-layer-security/vb/SiloExample/Program.vb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ Class AdvancedExample
113113

114114
options.OnAuthenticateAsClient = Sub(connection, sslOptions)
115115
sslOptions.TargetHost = "my-certificate-subject"
116-
sslOptions.EnabledSslProtocols = SslProtocols.Tls12 Or SslProtocols.Tls13
117116
End Sub
118117

119118
options.CheckCertificateRevocation = True

docs/orleans/host/transport-layer-security.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ In the preceding code:
7676

7777
- The <xref:Orleans.Connections.Security.TlsOptions.LocalServerCertificateSelector%2A> callback dynamically selects the appropriate server certificate.
7878
- The <xref:Orleans.Connections.Security.TlsOptions.RemoteCertificateValidation%2A> callback provides custom validation logic for remote certificates.
79-
- The <xref:Orleans.Connections.Security.TlsOptions.OnAuthenticateAsClient%2A> callback configures SSL protocol versions using <xref:System.Security.Authentication.SslProtocols.Tls12> and <xref:System.Security.Authentication.SslProtocols.Tls13>.
8079
- The <xref:Orleans.Connections.Security.TlsOptions.CheckCertificateRevocation%2A> property enables certificate revocation checking.
8180

8281
## Configure TLS on clients
@@ -115,7 +114,7 @@ Configure a client using a certificate file as shown in the following example:
115114
Follow these best practices when configuring TLS in Orleans:
116115

117116
- **Use the latest TLS protocol**: Always prefer TLS 1.2 or TLS 1.3 for the strongest security. Avoid TLS 1.0 and TLS 1.1, which have known vulnerabilities.
118-
- **Let the OS choose the protocol version**: Avoid explicitly setting TLS protocol versions in production code. Instead, defer to operating system defaults by using <xref:System.Security.Authentication.SslProtocols.None>, which allows the OS to automatically select the best protocol.
117+
- **Let the OS choose the protocol version**: Don't explicitly set TLS protocol versions in production code. Instead, defer to operating system defaults to automatically select the best protocol. Only explicitly set protocol versions if you have a specific compatibility requirement with legacy systems. When you explicitly set protocol versions, your application can't automatically benefit from newer protocols added in future OS updates.
119118
- **Validate certificates**: Always validate certificate chains, expiration dates, and hostname matches in production. Never use `AllowAnyRemoteCertificate()` or disable certificate validation outside of development environments.
120119
- **Enable certificate revocation checking**: Use <xref:Orleans.Connections.Security.TlsOptions.CheckCertificateRevocation%2A> to verify that certificates haven't been revoked.
121120
- **Use strong certificates**: Ensure your X.509 certificates use strong key lengths (at least 2048 bits for RSA) and are signed by a trusted Certificate Authority (CA).

0 commit comments

Comments
 (0)