Add tests for errors thrown by Security Providers#67259
Merged
jkakavas merged 7 commits intoelastic:masterfrom Jan 14, 2021
Merged
Add tests for errors thrown by Security Providers#67259jkakavas merged 7 commits intoelastic:masterfrom
jkakavas merged 7 commits intoelastic:masterfrom
Conversation
We handled the exceptions thrown by Security Providers in the case of short encryption keys in elastic#65464 and this commit adds a couple of tests to validate that the appropriate exceptions are thrown when encryption keys derived from short passwords are in use, in FIPS 140-2 mode.
Collaborator
|
Pinging @elastic/es-security (Team:Security) |
BigPandaToo
reviewed
Jan 11, 2021
| public void testDecryptKeyStoreWithShortPasswordInFips() throws Exception { | ||
| assumeTrue("This should run only in FIPS mode", inFipsJvm()); | ||
| KeyStoreWrapper keystore = KeyStoreWrapper.create(); | ||
| keystore.save(env.configFile(), "alongenoughpassword".toCharArray()); |
Contributor
There was a problem hiding this comment.
SHould we add the save when trying to save keystore with a short pwd?
Contributor
Author
There was a problem hiding this comment.
These both use the same code ( KeystoreWrapper#createCipher ) so I considered coverage sufficient. No objections to add one more test if you think it's useful though
Contributor
There was a problem hiding this comment.
Leaving it up to you.
LGTM otherwise
BigPandaToo
approved these changes
Jan 11, 2021
Contributor
Author
|
@elasticmachine update branch |
Contributor
Author
|
@elasticmachine update branch |
jkakavas
added a commit
to jkakavas/elasticsearch
that referenced
this pull request
Jan 15, 2021
We handled the exceptions thrown by Security Providers in the case of short encryption keys in elastic#65464 and this commit adds a couple of tests to validate that the appropriate exceptions are thrown when encryption keys derived from short passwords are in use, in FIPS 140-2 mode.
jkakavas
added a commit
to jkakavas/elasticsearch
that referenced
this pull request
Jan 15, 2021
We handled the exceptions thrown by Security Providers in the case of short encryption keys in elastic#65464 and this commit adds a couple of tests to validate that the appropriate exceptions are thrown when encryption keys derived from short passwords are in use, in FIPS 140-2 mode.
jkakavas
added a commit
that referenced
this pull request
Jan 15, 2021
We handled the exceptions thrown by Security Providers in the case of short encryption keys in #65464 and this commit adds a couple of tests to validate that the appropriate exceptions are thrown when encryption keys derived from short passwords are in use, in FIPS 140-2 mode.
jkakavas
added a commit
that referenced
this pull request
Jan 15, 2021
We handled the exceptions thrown by Security Providers in the case of short encryption keys in #65464 and this commit adds a couple of tests to validate that the appropriate exceptions are thrown when encryption keys derived from short passwords are in use, in FIPS 140-2 mode.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We handled the exceptions thrown by Security Providers in the case
of short encryption keys in #65464 and this commit adds a couple
of tests to validate that the appropriate exceptions are thrown
when encryption keys derived from short passwords are in use, in
FIPS 140-2 mode.