generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 151
feat(s2n-quic-tls): record server's ConnectionInfo in s2n-quic's TLS Connection #2906
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
Conversation
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
5eec613 to
f0127dc
Compare
3e9f21c to
5f7e5b0
Compare
5f7e5b0 to
793aa05
Compare
quic/s2n-quic-tests/src/tests/tls_connection_with_server_address.rs
Outdated
Show resolved
Hide resolved
f9df0af to
d2030c8
Compare
fd4c02d to
dc5b469
Compare
dc5b469 to
d6197d8
Compare
c9aa47b to
19e876c
Compare
5929ad3 to
1b72dbc
Compare
* Make the new_server_session connectioninfo required * Add a comment about why we set connection info as a app cxt * Assert that connection_info is acquired in CHCallback * Simplify test address creating logic in integ test * Re-export ConnectionInfo for easier access
1b72dbc to
3aa4911
Compare
WesleyRosenblum
approved these changes
Dec 11, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Release Summary:
Set application context of s2n-tls connection with the ip address that client used to connect with the server.
Resolved issues:
Related to aws/s2n-tls#5649.
Description of changes:
The main change is the application context associated with the s2n_tls::Connection will be set with the client's remote address (server's local address), so that the server knows about the addressing information at the very early stage of the handshake.
Hence, we have to specifically set application context in the
Session::new()method. Since theSession::new()method and thenew_server_sessionmethod don't have access to the client's remote address, we will have to add a new parameter for those methods to pass in address information.Call-outs:
I am changing those two APIs in
s2n-quic-coreands2n-quic-tls, but the publics2n-quicAPI won't be changed. Our users shouldn't solely depend on s2n-quic-* creates other than thes2n-quiccrate, so I don't think my change would break customers.https://github.com/aws/s2n-quic/blob/main/quic/s2n-quic-core/README.md
Testing:
I add a unit test in
quic/s2n-quic-tls/src/tests.rs. The test sets up a new session and it proves the ip address information can be queried from the session's connection.In addition to a unit test, I also added a integration test. The
ch_callback_server_local_address_testtest would set up aClientHelloCallbackhandler and implement the trait. The test verifies that the client hello callback can accurately access the connection info set on thes2n-tls::Connection.This integration test is only available on Linux, since it's only available if s2n-quic is used with s2n-tls as its underlying TLS implementation.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.