-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-23433 : Add Deny Policy on Replicated Database #1016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2340c4f to
9513679
Compare
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/RangerLoadTask.java
Outdated
Show resolved
Hide resolved
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ranger/RangerRestClientImpl.java
Outdated
Show resolved
Hide resolved
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ranger/RangerRestClientImpl.java
Outdated
Show resolved
Hide resolved
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ranger/RangerRestClientImpl.java
Outdated
Show resolved
Hide resolved
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ranger/RangerRestClientImpl.java
Outdated
Show resolved
Hide resolved
| Mockito.when(conf.getVar(REPL_RANGER_SERVICE_NAME)).thenReturn("hive"); | ||
| Path rangerDumpPath = new Path("/tmp"); | ||
| Mockito.when(work.getCurrentDumpPath()).thenReturn(rangerDumpPath); | ||
| mockClient.saveRangerPoliciesToFile(rangerPolicyList, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this line needed? you anyway returning policyList on readRangerPoliciesFromJsonFile call: 178
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ranger/RangerRestClientImpl.java
Outdated
Show resolved
Hide resolved
| denyExceptionsPolicyItem.setAccesses(denyExceptionsPolicyItemAccesses); | ||
| denyExceptionsItemsForBeaconUser.add(denyExceptionsPolicyItem); | ||
| List<String> denyExceptionsPolicyItemsUsers = new ArrayList<String>(); | ||
| denyExceptionsPolicyItemsUsers.add("hive"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be hive service user and obtained from conf?
| denyRangerPolicy.setResources(rangerPolicyResourceMap); | ||
|
|
||
| List<String> accessTypes = new ArrayList<>(); | ||
| accessTypes.addAll(Arrays.asList("create", "update", "drop", "alter", "index", "lock", "write", "ReplAdmin")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need to do addAll. You can directly use List accessTypes = Arrays.asList
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
No description provided.