11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Changing ACL Schemes<br />

Example Usages<br />

About ZooKeeper ACLs<br />

<strong>Solr</strong>Cloud uses ZooKeeper for shared information and for coordination.<br />

This section describes how to configure <strong>Solr</strong> to add more restrictive ACLs to the ZooKeeper content it creates,<br />

and how to tell <strong>Solr</strong> about the credentials required to access the content in ZooKeeper. If you want to use ACLs<br />

in your ZooKeeper nodes, you will have to activate this functionality; by default, <strong>Solr</strong> behavior is open-unsafe<br />

ACL everywhere and uses no credentials.<br />

Changing <strong>Solr</strong>-related content in ZooKeeper might damage a <strong>Solr</strong>Cloud cluster. For example:<br />

Changing configuration might cause <strong>Solr</strong> to fail or behave in an unintended way.<br />

Changing cluster state information into something wrong or inconsistent might very well make a <strong>Solr</strong>Cloud<br />

cluster behave strangely.<br />

Adding a delete-collection job to be carried out by the Overseer will cause data to be deleted from the<br />

cluster.<br />

You may want to enable ZooKeeper ACLs with <strong>Solr</strong> if you grant access to your ZooKeeper ensemble to entities<br />

you do not trust, or if you want to reduce risk of bad actions resulting from, e.g.:<br />

Malware that found its way into your system.<br />

Other systems using the same ZooKeeper ensemble (a "bad thing" might be done by accident).<br />

You might even want to limit read-access, if you think there is stuff in ZooKeeper that not everyone should know<br />

about. Or you might just in general work on need-to-know-basis.<br />

Protecting ZooKeeper itself could mean many different things. This section is about protecting <strong>Solr</strong> content<br />

in ZooKeeper. ZooKeeper content basically lives persisted on disk and (partly) in memory of the ZooKeeper<br />

processes. This section is not about protecting ZooKeeper data at storage or ZooKeeper process levels -<br />

that's for ZooKeeper to deal with.<br />

But this content is also available to "the outside" via the ZooKeeper API. Outside processes can connect to<br />

ZooKeeper and create/update/delete/read content; for example, a <strong>Solr</strong> node in a <strong>Solr</strong>Cloud cluster wants to<br />

create/update/delete/read, and a <strong>Solr</strong>J client wants to read from the cluster. It is the responsibility of the outside<br />

processes that create/update content to setup ACLs on the content. ACLs describe who is allowed to read,<br />

update, delete, create, etc. Each piece of information (znode/content) in ZooKeeper has its own set of ACLs, and<br />

inheritance or sharing is not possible. The default behavior in <strong>Solr</strong> is to add one ACL on all the content it creates<br />

- one ACL that gives anyone the permission to do anything (in ZooKeeper terms this is called "the open-unsafe<br />

ACL").<br />

How to Enable ACLs<br />

We want to be able to:<br />

1.<br />

2.<br />

3.<br />

Control the credentials <strong>Solr</strong> uses for its ZooKeeper connections. The credentials are used to get<br />

permission to perform operations in ZooKeeper.<br />

Control which ACLs <strong>Solr</strong> will add to znodes (ZooKeeper files/folders) it creates in ZooKeeper.<br />

Control it "from the outside", so that you do not have to modify and/or recompile <strong>Solr</strong> code to turn this on.<br />

<strong>Solr</strong> nodes, clients and tools (e.g. ZkCLI) always use a java class called <strong>Solr</strong>ZkClient to deal with their<br />

ZooKeeper stuff. The implementation of the solution described here is all about changing <strong>Solr</strong>ZkClient. If you<br />

use <strong>Solr</strong>ZkClient in your application, the descriptions below will be true for your application too.<br />

Controlling Credentials<br />

You control which credentials provider will be used by configuring the zkCredentialsProvider property in so<br />

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

561

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

Saved successfully!

Ooh no, something went wrong!