-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
More clearly negotiate ALPN information #19804
base: main
Are you sure you want to change the base?
Conversation
When you say "more clearly" I assume this makes things more obvious in the logs? Could you show before & after please? |
@ncabatoff No, this does not affect the log output at all except for bad clients. This is from a TLS protocol standpoint, rather than returning all of the client's requested protocols as the list of protocols the server supports (for Go to choose one, usually the first one), we'll instead return only the one we have a handler for. From Brian's investigation, namely here, we only send one in the client anyways, hence why this change shouldn't impact clients or servers at all and is mostly just cleanup. I think, at worst, you'd previously see a line from here in the logs:
if you send a client with e.g.,. (But now, this would succeed, negotiating I guess, to restate, "clearly" is from a developer's perspective, not from an operator's perspective. :-) |
Vault's cluster listener would previously select ALPN information via returning the client's list of supported protocols, after first ensuring at least one match existed in the handler list. This had two implications: 1. The globally set NextProtos are ignored. 2. A client sending multiple ALPNs could result in an ALPN without a handler being negotiated. -> As a side effect here, we'd also present any CA information for our found ALPN handler, even if another one was chosen instead. Thus, we explicitly restrict NextProtos to the protocol we have specified certificates for (and expect to negotiate). This was found in discussion with Brian and Scott. Co-authored-by: Brian Kassouf <briankassouf@users.noreply.github.com> Co-authored-by: Scott Miller <smiller@hashicorp.com> Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
6738912
to
87c7a5d
Compare
Fixed the build errors. :-) But, it looks like this fails in Enterprise PR:
|
This is missing the |
@calvn Most likely when I have cycles to look at this again and figure out the state it is in, it'll be an enhancement for the future, targeting 1.15+. I've updated milestones appropriately, thank you! |
Vault's cluster listener would previously select ALPN information via returning the client's list of supported protocols, after first ensuring at least one match existed in the handler list.
This had two implications:
-> As a side effect here, we'd also present any CA information for our found ALPN handler, even if another one was chosen instead.
Thus, we explicitly restrict NextProtos to the protocol we have specified certificates for (and expect to negotiate).
This was found in discussion with Brian and Scott.