Repository navigation
Conversation
Signed-off-by: Jason Miller <[email protected]> Co-authored-by: Ryland Degnan <[email protected]>
Signed-off-by: Jason Miller <[email protected]> Co-authored-by: Ryland Degnan <[email protected]>
Signed-off-by: Jason Miller <[email protected]> Co-authored-by: Ryland Degnan <[email protected]>
Signed-off-by: Jason Miller <[email protected]> Co-authored-by: Ryland Degnan <[email protected]>
Fixes issue discussed here envoyproxy#18817 (comment) Signed-off-by: Ryan Northey <[email protected]> Signed-off-by: phlax <[email protected]>
|
Hi @jasonmillerstackpath, welcome and thank you for your contribution. We will try to review your Pull Request as quickly as possible. In the meantime, please take a look at the contribution guidelines if you have not done so already. |
|
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
Signed-off-by: Jason Miller <[email protected]>
Co-authored-by: Ryland Degnan <[email protected]> Signed-off-by: Jason Miller <[email protected]>
| /** | ||
| * @return ja3 fingerprint hash of the downstream connection, if any. | ||
| */ | ||
| virtual absl::string_view ja3Hash() const PURE; |
There was a problem hiding this comment.
This should be moved to ConnectionInfoProvider, which can be accessed from the Connection. Then you won't need a change in the http-connection-manager.
There was a problem hiding this comment.
Moved to ConnectionInfoProvider in commit 97f3f94.
| "envoy.config.filter.listener.tls_inspector.v2.TlsInspector"; | ||
|
|
||
| // Populate JA3 fingerprint hash using data from the TLS Client Hello packet. | ||
| bool enable_tls_ja3_fingerprinting = 1; |
There was a problem hiding this comment.
_tls is probably redundant in this name; it's already inside TlsInspector.
There was a problem hiding this comment.
Changed to enable_ja3_fingerprinting in commit 97f3f94.
| } | ||
| return absl::nullopt; | ||
| }); | ||
| } else if (field_name == "JA3_TLS_FINGERPRINT_HASH") { |
There was a problem hiding this comment.
I slightly prefer TLS_JA3_FINGERPRINT
There was a problem hiding this comment.
Changed to TLS_JA3_FINGERPRINT in commit 97f3f94.
Co-authored-by: Ryland Degnan <[email protected]> Signed-off-by: Jason Miller <[email protected]>
…onmillerstackpath/envoy into 16622-JA3-client-fingerprint Signed-off-by: Jason Miller <[email protected]>
Co-authored-by: Ryland Degnan <[email protected]> Signed-off-by: Jason Miller <[email protected]>
Co-authored-by: Ryland Degnan <[email protected]> Signed-off-by: Jason Miller <[email protected]>
ggreenway
left a comment
There was a problem hiding this comment.
Please also add an integration test that accepts a TLS connection and verifies that the ja3 hash is correct in the access log; that'll verify the full end-to-end feature.
I'm pretty sure you're missing a step to propagate the new value from the ListenSocket to the ConnectionInfoProvider.
/wait
| @@ -1,5 +1,6 @@ | |||
| #include "source/common/quic/envoy_quic_client_session.h" | |||
|
|
|||
| #include "source/common/common/empty_string.h" | |||
| #include <memory> | ||
|
|
||
| #include "source/common/common/assert.h" | ||
| #include "source/common/common/empty_string.h" |
| /** | ||
| * @return Connection ja3 fingerprint hash of the downstream connection, if any. | ||
| */ | ||
| virtual const std::string& ja3Hash() const PURE; |
There was a problem hiding this comment.
I think the changes to this interface can be reverted; you can already access this via (improperly named due to a rename at some point) virtual const Network::ConnectionInfoProvider& downstreamAddressProvider() const PURE;
Co-authored-by: Ryland Degnan <[email protected]> Signed-off-by: Jason Miller <[email protected]>
Co-authored-by: Ryland Degnan <[email protected]> Signed-off-by: Jason Miller <[email protected]>
|
Retrying Azure Pipelines: |
Co-authored-by: Ryland Degnan <[email protected]> Signed-off-by: Jason Miller <[email protected]>
Co-authored-by: Ryland Degnan <[email protected]> Signed-off-by: Jason Miller <[email protected]>
| "envoy.config.filter.listener.tls_inspector.v2.TlsInspector"; | ||
|
|
||
| // Populate `JA3` fingerprint hash using data from the TLS Client Hello packet. | ||
| bool enable_ja3_fingerprinting = 1; |
There was a problem hiding this comment.
Is it possible that we'd want the default value of this to change in the future? If so, please use google.protobuf.BoolValue instead of bool.
There was a problem hiding this comment.
Yeah, it's plausible that we may want to start using this for something internal, and that it would make sense to flip the default, so +1 on BoolValue type.
Co-authored-by: Ryland Degnan <[email protected]> Signed-off-by: Jason Miller <[email protected]>
Co-authored-by: Ryland Degnan <[email protected]> Signed-off-by: Jason Miller <[email protected]>
| enable_ja3_fingerprinting_(proto_config.enable_ja3_fingerprinting()), | ||
| max_client_hello_size_(max_client_hello_size) { | ||
|
|
||
| if (proto_config.has_enable_ja3_fingerprinting()) { |
There was a problem hiding this comment.
There's a helper macro for this pattern. Put back in the initializer list as enable_ja3_fingerprinting_(PROTOBUF_GET_WRAPPED_OR_DEFAULT(proto_config, proto_config.enable_ja3_fingerprinting, false)
Co-authored-by: Ryland Degnan <[email protected]> Signed-off-by: Jason Miller <[email protected]>
Co-authored-by: Ryland Degnan <[email protected]> Signed-off-by: Jason Miller <[email protected]>
|
@markdroth can you give a final pass on the API? |
|
/lgtm api |
ggreenway
left a comment
There was a problem hiding this comment.
Sorry, one least detail: please add a release note for this feature addition
Co-authored-by: Ryland Degnan <[email protected]> Signed-off-by: Jason Miller <[email protected]>
|
Merge conflict. Please merge main to resolve. /wait |
Extend TLS inspector to capture JA3 client fingerprint envoyproxy#16622 Co-authored-by: Ryland Degnan <[email protected]> Signed-off-by: Jason Miller <[email protected]>
Co-authored-by: Ryland Degnan <[email protected]> Signed-off-by: Jason Miller <[email protected]>
Commit Message: Extend TLS inspector to capture JA3 client fingerprint. Co-authored-by: Ryland Degnan [email protected]
Additional Description: See #16622. JA3 fingerprint information is available at https://github.com/salesforce/ja3 and at https://ja3er.com. Based off of closed PR #16628.
Risk Level: low
Testing: unit tests
Docs Changes: Documented in proto
Release Notes:
Platform Specific Features:
Fixes #16622