-
Notifications
You must be signed in to change notification settings - Fork 25k
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
URL option for BaseRunAsSuperuserCommand #81025
Merged
Merged
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a700e8a
URL option for BaseRunAsSuperuserCommand
jkakavas 84d1590
spotless
jkakavas 8985bf7
remove unnecessary mocks
jkakavas 0d01fd8
add example for setting --url
jkakavas 24e9d21
Merge remote-tracking branch 'origin/master' into add-url-option-cli
jkakavas 33824c5
update docs
jkakavas 24c793c
Merge remote-tracking branch 'origin/master' into add-url-option-cli
jkakavas 36735f5
apply suggestions from code review
jkakavas 072b863
Merge remote-tracking branch 'origin/master' into add-url-option-cli
jkakavas 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
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
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
Oops, something went wrong.
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.
Do you think it would be preferable that we drop the "If
xpack.security.http.ssl.enabled
is set totrue
,you must specify an HTTPS URL" scheme condition, by having the tool check for that itself (like it does for the "default URL")?
Moreover, a URL is more than the scheme and the host and port pair, and using DNS names to refer to the node might not be ideal, as it might not be included in the SAN of the cert.
Do you think it would be preferable that this option be more focused on the ip and port that the local node can be reached at?
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 contemplated the same but in the end settled to a single option as a simpler thing, happy to discuss.
true but what we should be aiming for here is not naming strictness for the sake of it but a name for the option that’s understandable by (or at least explainable for ) the majority of users. I think that
url
fits the bill.the idea is that if you ever need to use this parameter you do so because you know that you want to talk to the node at an ip or hostname that is in the SANs but CommandLineHttpClient picks another. So you know what should be in the url (either a hostname or an IP address )
If we change this to two parameters then yes it makes sense , we shouldn’t be asking the users for a third parameter (scheme) but I’m not 100% that ee should change.
Do we introduce an ip and a port parameter? Do we mandate both if one is passed or have default values for the port ?
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 don't have a preference. Having to specify both the ip and the port simultaneously (as is the case with this
url
parameter), as a single option is OK.