[ 
https://issues.apache.org/jira/browse/SOLR-8440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16000434#comment-16000434
 ] 

Jan Høydahl commented on SOLR-8440:
-----------------------------------

I'm not super keen on the new {{auth.overlay.sh/cmd}} files. We're trying to 
get away from platform specific files, such as in SOLR-7871 and moving more 
stuff to Java space. Can we instead simply print
{noformat}
Solr is now password protected. For continued use of bin/solr, please set these 
environment variables in your shell or in solr.in.sh/cmd:
SOLR_AUTH_TYPE = "basic"
SOLR_AUTHENTICATION_OPTS = "-Dbasicauth=user:pass"
{noformat}
Alternatively, support an option to update {{solr.in.sh/cmd}} in-place (not 
rocket science with SolrCLI.java)
{noformat}
bin/solr auth -enable [...] -persist
{noformat}

Another comment to the patch is that if {{$SOLR_INCLUDE}} is used when calling 
{{bin/solr}}, e.g. to run multiple instances from same install dir, your patch 
will fail to select a folder in which to place {{auth.overlay.sh}}, since 
{{$include}} will be empty.

> Script support for enabling basic auth
> --------------------------------------
>
>                 Key: SOLR-8440
>                 URL: https://issues.apache.org/jira/browse/SOLR-8440
>             Project: Solr
>          Issue Type: New Feature
>          Components: scripts and tools
>            Reporter: Jan Høydahl
>            Assignee: Ishan Chattopadhyaya
>              Labels: authentication, security
>         Attachments: SOLR-8440.patch, SOLR-8440.patch, SOLR-8440.patch, 
> SOLR-8440.patch, SOLR-8440.patch
>
>
> Now that BasicAuthPlugin will be able to work without an AuthorizationPlugin 
> (SOLR-8429), it would be sweet to provide a super simple way to "Password 
> protect Solr"™ right from the command line:
> {noformat}
> bin/solr basicAuth -adduser -user solr -pass SolrRocks
> {noformat}
> It would take the mystery out of enabling one single password across the 
> board. The command would do something like this
> # Check if HTTPS is enabled, and if not, print a friendly warning
> # Check if {{/security.json}} already exists
> ## NO => create one with only plugin class defined
> ## YES => Abort if exists but plugin is not {{BasicAuthPlugin}}
> # Using security REST API, add the new user



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to