11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

permissions to all users, removing any security present.<br />

You may use the VMParamsSingleSetCredentialsDigestZkCredentialsProvider and VMParamsAll<br />

AndReadonlyDigestZkACLProvider implementations as described earlier in the page for these properties.<br />

After changing the ZK ACLs, make sure that the contents of your solr.xml match, as described for initial set<br />

up.<br />

Example Usages<br />

Let's say that you want all <strong>Solr</strong>-related content in ZooKeeper protected. You want an "admin" user that is able to<br />

do anything to the content in ZooKeeper - this user will be used for initializing <strong>Solr</strong> content in ZooKeeper and for<br />

server-side <strong>Solr</strong> nodes. You also want a "readonly" user that is only able to read content from ZooKeeper - this<br />

user will be handed over to "clients".<br />

In the examples below:<br />

The "admin" user's username/password is admin-user/admin-password.<br />

The "readonly" user's username/password is readonly-user/readonly-password.<br />

The provider class names must first be configured in solr.xml:<br />

...<br />

<br />

...<br />

org.apache.solr.common.cloud.VMParamsSingleSetCredenti<br />

alsDigestZkCredentialsProvider<br />

org.apache.solr.common.cloud.VMParamsAllAndReadonlyDigestZkACLP<br />

rovider<br />

To use ZkCLI:<br />

SOLR_ZK_CREDS_AND_ACLS="-DzkDigestUsername=admin-user<br />

-DzkDigestPassword=admin-password \<br />

-DzkDigestReadonlyUsername=readonly-user<br />

-DzkDigestReadonlyPassword=readonly-password"<br />

java ... $SOLR_ZK_CREDS_AND_ACLS ... org.apache.solr.cloud.ZkCLI -cmd ...<br />

For operations using bin/solr, add the following at the bottom of bin/solr.in.sh:<br />

SOLR_ZK_CREDS_AND_ACLS="-DzkDigestUsername=admin-user<br />

-DzkDigestPassword=admin-password \<br />

-DzkDigestReadonlyUsername=readonly-user<br />

-DzkDigestReadonlyPassword=readonly-password"<br />

SOLR_OPTS="$SOLR_OPTS $SOLR_ZK_CREDS_AND_ACLS"<br />

For operations using bin\solr.cmd, add the following at the bottom of bin\solr.in.cmd:<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

564

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!