NGFW-14480: Backend changes for ECH block #863
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.
Summary Of Implementation:
Due to the current behavior of browsers, we are not receiving any ECH (Encrypted Client Hello) packets that contain an encrypted SNI (Server Name Indication). As a result, this feature has not been fully tested in scenarios where the SNI is actually encrypted and not coming as plain text.
The current implementation is designed to handle cases where we receive an ECH record, but the hostname remains unencrypted. In these cases, the request is allowed to pass through, ensuring that the web filter and other filtering applications continue to function as expected.
However, if in the future no SNI is provided with an encrypted Client Hello packet, the request will be blocked according to the current implementation, and the client will see a web filter block page.
This implementation uses dual buffer processing because the positions of extension types vary across different browsers. Since the position of the SERVER_NAME and ENCRYPTED_CLIENT_HELLO extensions is not fixed, attempting to fetch both extensions in a single process can result in exception and cause a timeout error on the client side while processing the request. Hence created new method checkEchExtension to fetch ENCRYPTED_CLIENT_HELLO extentsion from dublicate buffer.
https://awakesecurity.atlassian.net/wiki/spaces/ngfw/pages/2704277528/Blocking+Support+for+ECH+in+Filter+Apps
Current Testing Steps:
Regression Testing:(Firefox and chrome)
Testing:(Firefox and chrome)