-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
[TEST] Reload secure settings transport IT #31180
Merged
albertzaharovits
merged 10 commits into
elastic:reload-secure-store-action
from
albertzaharovits:ReloadIT
Jun 16, 2018
Merged
Changes from 3 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
9a1cca3
WIP
albertzaharovits e8c4e12
Raw test, no keystore present
albertzaharovits 2ed5ae1
Proper integ test for reload secret settings
albertzaharovits 9cab952
Merge branch 'reload-secure-store-action' into ReloadIT
albertzaharovits 68368a9
Small adjustment to the log message
albertzaharovits 9067cb4
Merge branch 'reload-secure-store-action' into ReloadIT
albertzaharovits afb0e11
Address feedback
albertzaharovits c46d311
Write keystore by ignoring the last Access Exception
albertzaharovits 6f8f504
Removed test keystore resources
albertzaharovits 50b433c
Shuffle with random()
albertzaharovits File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -308,7 +308,9 @@ public void decrypt(char[] password) throws GeneralSecurityException, IOExceptio | |
} | ||
if (formatVersion <= 2) { | ||
decryptLegacyEntries(); | ||
assert password.length == 0; | ||
if (password.length != 0) { | ||
throw new IllegalArgumentException("Keystore format does not accept non-empty passwords"); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2/2 non test change |
||
return; | ||
} | ||
|
||
|
This file contains 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
426 changes: 426 additions & 0 deletions
426
server/src/test/java/org/elasticsearch/action/admin/ReloadSecureSettingsIT.java
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+672 Bytes
server/src/test/resources/org/elasticsearch/action/admin/elasticsearch_1.keystore
Binary file not shown.
Binary file added
BIN
+672 Bytes
server/src/test/resources/org/elasticsearch/action/admin/elasticsearch_2.keystore
Binary file not shown.
Binary file added
BIN
+672 Bytes
server/src/test/resources/org/elasticsearch/action/admin/elasticsearch_3.keystore
Binary file not shown.
Binary file added
BIN
+672 Bytes
server/src/test/resources/org/elasticsearch/action/admin/elasticsearch_4.keystore
Binary file not shown.
3 changes: 3 additions & 0 deletions
3
server/src/test/resources/org/elasticsearch/action/admin/invalid.txt.keystore
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
admin admin | ||
dragon 12345 | ||
|
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.
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.
1/2 non test change