[
https://issues.apache.org/jira/browse/SOLR-8440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16007337#comment-16007337
]
Jan Høydahl commented on SOLR-8440:
-----------------------------------
Great progress!
bq. I found that using $SOLR_PID_DIR was much simpler than the $SOLR_HOME
(which more or less point to the same location). On Windows, used $SOLR_TIP/bin.
Problem with SOLR_PID_DIR and SOLR_TIP/bin is that it does not support an
install with multiple instances run from same binaries. Once you set password
for the second instance, it will overwrite the {{$SOLR_TIP/bin/basicAuth.conf}}
which was placed there by any prior auth settings for other instances.
{{$SOLR_PID_DIR}} works for PID files, since they are unique, containing port
name in filename.
So I would still prefer using {{$SOLR_HOME}} for the basicAuth.conf.
Alternatively name it {{basicAuth_$PORT.conf}} and use that name in the
{{SOLR_AUTHENTICATION_OPTS}} var; then it could go in SOLR_PID DIR without
problems.
> 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
> Fix For: 6.6, master (7.0)
>
> Attachments: SOLR-8440-follow-up.patch, SOLR-8440.patch,
> SOLR-8440.patch, SOLR-8440.patch, 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]