Skip to content

Commit

Permalink
update docs and clearify difference between
Browse files Browse the repository at this point in the history
ranger.plugin.hive.policy.cache.dir and ranger.plugin.spark.policy.cache.dir configs
  • Loading branch information
bowenliang123 committed Aug 18, 2022
1 parent 4887bd1 commit a7ec3bc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/security/authorization/spark/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ for pointing to the right Ranger admin server.

</configuration>
```
##### Using Marcos in Row Level Filters
- Macros are now supported for using user/group/tag in row filter expressions, introduced in [Ranger 2.3](https://cwiki.apache.org/confluence/display/RANGER/Apache+Ranger+2.3.0+-+Release+Notes). This feature helps significantly simplify the row-filter condition expression by replacing explicit condition query by using user/group/tag's attributes. Considering a user with an attribute `born_city` of value `Guangzhou `, the row filter condition as `city='${{USER.born_city}}'` will be transformed to `city='Guangzhou'` in execution plan. More supported marcros and usage refer to [RANGER-3605](https://issues.apache.org/jira/browse/RANGER-3605) and [RANGER-3550](https://issues.apache.org/jira/browse/RANGER-3550).
- Add the follow configs to `ranger-spark-security.xml` to enable UserStore Enricher which is required by macros and scripts.
##### Using Macros in Row Level Filters
- Macros are now supported for using user/group/tag in row filter expressions, introduced in [Ranger 2.3](https://cwiki.apache.org/confluence/display/RANGER/Apache+Ranger+2.3.0+-+Release+Notes). This feature helps significantly simplify row filter expressions by using user/group/tag's attributes instead of explicit conditions. Considering a user with an attribute `born_city` of value `Guangzhou `, the row filter condition as `city='${{USER.born_city}}'` will be transformed to `city='Guangzhou'` in execution plan. More supported macros and usage refer to [RANGER-3605](https://issues.apache.org/jira/browse/RANGER-3605) and [RANGER-3550](https://issues.apache.org/jira/browse/RANGER-3550). Add the following configs to `ranger-spark-security.xml` to enable UserStore Enricher required by macros.

```xml
<property>
Expand All @@ -88,7 +87,7 @@ for pointing to the right Ranger admin server.
<property>
<name>ranger.plugin.hive.policy.cache.dir</name>
<value>./a ranger hive service name/policycache</value>
<description>policycache cache path of hive service def for caching UserStore, Tags, etc.</description>
<description>As Authz plugin reuses hive service def, a policy cache path is required for caching UserStore and Tags for "hive" service def, while "ranger.plugin.spark.policy.cache.dir config" is the path for caching policies in service. </description>
</property>
```

Expand Down

0 comments on commit a7ec3bc

Please sign in to comment.