How should you configure an Apache Ranger policy to allow the 'analysts' group to read from multiple Hive databases but prevent any write operations?
hard📝 Application Q8 of 15
Hadoop - Security
How should you configure an Apache Ranger policy to allow the 'analysts' group to read from multiple Hive databases but prevent any write operations?
ACreate a policy with 'users': ['analysts'], specify all databases, and set 'accessTypes' to ['select', 'update']
BCreate a policy with 'users': ['analysts'], specify one database, and set 'accessTypes' to ['read', 'write']
CCreate a policy with 'groups': ['analysts'], specify all databases, and set 'accessTypes' to ['read', 'write']
DCreate a policy with 'groups': ['analysts'], specify all target databases in 'resources', and set 'accessTypes' to ['select'] only
Step-by-Step Solution
Solution:
Step 1: Identify group and access
The policy must apply to the 'analysts' group with read-only access.
Step 2: Specify resources
Include all relevant Hive databases in the 'resources' field.
Step 3: Set access types
Use 'select' (read) only to prevent write operations.
Final Answer:
Create a policy with 'groups': ['analysts'], specify all target databases in 'resources', and set 'accessTypes' to ['select'] only correctly configures group, resources, and read-only access.
Quick Check:
Read-only access means 'select' without 'write' [OK]
Quick Trick:Use 'select' access for read-only Hive policies [OK]
Common Mistakes:
Assigning write permissions accidentally
Using 'users' instead of 'groups' for group policies
Not specifying all target databases
Master "Security" in Hadoop
9 interactive learning modes - each teaches the same concept differently