GitHub user janhoy opened a pull request:

    SOLR-9481: Authentication and Authorization plugins support for non-cloud

    Adds ability to use Auth/Autz plugins in standalone non-cloud mode.
    * Place `security.json` in $SOLR_HOME
    * Solr will initialise plugins from local file
    * Edits through API `/solr/admin/authentication` and 
      * Each edit will update local copy of `security.json` and reload security 
      * If you have several nodes in master/slave setup, need to perform the 
edit on each node
    * Refactored `SecurityConfHandler`into a base class independent of ZK. Each 
sub class overrides methods `getSecurityConfig`, `getConf`, `persistConf` and 
      * `SecurityConfHandlerZk` is instantiated if zkAware
      * `SecurityConfHandlerLocal` is instantiated if in local mode, 
reads/writes local file in SOLR_HOME
      * In local mode there is no callback when `security.json` changes, so 
`SecurityConfHandlerLocal` explicitly reloads security configs in its 
`securityConfEdited()` method
      * `MockSecurityHandler` used in tests persists to in-memory Map
    * New object `SecurityConfig` to hold security config, since 
`ZkStateReader.ConfigData` is tied to ZK.
    * New test case `BasicAuthStandaloneTest` spins up Jetty, writes local 
`security.json` through the persistConf API, adds a user through edit API, 
validates that permission is enforced and that local file contains user name.

You can merge this pull request into a Git repository by running:

    $ git pull solr9481

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #95
commit 6c04d63e633f74b4df9f77ad78b2335d9dd87470
Author: Jan Høydahl <>
Date:   2016-10-13T08:46:30Z

    SOLR-9481: Authentication and Authorization plugins now work in standalone 
mode, including edit API


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to