session: fix mailbox TLS ALPN regression#1254
session: fix mailbox TLS ALPN regression#1254starius wants to merge 2 commits intolightninglabs:masterfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical regression in mailbox TLS ALPN negotiation caused by an upgrade to Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request addresses a TLS ALPN regression caused by an update to grpc-go. The solution involves introducing custom TLS transport credentials for mailbox connections to bypass the strict ALPN negotiation enforcement. The changes are well-contained and correctly applied in the server and integration tests. I have one suggestion to simplify the implementation in the new tls_credentials.go file by using a more modern Go API.
Starting in grpc-go v1.67.0, clients and servers reject TLS handshakes when ALPN is not negotiated. This changed the default value of GRPC_ENFORCE_ALPN_ENABLED from false to true. The default flip is in grpc/grpc-go#7535 Our mailbox transport handshake can reach endpoints that currently do not negotiate ALPN, so LNC session setup started failing and the lnc_auth flow timed out, with malformed header/content-type errors showing up later on the stream path. This adds mailbox-specific TLS transport credentials that allow a missing negotiated ALPN value for mailbox links. The mailbox server path and the integration-test mailbox clients now use these credentials, so session establishment works again.
ViktorT-11
left a comment
There was a problem hiding this comment.
Thank you so much for this @starius 🙏!
tACK LGTM 🔥
|
thanks @starius - perhaps worth a release note entry? |
|
@starius, remember to re-request review from reviewers when ready |
Starting in grpc-go v1.67.0, clients and servers reject TLS handshakes when ALPN is not negotiated. This changed the default value of
GRPC_ENFORCE_ALPN_ENABLEDfrom false to true. The default flip is in grpc/grpc-go#7535Our mailbox transport handshake can reach endpoints that currently do not negotiate ALPN, so LNC session setup started failing and the
lnc_authflow timed out, with malformed header/content-type errors showing up later on the stream path.This PR adds mailbox-specific TLS transport credentials that allow a missing negotiated ALPN value for mailbox links. The mailbox server path and the integration-test mailbox clients now use these credentials, so session
establishment works again.