SOLR-17697: Implement picocli for auth command / AuthTool - #4684
Merged
janhoy merged 2 commits intoAug 3, 2026
Conversation
epugh
reviewed
Jul 30, 2026
…methods Restructures the monolithic handleBasicAuth(cli) into an AuthParams record and cli-free handleCommand()/enableBasicAuth()/disableBasicAuth()/ clearSecurityJson() methods. The ZooKeeper connection string is resolved once in runImpl (skipped with --update-include-file-only) and passed as a plain nullable String; error reporting stays at the existing check sites. No functional change intended.
Adds the picocli annotation, option fields and callTool() to AuthTool, building the same AuthParams and calling the same handleCommand() as the commons-cli path. Includes AuthToolPicocliTest running the inherited AuthToolTest suite through picocli, and ref-guide docs for bin/solr auth.
janhoy
force-pushed
the
jira/SOLR-17697-picocli-auth
branch
from
July 31, 2026 01:14
a0bab52 to
0e3d509
Compare
41 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds picocli support to
AuthToolfollowing the established dual-path pattern:handleBasicAuth(CommandLine)intoenableBasicAuth/disableBasicAuthoperating on a sharedAuthParamsrecord plus a pluggable zk-host resolver, so both parsing paths run identical code.@Commandannotation with examples and exit codes;enable|disableas a positional parameter; options mirror the commons-cli definitions, with connection/credentials options provided by theZkConnectionOptionsmixin (includes the new-s/--solr-connection).AuthToolregistered as aSolrCLIsubcommand; generatedsolr-auth.adocref-guide page included.AuthToolPicocliTestruns the whole existingAuthToolTestsuite throughpicocli.CommandLine.execute().Boolean-ish options (
--block-unknownetc.) stay string-typed so both paths emit the same validation message asserted bytest_auth.bats. Connection parsing remains string-only; no I/O happens during argument parsing.Verified:
AuthToolTest+AuthToolPicocliTestgreen,test_auth.batsgreen on the commons-cli path and the picocli path (SOLR_PICOCLI=true),check -x testwith Error Prone.