You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by bhavik patel <bh...@gmail.com> on 2022/03/02 10:57:10 UTC
Re: Review Request 73852: RANGER-3595, refactor the file layout of ranger-xxx-kms.tar.gz
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73852/#review224110
-----------------------------------------------------------
Please rebase the patch and update the commit message format
- bhavik patel
On Feb. 16, 2022, 10:29 a.m., Kirby Zhou wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73852/
> -----------------------------------------------------------
>
> (Updated Feb. 16, 2022, 10:29 a.m.)
>
>
> Review request for ranger, Dhaval Shah, Dineshkumar Yadav, Gautam Borad, Jayendra Parab, Kishor Gollapalliwar, Abhay Kulkarni, Mateen Mansoori, Mehul Parikh, pengjianhua, Pradeep Agrawal, VaradreawiZTV VaradreawiZTV, Vishal Suvagia, Velmurugan Periasamy, and Qiang Zhang.
>
>
> Bugs: RANGER-3595
> https://issues.apache.org/jira/browse/RANGER-3595
>
>
> Repository: ranger
>
>
> Description
> -------
>
> There are lots of .class files under ews/webapp/, and never used.
>
>
> 1. place web.xml at correct location
> 2. setup.sh want to patch hadoop-common.jar at runtime, it requires some file inside ranger-kms.jar. But the patching of hadoop-common.jar is unnecessary.
>
> Regular webapp should have its own class files under ews/webapp/WEB-INF/classes, and dependencies under ews/webapp/WEB-INF/lib, and the Container should put its libraries under ews/lib. But at current, we use directories sucn as ews/webapp/lib, ews/webapp/WEB-INF/classes/lib. It looks dirty and ugly.
>
>
> My patch here makes KMS no longer bring ranger-kms.jar, and place classes and web.xml at correct location. as a alternative of https://reviews.apache.org/r/73816/
>
>
> Now:
> ews/lib contains ews bootstrap jars,
> ews/webapp/WEB-INF/classes contains KMS app itself,
> ews/webapp/WEB-INF/lib contains KMS dependencies,
> ews/webapp/WEB-INF/lib/ranger-kms-plugin-impl contains ranger-kms-plugin.
>
> Additionaly, kms/pom.xml even depends on original hadoop-kms, which can confuse developers, so I removed it.
>
> BTW: the bootstrap embedded server looks like too heavy and too much dependeices.
>
>
> Diffs
> -----
>
> distro/src/main/assembly/kms.xml 983a43e59
> kms/pom.xml 7a4f98df7
> kms/scripts/DBMK2HSM.sh 001199d97
> kms/scripts/DBMKTOAZUREKEYVAULT.sh cfe5a6b5e
> kms/scripts/DBMKTOKEYSECURE.sh c0aa6e58c
> kms/scripts/HSMMK2DB.sh 6c77f7340
> kms/scripts/KEYSECUREMKTOKMSDB.sh 340e05e2c
> kms/scripts/VerifyIsDBMasterkeyCorrect.sh 1c9a2e148
> kms/scripts/exportKeysToJCEKS.sh f3205789b
> kms/scripts/importJCEKSKeys.sh 5d4fe978f
> kms/scripts/ranger-kms 429a31e5a
> kms/scripts/setup.sh 2051df59a
> kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSWebApp.java c899bdf98
> kms/src/main/resources/META-INF/context.xml
> kms/src/main/resources/WEB-INF/web.xml 5e2d489fe
>
>
> Diff: https://reviews.apache.org/r/73852/diff/1/
>
>
> Testing
> -------
>
> mvn clean pacakge
> fresh install and upgrade from 2.2.0
>
>
> Thanks,
>
> Kirby Zhou
>
>