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

Backport PR #15737 to 8.12: Fix logstash-keystore multiple keys operations with command flags #15739

Merged
merged 1 commit into from Jan 3, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jan 3, 2024

Backport PR #15737 to 8.12 branch, original message:


Release notes

[rn:skip]

What does this PR do?

Since logstash-keystore command supports multiple key (#15612), it has broken the following command in ECK as logstash-keystore takes --stdin - and any other possible flag - as the second key, and not as a command option:

echo 'y' | bin/logstash-keystore add HELLO --stdin < HELLO

This PR fixes how the keystore tool handle command's options, including validation for unknown options, and adding the --stdin flag to the add command.

Why is it important/What is the impact to the user?

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files (and/or docker env variables)
  • I have added tests that prove my fix is effective or that my feature works

How to test this PR locally

The following command should include a key named FOO with password FOO_PASSWORD:

> echo 'FOO_PASSWORD' > test.txt 
> echo 'y' | bin/logstash-keystore add FOO --stdin < test.txt

Related issues

…5737)

This commit fixes how the keystore tool handle the command's options, including validation for unknown options, and adding the --stdin flag to the add command.

(cherry picked from commit 41ec183)
Copy link

Quality Gate passed Quality Gate passed

The SonarQube Quality Gate passed, but some issues were introduced.

3 New issues
0 Security Hotspots
96.0% 96.0% Coverage on New Code
0.0% 0.0% Duplication on New Code

See analysis details on SonarQube

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

Copy link
Contributor

@kaisecheng kaisecheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kaisecheng kaisecheng merged commit 25a381b into 8.12 Jan 3, 2024
5 checks passed
@jsvd jsvd deleted the backport_15737_8.12 branch March 11, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants