Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Ranger ships with the following two condition evaluators: RangerIpMatcher and RangerTimeOfDayMatcher.  The former is used by the standard Knox plugin.

Appendix

Updating HDFS Service Definition

Step #1

Purpose

To find out the id of the HDFS service so that it can be used in get and put calls

REST Call

curl --user admin:admin --get "http://node-1:6080/service/public/v2/api/servicedef/name/hdfs"

JSON response

See below

Points to Note

  • id of the service-def is 1.
  • Both the contextEnrichers and conditionEvaluator collections are empty

...

      "enums": [ ... detailed elided for ease of readability ... ]

 }

 

Sample output # 2

 

Purpose

Update the contextEnrichers collection on the HDFS service-definition via PUT.

REST Call

curl --user admin:admin --put "http://node-1:6080/service/public/v2/api/servicedef/name/hdfs"

JSON payload

Edit the response received from the previous step and modify the policy conditions section as indicated below.

JSON response

per the semantics of PUT the response should be semantically similar to the JSON payload.  The update times might differ.

Points to Note

  • Context enricher attribute is an array so that multiple context enrichers can be specified, if needed, which would be invoked in order.

...