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

CLI: Suppress printing out of password to console when using auth command #2857

Merged
merged 4 commits into from
Dec 12, 2024

Conversation

malliaridis
Copy link
Contributor

@malliaridis malliaridis commented Nov 9, 2024

https://issues.apache.org/jira/browse/SOLR-17554

Description

The console is currently printing the username and password when the user enables authentication via

bin/solr auth enable --prompt true

This defeats the purpose of a hidden password prompt.

Solution

Do not print the password when basic authentication is enabled.

@malliaridis malliaridis requested a review from epugh November 9, 2024 13:56
@malliaridis malliaridis changed the title Improve console output of auth command CLI: Improve console output of auth command Nov 9, 2024
Copy link
Contributor

@epugh epugh left a comment

Choose a reason for hiding this comment

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

Nice! It's almost embarrassing we did it the way we did it!

@malliaridis
Copy link
Contributor Author

@epugh Is something like this worth a ticket or added in the changes (planning to backport it)?

@epugh
Copy link
Contributor

epugh commented Nov 10, 2024

@epugh Is something like this worth a ticket or added in the changes (planning to backport it)?

Normally I would say no. However, since it improves our security posture? That might be worth going in CHANGES.txt.

@epugh
Copy link
Contributor

epugh commented Dec 12, 2024

we should try and get this in.... do you want me to take it forward?

@malliaridis
Copy link
Contributor Author

do you want me to take it forward?

If you have the time please do. I am a bit busy and this should already been merged. It should be backported to 9.x and 9.8 as well. Should also resolve SOLR-17554, which was created after the PR.

@epugh epugh changed the title CLI: Improve console output of auth command CLI: Suppress printing out of password to console when using auth command Dec 12, 2024
@epugh epugh merged commit aadac83 into apache:main Dec 12, 2024
4 checks passed
epugh pushed a commit that referenced this pull request Dec 12, 2024
…mand (#2857)

---------

Co-authored-by: Eric Pugh <epugh@opensourceconnections.com>
(cherry picked from commit aadac83)
epugh pushed a commit that referenced this pull request Dec 12, 2024
…mand (#2857)

---------

Co-authored-by: Eric Pugh <epugh@opensourceconnections.com>
(cherry picked from commit aadac83)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants