-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Add support to add and remove multiple keystore keys in a single operation #15612
Add support to add and remove multiple keystore keys in a single operation #15612
Conversation
9463fee
to
2385532
Compare
Fixed/Added empty and ASCII value validation
2385532
to
f36a46d
Compare
final SecretIdentifier id = new SecretIdentifier(argument); | ||
final byte[] existingValue = secretStore.retrieveSecret(id); | ||
if (existingValue != null) { | ||
SecretStoreUtil.clearBytes(existingValue); |
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.
Wondering if it's really needed?
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.
I prefer to keep it to avoid jvm dump leak the value
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.
Nice work. It works as described. I suggested to add ASCII limitation to the docs.
Otherwise, LGTM
|
||
["source","sh",subs="attributes"] | ||
---------------------------------------------------------------- | ||
bin/logstash-keystore remove ES_PWD | ||
bin/logstash-keystore remove ES_USER ES_PWD |
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.
Let's add a note to remind user that the value should only be ASCII.
final SecretIdentifier id = new SecretIdentifier(argument); | ||
final byte[] existingValue = secretStore.retrieveSecret(id); | ||
if (existingValue != null) { | ||
SecretStoreUtil.clearBytes(existingValue); |
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.
I prefer to keep it to avoid jvm dump leak the value
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.
LGTM
Co-authored-by: kaisecheng <[email protected]>
SonarQube Quality Gate |
💔 Build Failed
Failed CI StepsHistory
|
Release notes
What does this PR do?
Why is it important/What is the impact to the user?
Currently, adding keys to the keystore need to call command
logstash-keystore add YOUR_KEY
one by one for each key, which is very time-consuming because it starts and stops JVM each time.Checklist
How to test this PR locally
Related issues