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.

pre-defined permission to a role.<br />

update-permission: update some attributes of an existing permission definition.<br />

delete-permission: remove a permission definition.<br />

Permissions need to be created if they are not on the list of pre-defined permissions above.<br />

Several properties can be used to define your custom permission.<br />

Property<br />

name<br />

collection<br />

Description<br />

The name of the permission. The name will be used to update or delete the permission later.<br />

The collection or collections the permission will apply to.<br />

When the path that will be allowed is collection-specific, such as when setting permissions to allow<br />

use of the Schema API, omitting the collection property will allow the defined path and/or method<br />

for all collections. However, when the path is one that is non-collection-specific, such as the<br />

Collections API, the collection value must be null.<br />

path A request handler name, such as /update or /select. A wild card is supported, to allow for all<br />

paths as appropriate (such as, /update/*).<br />

method<br />

params<br />

HTTP methods that are allowed for this permission. You could allow only GET requests, or have a<br />

role that allows PUT and POST requests. The method values that are allowed for this property are<br />

GET, POST, PUT, DELETE and HEAD.<br />

The names and values of request parameters. This property can be omitted if all request<br />

parameters are allowed, but will restrict access only to the values provided if defined.<br />

For example, this property could be used to limit the actions a role is allowed to perform with the<br />

Collections API. If the role should only be allowed to perform the LIST or CLUSTERSTATUS<br />

requests, you would define this as follows:<br />

"params": {<br />

"action": [LIST, CLUSTERSTATUS]<br />

}<br />

before<br />

role<br />

This property allows ordering of permissions. The value for this property is the name of the<br />

permission that this new permission should be placed before in security.json.<br />

The name of the role(s) to give this permission. This name will be used to map user IDs to the role<br />

to grant these permissions. The value can be wild card such as (*), which means that any user is<br />

OK, but no user is NOT OK.<br />

The following would create a new permission named "collection-mgr" that is allowed to create and list collections.<br />

The permission will be placed before the "read" permission. Note also that we have defined "collection as null,<br />

this is because requests to the Collections API are never collection-specific.<br />

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

524

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

Saved successfully!

Ooh no, something went wrong!