-
Notifications
You must be signed in to change notification settings - Fork 205
Authenticate connection IDs #3499
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
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
2fc5157
Authenticate connection IDs
martinthomson 0560290
Review feedback from David and Martin
martinthomson beba71f
Less text, more cross-reference
martinthomson efb4c78
singular
martinthomson 41928cd
complete sentences.
martinthomson f44f24e
Merge branch 'master' into authenticate-hs-cid
martinthomson c7a2360
Jana's suggestion from review
martinthomson 6f5e547
Reformat
martinthomson 8cec1c2
Rename to initial_connection_id
martinthomson b0ef978
Merge branch 'master' into authenticate-hs-cid
martinthomson e2f2b33
Restore active_connection_id_limit
martinthomson e30cf5f
Editorial comments thanks to @DavidSchinazi
martinthomson 81bcdb6
Merge branch 'master' into authenticate-hs-cid
martinthomson 740cd92
Add a picture
martinthomson 6c04620
Merge branch 'master' into authenticate-hs-cid
martinthomson 6ae7f18
Use a more generic reference
martinthomson fee4020
Correct a few more errors
martinthomson 27dfb69
Fewer words
martinthomson 62103ce
Only valid packets change this state
martinthomson 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
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
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.
The absence / presence checks should result in TRANSPORT_PARAMETER_ERROR.
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.
I'm not sure I agree. TRANSPORT_PARAMETER_ERROR indicates a parse issue, whereas this validation is performed somewhere else in our implementation.
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.
Our rule for FRAME_ENCODING_ERROR is that we use that error code when the error is detectable while parsing the frame, without accessing connection state. I'd argue that we should apply a similar logic here. The absence of
initial_source_connection_idandoriginal_destination_connection_iddefinitely falls in that category, and I'd put the absence / presence ofretry_source_connection_idin the same category, although I could see why someone could make an argument against this.The mismatch seems to be a clear case for PROTOCOL_VIOLATION.
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.
I like that rationale. I could also see my way to choose TRANSPORT_PARAMETER_ERROR. We use that for transport parameters that are present when they are disallowed (like preferred_address from a client) in addition to obvious encoding problems, which suggests that you might implement this as
if transport_parameters.bad() then TRANSPORT_PARAMETER_ERROR, but this validation does involve accessing external state, as you say, so a different code is fully justified.