Skip to content
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

Limit the scope of BouncyCastle dependency (#30358) #30959

Merged
merged 3 commits into from
May 31, 2018

Conversation

jkakavas
Copy link
Member

Limits the scope of the runtime dependency on
BouncyCastle so that it can be eventually removed.

  • Splits functionality related to reading and generating certificates
    and keys in two utility classes so that reading certificates and
    keys doesn't require BouncyCastle.
  • Implements a class for parsing PEM Encoded key material (which also
    adds support for reading PKCS8 encoded encrypted private keys).
  • Removes BouncyCastle dependency for all of our test suites(except
    for the tests that explicitly test certificate generation) by using
    pre-generated keys/certificates/keystores.

Limits the scope of the runtime dependency on
BouncyCastle so that it can be eventually removed.

* Splits functionality related to reading and generating certificates
and keys in two utility classes so that reading certificates and
keys doesn't require BouncyCastle.
* Implements a class for parsing PEM Encoded key material (which also
adds support for reading PKCS8 encoded encrypted private keys).
* Removes BouncyCastle dependency for all of our test suites(except
for the tests that explicitly test certificate generation) by using
pre-generated keys/certificates/keystores.
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security

@jkakavas
Copy link
Member Author

This has been reviewed and approved in #30358. I am backporting via a PR in order to get the benefit of a full CI run

jkakavas and others added 2 commits May 31, 2018 18:20
)

* Ensure that a purposefully wrong key is used

Uses a specific keypair for tests that require a purposefully wrong
keypair instead of selecting one randomly from the same pull from
which the correct one is selected. Entropy is low because of the
small space and the same key can be randomly selected as both the
correct one and the wrong one, causing the tests to fail.
The purposefully wrong key is also used in 
testSigningKeyIsReloadedForEachRequest and needs to be cleaned
up afterwards so the rest of the tests don't use that for signing.

Resolves elastic#30970
@jkakavas jkakavas merged commit 8b6e89d into elastic:6.x May 31, 2018
dnhatn added a commit that referenced this pull request May 31, 2018
* 6.x:
  HLRest: Allow caller to set per request options (#30490)
  Limit the scope of BouncyCastle dependency (#30959)
  Deprecates indexing and querying a context completion field without context (#31006)
  [DOCS] Clarify not all PKCS12 usable as truststores (#30750)
  Harmonize include_defaults tests (#30700)
  [DOCS] Update readme for testing x-pack code snippets (#30696)
  [Docs] Fix typo in Min Aggregation reference (#30899)
@jkakavas jkakavas deleted the remove-bouncy-castle-dependency-6x branch September 14, 2018 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants