-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(remote): implement mutual TLS authentication support #7851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Aaronontheweb
merged 22 commits into
akkadotnet:dev
from
Aaronontheweb:feature/mutual-tls-enforcement
Oct 3, 2025
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
b25327a
Add mutual TLS authentication support for DotNetty transport
Aaronontheweb ccde9a2
Update Akka.Remote security documentation
Aaronontheweb b5d3af9
Add proper code samples for TLS configuration documentation
Aaronontheweb 55fc19c
feat(remote): implement mutual TLS authentication support
Aaronontheweb 6716694
Fix markdown linting issues in security documentation
Aaronontheweb f23b042
Fix remaining markdown linting issues - convert bold text to proper h…
Aaronontheweb 074ad4a
Merge branch 'dev' into feature/mutual-tls-enforcement
Aaronontheweb 015d338
Fix title case issues in security.md documentation
Aaronontheweb d4c8a92
Add Tailscale and ZeroTier to cSpell dictionary
Aaronontheweb 4cb9cab
Merge branch 'dev' into feature/mutual-tls-enforcement
Aaronontheweb 7d57d19
Address PR review feedback on mutual TLS implementation
Aaronontheweb 77e4a8e
Merge branch 'feature/mutual-tls-enforcement' of https://github.com/A…
Aaronontheweb 46001ab
Add test for mutual TLS failure with different certificates
Aaronontheweb 2c029b2
Add client certificate for mutual TLS testing
Aaronontheweb e284de2
fixed `RemoteConfigSpec`
Aaronontheweb 7793879
Fix RemoteConfigSpec and add SSL defaults test
Aaronontheweb 7a7f3ca
remove redundant tests
Aaronontheweb b23c3cd
Restore DotNettySslSetupSpec and add mutual TLS Setup API test
Aaronontheweb 6503391
Fix DotNettySslSetupSpec compilation errors
Aaronontheweb 0780301
Revert "Fix DotNettySslSetupSpec compilation errors"
Aaronontheweb 0987073
Revert "Restore DotNettySslSetupSpec and add mutual TLS Setup API test"
Aaronontheweb ae9d0d6
Revert "remove redundant tests"
Aaronontheweb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
src/core/Akka.Docs.Tests/Configuration/TlsConfigurationSample.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| //----------------------------------------------------------------------- | ||
| // <copyright file="TlsConfigurationSample.cs" company="Akka.NET Project"> | ||
| // Copyright (C) 2009-2022 Lightbend Inc. <http://www.lightbend.com> | ||
| // Copyright (C) 2013-2025 .NET Foundation <https://github.com/akkadotnet/akka.net> | ||
| // </copyright> | ||
| //----------------------------------------------------------------------- | ||
|
|
||
| using Akka.Configuration; | ||
|
|
||
| namespace Akka.Docs.Tests.Configuration | ||
| { | ||
| /// <summary> | ||
| /// TLS configuration examples for Akka.Remote documentation | ||
| /// </summary> | ||
| public class TlsConfigurationSample | ||
| { | ||
| #region MutualTlsConfig | ||
| public static Config MutualTlsConfiguration = ConfigurationFactory.ParseString(@" | ||
| akka.remote.dot-netty.tcp { | ||
| enable-ssl = true | ||
| ssl { | ||
| suppress-validation = false | ||
| require-mutual-authentication = true # Both client and server authenticate | ||
| certificate { | ||
| path = ""path/to/certificate.pfx"" | ||
| password = ""certificate-password"" | ||
| } | ||
| } | ||
| } | ||
| "); | ||
| #endregion | ||
|
|
||
| #region StandardTlsConfig | ||
| public static Config StandardTlsConfiguration = ConfigurationFactory.ParseString(@" | ||
| akka.remote.dot-netty.tcp { | ||
| enable-ssl = true | ||
| ssl { | ||
| suppress-validation = false | ||
| require-mutual-authentication = false # Server authentication only | ||
| certificate { | ||
| path = ""path/to/certificate.pfx"" | ||
| password = ""certificate-password"" | ||
| } | ||
| } | ||
| } | ||
| "); | ||
| #endregion | ||
|
|
||
| #region WindowsCertStoreConfig | ||
| public static Config WindowsCertificateStoreConfiguration = ConfigurationFactory.ParseString(@" | ||
| akka.remote.dot-netty.tcp { | ||
| enable-ssl = true | ||
| ssl { | ||
| suppress-validation = false | ||
| require-mutual-authentication = true | ||
| certificate { | ||
| use-thumbprint-over-file = true | ||
| thumbprint = ""2531c78c51e5041d02564697a88af8bc7a7ce3e3"" | ||
| store-name = ""My"" | ||
| store-location = ""local-machine"" # or ""current-user"" | ||
| } | ||
| } | ||
| } | ||
| "); | ||
| #endregion | ||
|
|
||
| #region DevTlsConfig | ||
| // WARNING: Development only - never use suppress-validation = true in production! | ||
| public static Config DevelopmentTlsConfiguration = ConfigurationFactory.ParseString(@" | ||
| akka.remote.dot-netty.tcp { | ||
| enable-ssl = true | ||
| ssl { | ||
| suppress-validation = true # INSECURE: Accepts any certificate | ||
| require-mutual-authentication = false | ||
| certificate { | ||
| path = ""self-signed-dev-cert.pfx"" | ||
| password = ""password"" | ||
| } | ||
| } | ||
| } | ||
| "); | ||
| #endregion | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a second cert to TLS verification specs. |
Binary file not shown.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modernized the documentation quite a bit, but I'll need to do another PR that adds Mermaid support in order to get the handshake diagram to work.
Worth noting: the new Quic transports in Akka.NET v1.6 will, 100% always require a certificate in order to work. That is baked into how Quic works and is an unavoidable requirement.