Skip to content

Commit cbee3dd

Browse files
NihalJainpetersomogyi
authored andcommitted
HBASE-28089 Upgrade BouncyCastle to fix CVE-2023-33201 (apache#5423)
- Upgrades to v1.76, i.e. the latest version - Replaces *-jdk15on with *-jdk18on - Excludes *-jdk15on, *-jdk15 from everywhere else, to avoid conflicts with *-jdk18on - Add bcprov-jdk18on to hbase-mapreduce as few tests need this dependency Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit a9e4c7b) Change-Id: I83c3228642408fff2d2071f5aaf57b96b5db9f7a
1 parent 71224a6 commit cbee3dd

10 files changed

Lines changed: 54 additions & 25 deletions

File tree

hbase-asyncfs/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
</dependency>
7676
<dependency>
7777
<groupId>org.bouncycastle</groupId>
78-
<artifactId>bcprov-jdk15on</artifactId>
78+
<artifactId>bcprov-jdk18on</artifactId>
7979
<scope>test</scope>
8080
</dependency>
8181
<dependency>

hbase-common/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,12 @@
144144
</dependency>
145145
<dependency>
146146
<groupId>org.bouncycastle</groupId>
147-
<artifactId>bcprov-jdk15on</artifactId>
147+
<artifactId>bcprov-jdk18on</artifactId>
148148
<scope>test</scope>
149149
</dependency>
150150
<dependency>
151151
<groupId>org.bouncycastle</groupId>
152-
<artifactId>bcpkix-jdk15on</artifactId>
152+
<artifactId>bcpkix-jdk18on</artifactId>
153153
<scope>test</scope>
154154
</dependency>
155155
</dependencies>

hbase-endpoint/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
</dependency>
112112
<dependency>
113113
<groupId>org.bouncycastle</groupId>
114-
<artifactId>bcprov-jdk15on</artifactId>
114+
<artifactId>bcprov-jdk18on</artifactId>
115115
<scope>test</scope>
116116
</dependency>
117117
<dependency>

hbase-examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
</dependency>
163163
<dependency>
164164
<groupId>org.bouncycastle</groupId>
165-
<artifactId>bcprov-jdk15on</artifactId>
165+
<artifactId>bcprov-jdk18on</artifactId>
166166
<scope>test</scope>
167167
</dependency>
168168
<dependency>

hbase-http/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
</dependency>
108108
<dependency>
109109
<groupId>org.bouncycastle</groupId>
110-
<artifactId>bcprov-jdk15on</artifactId>
110+
<artifactId>bcprov-jdk18on</artifactId>
111111
<scope>test</scope>
112112
</dependency>
113113
<dependency>

hbase-mapreduce/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,11 @@
445445
<artifactId>javax.ws.rs-api</artifactId>
446446
<scope>test</scope>
447447
</dependency>
448+
<dependency>
449+
<groupId>org.bouncycastle</groupId>
450+
<artifactId>bcprov-jdk18on</artifactId>
451+
<scope>test</scope>
452+
</dependency>
448453
</dependencies>
449454

450455
</profile>

hbase-resource-bundle/src/main/resources/supplemental-models.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,10 +1545,10 @@ under the License.
15451545
<supplement>
15461546
<project>
15471547
<groupId>org.bouncycastle</groupId>
1548-
<artifactId>bcpkix-jdk15on</artifactId>
1548+
<artifactId>bcpkix-jdk18on</artifactId>
15491549

15501550
<licenses>
1551-
<!-- bcpkix-jdk15on is licensed under the Bouncy Castle License, which is equivalent to the MIT License -->
1551+
<!-- bcpkix-jdk18on is licensed under the Bouncy Castle License, which is equivalent to the MIT License -->
15521552
<license>
15531553
<name>MIT License</name>
15541554
<url>http://www.opensource.org/licenses/mit-license.php</url>

hbase-rest/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@
236236
<!--Test-->
237237
<dependency>
238238
<groupId>org.bouncycastle</groupId>
239-
<artifactId>bcprov-jdk15on</artifactId>
239+
<artifactId>bcprov-jdk18on</artifactId>
240240
<scope>test</scope>
241241
</dependency>
242242
<dependency>

hbase-server/pom.xml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,12 @@
250250
</dependency>
251251
<dependency>
252252
<groupId>org.bouncycastle</groupId>
253-
<artifactId>bcprov-jdk15on</artifactId>
253+
<artifactId>bcprov-jdk18on</artifactId>
254+
<scope>test</scope>
255+
</dependency>
256+
<dependency>
257+
<groupId>org.bouncycastle</groupId>
258+
<artifactId>bcpkix-jdk18on</artifactId>
254259
<scope>test</scope>
255260
</dependency>
256261
<dependency>
@@ -329,16 +334,6 @@
329334
<artifactId>netty-all</artifactId>
330335
<scope>test</scope>
331336
</dependency>
332-
<dependency>
333-
<groupId>org.bouncycastle</groupId>
334-
<artifactId>bcprov-jdk15on</artifactId>
335-
<scope>test</scope>
336-
</dependency>
337-
<dependency>
338-
<groupId>org.bouncycastle</groupId>
339-
<artifactId>bcpkix-jdk15on</artifactId>
340-
<scope>test</scope>
341-
</dependency>
342337
<dependency>
343338
<groupId>org.skyscreamer</groupId>
344339
<artifactId>jsonassert</artifactId>
@@ -972,4 +967,4 @@
972967
</build>
973968
</profile>
974969
</profiles>
975-
</project>
970+
</project>

pom.xml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@
602602
<joni.version>2.1.31</joni.version>
603603
<jcodings.version>1.0.55</jcodings.version>
604604
<spy.version>2.12.2</spy.version>
605-
<bouncycastle.version>1.70</bouncycastle.version>
605+
<bouncycastle.version>1.76</bouncycastle.version>
606606
<skyscreamer.version>1.5.1</skyscreamer.version>
607607
<kerby.version>2.0.3</kerby.version>
608608
<commons-crypto.version>1.0.0</commons-crypto.version>
@@ -1313,7 +1313,7 @@
13131313
</dependency>
13141314
<dependency>
13151315
<groupId>org.bouncycastle</groupId>
1316-
<artifactId>bcprov-jdk15on</artifactId>
1316+
<artifactId>bcprov-jdk18on</artifactId>
13171317
<version>${bouncycastle.version}</version>
13181318
<scope>test</scope>
13191319
</dependency>
@@ -1325,7 +1325,7 @@
13251325
</dependency>
13261326
<dependency>
13271327
<groupId>org.bouncycastle</groupId>
1328-
<artifactId>bcpkix-jdk15on</artifactId>
1328+
<artifactId>bcpkix-jdk18on</artifactId>
13291329
<version>${bouncycastle.version}</version>
13301330
<scope>test</scope>
13311331
</dependency>
@@ -1998,6 +1998,23 @@
19981998
</rules>
19991999
</configuration>
20002000
</execution>
2001+
<execution>
2002+
<id>banned-bouncycastle-jdk15on</id>
2003+
<goals>
2004+
<goal>enforce</goal>
2005+
</goals>
2006+
<configuration>
2007+
<rules>
2008+
<bannedDependencies>
2009+
<excludes>
2010+
<exclude>org.bouncycastle:*-jdk15on</exclude>
2011+
</excludes>
2012+
<message>Use org.bouncycastle:*-jdk18on instead</message>
2013+
<searchTransitive>true</searchTransitive>
2014+
</bannedDependencies>
2015+
</rules>
2016+
</configuration>
2017+
</execution>
20012018
<execution>
20022019
<id>check-aggregate-license</id>
20032020
<goals>
@@ -3503,6 +3520,10 @@
35033520
<groupId>org.slf4j</groupId>
35043521
<artifactId>slf4j-log4j12</artifactId>
35053522
</exclusion>
3523+
<exclusion>
3524+
<groupId>bouncycastle</groupId>
3525+
<artifactId>bcprov-jdk15</artifactId>
3526+
</exclusion>
35063527
</exclusions>
35073528
</dependency>
35083529
<dependency>
@@ -3999,6 +4020,14 @@
39994020
<groupId>org.codehaus.jackson</groupId>
40004021
<artifactId>jackson-mapper-asl</artifactId>
40014022
</exclusion>
4023+
<exclusion>
4024+
<groupId>org.bouncycastle</groupId>
4025+
<artifactId>bcprov-jdk15on</artifactId>
4026+
</exclusion>
4027+
<exclusion>
4028+
<groupId>org.bouncycastle</groupId>
4029+
<artifactId>bcpkix-jdk15on</artifactId>
4030+
</exclusion>
40024031
</exclusions>
40034032
</dependency>
40044033
<dependency>
@@ -4574,4 +4603,4 @@
45744603
</properties>
45754604
</profile>
45764605
</profiles>
4577-
</project>
4606+
</project>

0 commit comments

Comments
 (0)