-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[improve][admin-cli] Add TLS provider support #16700
Conversation
# Set up TLS provider for web service | ||
# When TLS authentication with CACert is used, the valid value is either OPENSSL or JDK. | ||
# When TLS authentication with KeyStore is used, available options can be SunJSSE, Conscrypt and so on. | ||
webserviceTlsProvider= |
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.
do we really need this config? seems it's just the same as --tls-provider
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.
You are right, the webserviceTlsProvider
equals with --tls-provider
flag. I suggest we should add this 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.
Please add unit test for the new configuration and CLI option
7608de5
to
d713116
Compare
@codelipenghui Done, could you review this PR once? |
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, but I'm still concerned if we need to add the test to verify this configuration can work correctly. not just test the configuration has this property.
+ "When TLS authentication with CACert is used, the valid value is either OPENSSL or JDK. " | ||
+ "When TLS authentication with KeyStore is used, available options can be SunJSSE, Conscrypt " | ||
+ "and so on.") | ||
String 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.
Will it throw an exception if user providers lowercase like openssl
?
Or we can use Enum instead ?
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.
Will it throw an exception if user providers lowercase like
openssl
?
Yes. It will throw no Enum.
Or we can use Enum instead ?
Here are multiple values: OPENSSL, JDK, SunJSSE and so on.
Good catch. Currently, we are just verifying whether we load the tlsProvider config correctly, add an integration test is the next work. |
d713116
to
0104d0c
Compare
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
0104d0c
to
d01b6fb
Compare
(cherry picked from commit de42e15)
Signed-off-by: Zixuan Liu nodeces@gmail.com
Motivation
The
pulsar-admin
doesn't support setting the TLS provider.Default to OpenSSL implement, which doesn't support the switch to JDK implement, now we add support for this.
Modifications
webserviceTlsProvider
toclient.conf
filePulsarAdminTool.java
Documentation
Check the box below or label this PR directly.
Need to update docs?
doc-required
Add setting the
webserviceTlsProvider
toreference-configuration#client
section.doc-not-needed
(Please explain why)
doc
(Your PR contains doc changes)
doc-complete
(Docs have been already added)