remove aws-sdk from ranger-extension (#16011)

Fixes # size blowup regression introduced in https://github.com/apache/druid/pull/15443

This PR removes the transitive dependency of ranger-plugins-audit to reduce the size of the compiled artifacts

* add aws-logs-sdk to ensure that all the transitive dependencies are satisfied
* replace aws-bundle-sdk with aws-logs-sdk
* add additional guidance on ranger update, add dependency ignore to satisfy dependency analyzer
* add aws-sdk-logs to list of ignored dependencies to satisfy the maven plugin
* align aws-sdk versions
This commit is contained in:
Jan Werner 2024-03-08 10:35:29 -05:00 committed by GitHub
parent 60766495aa
commit a7b2747e56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 31 additions and 8 deletions

View File

@ -41,11 +41,6 @@
<artifactId>woodstox-core</artifactId>
<version>6.4.0</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-bundle</artifactId>
<version>${aws.sdk.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
@ -178,6 +173,11 @@
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
</exclusion>
<!-- removing the complete bundle sdk to be replaced with only logs-sdk -->
<exclusion>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-bundle</artifactId>
</exclusion>
<exclusion>
<groupId>org.elasticsearch</groupId>
<artifactId>*</artifactId>
@ -193,7 +193,14 @@
</exclusions>
<scope>compile</scope>
</dependency>
<!-- This is a transitive dependency of ranger-plugins-audit
added here to replace bloated bundle sdk, remove this if /when
apache ranger replaces bundle-skd with logs-sdk -->
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-logs</artifactId>
<version>${aws.sdk.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
@ -254,6 +261,10 @@
<!-- These are needed for scope: compile -->
<dependency>org.apache.ranger:ranger-plugins-audit</dependency>
</usedDependencies>
<!-- this is due to replacement of aws-bundle-sdk with aws-logs-sdk -->
<ignoredDependencies>
<ignoredDependency>com.amazonaws:aws-java-sdk-logs</ignoredDependency>
</ignoredDependencies>
</configuration>
</plugin>
</plugins>

View File

@ -4650,13 +4650,23 @@ libraries:
---
name: com.amazonaws aws-java-sdk-bundle
name: com.amazonaws aws-java-sdk-logs
license_category: binary
version: 1.12.638
module: druid-ranger-security
license_name: Apache License version 2.0
libraries:
- com.amazonaws: aws-java-sdk-bundle
- com.amazonaws: aws-java-sdk-logs
---
name: com.amazonaws jmespath-java
license_category: binary
version: 1.12.638
module: druid-ranger-security
license_name: Apache License version 2.0
libraries:
- com.amazonaws: jmespath-java
---

View File

@ -77,6 +77,8 @@
<aether.version>0.9.0.M2</aether.version>
<apache.curator.version>5.5.0</apache.curator.version>
<apache.kafka.version>3.6.1</apache.kafka.version>
<!-- when updating apache ranger, verify the usage of aws-bundle-sdk vs aws-logs-sdk
and update as needed in extensions-core/druid-ranger-security/pm.xml -->
<apache.ranger.version>2.4.0</apache.ranger.version>
<gson.version>2.10.1</gson.version>
<scala.library.version>2.13.11</scala.library.version>