Skip to content

Commit

Permalink
Merge branch 'master' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
nityanandagohain authored Nov 30, 2021
2 parents e70ef13 + 393144a commit d052c0f
Show file tree
Hide file tree
Showing 16 changed files with 339 additions and 201 deletions.
6 changes: 5 additions & 1 deletion agents-audit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,14 @@
<artifactId>hadoop-common</artifactId>
<version>${hadoop.version}</version>
<exclusions>
<exclusion>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
<exclusion>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
16 changes: 16 additions & 0 deletions agents-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,26 @@
<artifactId>commons-logging</artifactId>
<version>${commons.logging.version}</version>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>${nimbus-jose-jwt.version}</version>
</dependency>
<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>${jsonsmart.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>${hadoop.version}</version>
<exclusions>
<exclusion>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>log4j</groupId>
Expand Down
16 changes: 16 additions & 0 deletions agents-cred/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,26 @@
<artifactId>commons-logging</artifactId>
<version>${commons.logging.version}</version>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>${nimbus-jose-jwt.version}</version>
</dependency>
<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>${jsonsmart.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>${hadoop.version}</version>
<exclusions>
<exclusion>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>log4j</groupId>
Expand Down
10 changes: 10 additions & 0 deletions credentialbuilder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@
<artifactId>slf4j-api</artifactId>
<version>${slf4j-api.version}</version>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>${nimbus-jose-jwt.version}</version>
</dependency>
<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>${jsonsmart.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
Expand Down
16 changes: 13 additions & 3 deletions embeddedwebserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,23 @@
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>${nimbus-jose-jwt.version}</version>
</dependency>
<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>${jsonsmart.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ranger</groupId>
<artifactId>ranger-plugins-audit</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<dependency>
<groupId>org.apache.ranger</groupId>
<artifactId>ranger-plugins-common</artifactId>
<version>${project.version}</version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2394,6 +2394,43 @@ private HivePrivilegeObjectType getPluginPrivilegeObjType(
}
}


private boolean IsCommandInExceptionList(HiveOperationType hiveOpType) {
boolean ret = false;
switch (hiveOpType) {
case CREATEMACRO:
case CREATEROLE:
case DESCFUNCTION:
case DELETE:
case DFS:
case DROPMACRO:
case DROPROLE:
case EXPLAIN:
case GRANT_ROLE:
case REVOKE_ROLE:
case RESET:
case SET:
case SHOWDATABASES:
case SHOWCONF:
case SHOWFUNCTIONS:
case SHOWLOCKS:
case SHOW_COMPACTIONS:
case SHOW_GRANT:
case SHOW_ROLES:
case SHOW_ROLE_GRANT:
case SHOW_ROLE_PRINCIPALS:
case SHOW_TRANSACTIONS:
case RELOADFUNCTION:
case REPLDUMP:
case REPLLOAD:
case REPLSTATUS:
case ADD:
ret = true;
break;
}
return ret;
}

private RangerRequestedResources buildRequestContextWithAllAccessedResources(List<RangerHiveAccessRequest> requests) {

RangerRequestedResources requestedResources = new RangerRequestedResources();
Expand Down
50 changes: 50 additions & 0 deletions kms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@
<artifactId>hadoop-auth</artifactId>
<version>${hadoop.version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
</exclusion>
<exclusion>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
Expand Down Expand Up @@ -288,6 +298,16 @@
<groupId>org.apache.ranger</groupId>
<artifactId>credentialbuilder</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
</exclusion>
<exclusion>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
Expand All @@ -303,6 +323,16 @@
<groupId>org.apache.ranger</groupId>
<artifactId>ranger-plugins-common</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
</exclusion>
<exclusion>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
Expand Down Expand Up @@ -362,6 +392,14 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</exclusion>
<exclusion>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
</exclusion>
<exclusion>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -418,6 +456,18 @@
<artifactId>javax.persistence</artifactId>
<version>${javax.persistence.version}</version>
</dependency>
<!-- Transitive dependency for nimbus-jose-jwt. Please re-check this version
when updating nimbus-jose-jwt. Please read RANGER-2080 for more details. -->
<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>${jsonsmart.version}</version>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>${nimbus-jose-jwt.version}</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
Expand Down
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@
<hppc.version>0.8.0</hppc.version>
<joda.time.version>2.10.6</joda.time.version>
<log4j.core.version>2.13.3</log4j.core.version>
<jsonsmart.version>2.3.1</jsonsmart.version>
<nimbus-jose-jwt.version>8.22.1</nimbus-jose-jwt.version>
</properties>
<profiles>
<profile>
Expand Down
4 changes: 2 additions & 2 deletions security-admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>8.15</version>
<version>${nimbus-jose-jwt.version}</version>
<scope>compile</scope>
</dependency>
<!-- Transitive dependency for nimbus-jose-jwt.
Expand All @@ -554,7 +554,7 @@
<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>2.3</version>
<version>${jsonsmart.version}</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
Expand Down
Loading

0 comments on commit d052c0f

Please sign in to comment.