Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix permissions issues while reading keys in PKCS#1 format (#3289)
### Description Netty has logic to use the BouncyCastlePemReader if BouncyCastle is located on the class path. The BouncyCastle provider loaded properly in netty, but was failing to read the private key with permissions issues that failed silently. With netty, if one PemReader fails they will fall back to the next which is only capable of reading keys in the PKCS#8 format. The regression in PKCS#1 keys happened when bouncycastle was upgraded from jdk15on to jdk15to18. This PR adds permissions to ensure that netty can read the PKCS#1 keys. This PR also cleans up the policy file to have a single entry for `permission java.util.PropertyPermission "*","read,write";` because the other entries are redundant. Open Questions: - There is a test in SSLTest to ensure PKCS#1 keys can be read. Why did that test not catch this? * Category (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation) Bug fix ### Issues Resolved #3281 ### Testing Used the same certs from the SSLTest for PKCS#1 keys. Before the change the 2.9.0 cluster could not be brought up, after the change the cluster starts successfully. ### Check List - [ ] New functionality includes testing - [ ] New functionality has been documented - [ ] Commits are signed per the DCO using --signoff By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). --------- Signed-off-by: Craig Perkins <cwperx@amazon.com>
- Loading branch information