-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Broker] Full-support ssl provider, ciphers and protocols for broker service and proxy service #14569
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
[Broker] Full-support ssl provider, ciphers and protocols for broker service and proxy service #14569
Conversation
0a4df96 to
0e3b754
Compare
0e3b754 to
0100505
Compare
|
/pulsarbot rerun-failure-checks |
d28f8ef to
b400d0c
Compare
|
/pulsarbot rerun-failure-checks |
| if (tlsEnabledWithKeyStore) { | ||
| serverSSLContextAutoRefreshBuilder = new NettySSLContextAutoRefreshBuilder( | ||
| serviceConfig.getTlsProvider(), | ||
| serviceConfig.getServiceSslProvider(), |
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 not to use tlsProvider?
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.
And the webservice, websocket also use the tlsProvider as sslProviderString for JettySslContextFactoryWithAutoRefresh
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.
We have to know the SSLContext provider and SSL provider:
- The SSLContext provider is used to new SSLContext
- The SSL provider is used to handle the SSL(This is my understand).
The tlsProvider is the SSLContext provider, not the SSL provider.
Broker service:
With KeyStore, we only need to set the SSLContext provider, the current implementation doesn't support setting the SSL provider.
With CACert, we only need to set the SSL provider, the default should be OpenSSL, when the OpenSSL is not available, will use JDK.
Web service:
SSL context provider and SSL provider are the same.
When both use the KeyStore, we can use tlsProvider. When use the CACERT, the web service and broker service cannot use the same provider, so we need to split these config.
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.
There looks like I need to compatible the tlsProvider when using KeyStore?
|
@momo-jun a soft reminder: this PR is labeled |
|
@lhotari Could you review this PR? |
conf/broker.conf
Outdated
| brokerServicePortTls= | ||
|
|
||
| # Specify the ssl provider for the broker service: | ||
| # When using the CACert, available values are one of OpenSSL and JDK. |
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.
| # When using the CACert, available values are one of OpenSSL and JDK. | |
| # When using TLS authentication with CACert, the valid value is either OpenSSL or JDK. |
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.
Thanks @momo-jun, should be resolved now.
momo-jun
left a comment
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.
@nodece I left some comments regarding the annotations in the configurations.
BTW, if it's going to replace tlsprovider', does it make sense to use tls` to name the new configs?
|
@nodece one comment about these ciphers:
These are considered unsecure legacy ciphers which aren't supported in Netty with BoringSSL / netty-tcnative. I believe it's the same reason why Conscrypt doesn't support the CBC mode ciphers. |
|
Thanks @lhotari, but we should allow the users to set these ciphers, although these are not safe. |
| # authentication. | ||
| tlsRequireTrustedClientCertOnConnect=false | ||
|
|
||
| # Specify the TLS provider for the broker service: |
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.
@momo-jun need to add explanations to https://pulsar.apache.org/docs/en/next/reference-configuration/?
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.
Yep, to both broker/standalone and proxy sections. Will add the docs after the 2.10 release.
|
@nodece I'm not able to cherry-pick to branch-2.9 directly, could you please help push a PR to branch-2.9? |
…pache#14569) Signed-off-by: Zixuan Liu <nodeces@gmail.com>
…pache#14569) Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit 9b2ba05) Signed-off-by: Zixuan Liu <nodeces@gmail.com>
…pache#14569) Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit 9b2ba05) Signed-off-by: Zixuan Liu <nodeces@gmail.com>
…tocols (apache#14569)" This reverts commit 72aae15.
|
@nodece Please provide a correct documentation label for your PR. |
Motivation
The broker service and proxy service didn't full-support the SSL provider, ciphers and protocols config when using CA-Cert.
We are getting an error when we try to use certain TLS ciphers in Pulsar Broker:
The root cause is the broker service use CACert with OpenSSL SSL provider, which doesn't support these cipher, we need to switch to JDK provider, so we need to add a config to the support this.
Modifications
tlsProviderdescriptionDocumentation
Check the box below or label this PR directly (if you have committer privilege).
Need to update docs?
doc-completeUpdate
tlsProviderdescription in website.