You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/03/22 09:44:58 UTC
[GitHub] [pulsar] nodece opened a new pull request #14798: [improve][security] add load multiple certificates support
nodece opened a new pull request #14798:
URL: https://github.com/apache/pulsar/pull/14798
Signed-off-by: Zixuan Liu <no...@gmail.com>
Fixes #14733
### Motivation
When a ca file includes multiple ca data, TrustManagerProxy only loads a ca data, we should add multiple ca data.
### Modifications
- add load multiple certificates support
### Verifying this change
- [x] Make sure that the change passes the CI checks.
This change added tests and can be verified as follows:
- Add TrustManagerProxyTest for this
### Documentation
- [x] `no-need-doc`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] nodece commented on a change in pull request #14798: [improve][security] Add load multiple certificates support
Posted by GitBox <gi...@apache.org>.
nodece commented on a change in pull request #14798:
URL: https://github.com/apache/pulsar/pull/14798#discussion_r832792425
##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/util/TrustManagerProxy.java
##########
@@ -74,11 +76,16 @@ private void updateTrustManager() throws CertificateException, KeyStoreException
FileNotFoundException, IOException {
CertificateFactory factory = CertificateFactory.getInstance("X.509");
try (InputStream inputStream = new FileInputStream(certFile.getFileName())) {
- X509Certificate certificate = (X509Certificate) factory.generateCertificate(inputStream);
- String alias = certificate.getSubjectX500Principal().getName();
KeyStore keyStore = KeyStore.getInstance("JKS");
Review comment:
We should pass the KeyStore type to `TrustManagerProxy`, right now we are using JKS.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] asardaes commented on a change in pull request #14798: [improve][security] Add load multiple certificates support
Posted by GitBox <gi...@apache.org>.
asardaes commented on a change in pull request #14798:
URL: https://github.com/apache/pulsar/pull/14798#discussion_r832508322
##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/util/TrustManagerProxy.java
##########
@@ -74,11 +76,16 @@ private void updateTrustManager() throws CertificateException, KeyStoreException
FileNotFoundException, IOException {
CertificateFactory factory = CertificateFactory.getInstance("X.509");
try (InputStream inputStream = new FileInputStream(certFile.getFileName())) {
- X509Certificate certificate = (X509Certificate) factory.generateCertificate(inputStream);
- String alias = certificate.getSubjectX500Principal().getName();
KeyStore keyStore = KeyStore.getInstance("JKS");
Review comment:
Any particular reason JKS is hardcoded instead of using the JVM's default type?
```suggestion
KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] asardaes commented on pull request #14798: [improve][security] Add load multiple certificates support
Posted by GitBox <gi...@apache.org>.
asardaes commented on pull request #14798:
URL: https://github.com/apache/pulsar/pull/14798#issuecomment-1086727348
That looks good to me, but I don't have write access to the repo.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] nodece commented on pull request #14798: [improve][security] Add load multiple certificates support
Posted by GitBox <gi...@apache.org>.
nodece commented on pull request #14798:
URL: https://github.com/apache/pulsar/pull/14798#issuecomment-1086787110
/pulsarbot run-failure-checks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] nodece commented on pull request #14798: [improve][security] Add load multiple certificates support
Posted by GitBox <gi...@apache.org>.
nodece commented on pull request #14798:
URL: https://github.com/apache/pulsar/pull/14798#issuecomment-1075200446
/pulsarbot run-failure-checks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] nodece commented on pull request #14798: [improve][security] Add load multiple certificates support
Posted by GitBox <gi...@apache.org>.
nodece commented on pull request #14798:
URL: https://github.com/apache/pulsar/pull/14798#issuecomment-1086665445
@asardaes Could you review this PR again? Thanks for your time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] nodece commented on pull request #14798: [improve][security] Add load multiple certificates support
Posted by GitBox <gi...@apache.org>.
nodece commented on pull request #14798:
URL: https://github.com/apache/pulsar/pull/14798#issuecomment-1086787079
Thank @asardaes for your review!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org