-
Notifications
You must be signed in to change notification settings - Fork 3.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
HBASE-28008 Add support for netty tcnative #5363
Conversation
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
74e9a42
to
e1c4821
Compare
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
hbase-common/src/main/java/org/apache/hadoop/hbase/io/crypto/tls/X509Util.java
Show resolved
Hide resolved
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.
lgtm.
public static final String TLS_ENABLED_PROTOCOLS = CONFIG_PREFIX + "enabledProtocols"; | ||
public static final String TLS_CIPHER_SUITES = CONFIG_PREFIX + "ciphersuites"; | ||
public static final String TLS_CERT_RELOAD = CONFIG_PREFIX + "certReload"; | ||
public static final String TLS_USE_OPENSSL = CONFIG_PREFIX + "useOpenSsl"; |
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.
Why do you make these public? For consistency?
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.
Yea, IMO we should keep most config constants public. Even for an IA.Private class, if a user wants to pull in the config constants they should be able to. They open themselves up to risk of compatibility issues since it's still an IA.Private class, but imo when it comes to config constants it is less risky to use a constant than it is to hardcode a string that may change. Ideally we could refactor our config constant approach across the board to make them easier to integrate, but barring that I've been making consistency changes like this whenever I see them.
/** | ||
* Not all of our default ciphers are available in OpenSSL. Takes our default cipher lists and | ||
* filters them to only those available in OpenSsl. Does GCM first, then CBC because GCM tends to | ||
* be better and faster, and we don't need to worry about the java8 vs 9 performance issue if | ||
* OpenSSL is handling it. | ||
*/ |
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.
Nice approach. In ZooKeeper we simply don't set default cipher suites just let OpenSSL to decide. User can still override them though.
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.
Yea I went with this approach because I'm really not an SSL expert and dont have any opinions about the cipher suites used here or what's in openssl as defaults. So I figured I could make a least-invasive change which uses what was defaulted here an just filters to those that work.
hbase-common/src/main/java/org/apache/hadoop/hbase/io/crypto/tls/X509Util.java
Show resolved
Hide resolved
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
Signed-off-by: Duo Zhang <[email protected]> Reviewed-by: Andor Molnar <[email protected]>
Signed-off-by: Duo Zhang <[email protected]> Reviewed-by: Andor Molnar <[email protected]>
Signed-off-by: Duo Zhang <[email protected]> Reviewed-by: Andor Molnar <[email protected]>
This change is trivial, and I'm not sure how to unit test it given it requires tcnative to be on the classpath and on a supported architecture. I tested this in my environment with and without tcnative on the classpath.