Remove bouncy castle shaded module to avoid bring error of verifySingleJar (#7453)

### Motivation

shade bouncy castle will cause some signature errors, this PR tries to remove the bouncy castle shaded module.

Here is the related error stack:
10:01:34.257 [pulsar-client-io-33-1] ERROR org.apache.pulsar.client.impl.ConsumerImpl - MessageCryptoBc may not included in the jar. e:
java.lang.SecurityException: JCE cannot authenticate the provider BC
	at javax.crypto.Cipher.getInstance( ~[?:1.8.0_121]
	at javax.crypto.Cipher.getInstance( ~[?:1.8.0_121]
	at org.apache.pulsar.client.impl.crypto.MessageCryptoBc.<init>( ~[classes/:?]
	at org.apache.pulsar.client.impl.ConsumerImpl.<init>( ~[classes/:?]
	at org.apache.pulsar.client.impl.ConsumerImpl.newConsumerImpl( ~[classes/:?]
	at org.apache.pulsar.client.impl.PulsarClientImpl.lambda$doSingleTopicSubscribeAsync$5( ~[classes/:?]
	at java.util.concurrent.CompletableFuture.uniAccept( ~[?:1.8.0_131]
	at java.util.concurrent.CompletableFuture$UniAccept.tryFire( ~[?:1.8.0_131]

Caused by: java.util.jar.JarException: file:/Users/jia/.m2/repository/org/apache/pulsar/bouncy-castle-bc-shaded/2.7.0-SNAPSHOT/bouncy-castle-bc-shaded-2.7.0-SNAPSHOT.jar has unsigned entries - org/bouncycastle/cert/AttributeCertificateHolder.class
	at javax.crypto.JarVerifier.verifySingleJar( ~[?:1.8.0_121]
	at javax.crypto.JarVerifier.verifyJars( ~[?:1.8.0_121]
	at javax.crypto.JarVerifier.verify( ~[?:1.8.0_121]
	at javax.crypto.JceSecurity.verifyProviderJar( ~[?:1.8.0_121]
	at javax.crypto.JceSecurity.getVerificationResult( ~[?:1.8.0_121]
	at javax.crypto.Cipher.getInstance( ~[?:1.8.0_121]

### Modifications

- Remove bouncy castle shaded module, avoid package bouncy castle into a dependency jar.
- enhance test case to identify this error.

### Verifying this change

ut passed.

* remove dep of bc-shaded from other module

* remove bc-shaded module

* enhance testECDSAEncryption and testRSAEncryption to cover error case

* fix license check

* remove bc-shaded module

* build a jar in jar to avoid break bc signature

* use new bc dependency by classifier in maven

* build pulsar-all docker image instead of pull from dockerhub in integration tests

* remove nar

* fix licence, fix error brings in #7640

* add bc when broker/client is referenced in pom

* add missing bc reference in pom

* change ci back to not build docker image
2 files changed
tree: 9e44a3c1103b94a72e45abb7d26849c28633a0ee
  1. pulsar-io/