-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Moved Ruby Password setting to Java implementation #18183
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
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
|
This pull request does not have a backport label. Could you fix it @andsel? 🙏
|
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.
Pull Request Overview
Migrates the Ruby Password setting class to a Java implementation to improve performance and maintainability. The change translates the existing Ruby LogStash::Setting::Password class into a plain Java PasswordSetting class while maintaining the same functionality and API.
- Implemented PasswordSetting in Java with identical coercion and validation logic
- Updated Ruby code to use the Java implementation via java_import
- Added comprehensive test coverage for the new Java implementation
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| logstash-core/src/main/java/org/logstash/settings/PasswordSetting.java | New Java implementation of password setting with coercion logic |
| logstash-core/src/test/java/org/logstash/settings/PasswordSettingTest.java | Test suite covering password setting validation and coercion scenarios |
| logstash-core/lib/logstash/settings.rb | Removed Ruby Password class and imported Java PasswordSetting |
| logstash-core/lib/logstash/environment.rb | Updated references to use PasswordSetting instead of Password |
| logstash-core/spec/logstash/settings/password_spec.rb | Updated test to expect IllegalArgumentException instead of ArgumentError |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
logstash-core/src/test/java/org/logstash/settings/PasswordSettingTest.java
Outdated
Show resolved
Hide resolved
logstash-core/src/test/java/org/logstash/settings/PasswordSettingTest.java
Outdated
Show resolved
Hide resolved
jsvd
left a comment
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, just address the whitespace and when typoes!
Co-authored-by: Copilot <[email protected]>
|
💚 Build Succeeded
History
cc @andsel |
…18183)" (elastic#18199) This reverts commit 105eecc.





Release notes
[rn:skip]
What does this PR do?
Translates Password setting class into plain Java.
Why is it important/What is the impact to the user?
N/A
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files (and/or docker env variables)Author's Checklist
How to test this PR locally
Enable http basic authentication and try to connect.
Update
logstash.ymlwith:Try to connect without user credentials header and verify that you don't have access.
Try with credentials and it works:
Related issues