I get an exception with keystore jgroups.keystore and generating it the
way you described below:
Exception in thread "main" java.io.IOException:
DerInputStream.getLength(): lengthTag=78, too big.
at
java.base/sun.security.util.DerInputStream.getLength(DerInputStream.java:606)
at java.base/sun.security.util.DerValue.init(DerValue.java:390)
at java.base/sun.security.util.DerValue.<init>(DerValue.java:331)
at java.base/sun.security.util.DerValue.<init>(DerValue.java:344)
at
java.base/sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:1993)
at
java.base/sun.security.util.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:222)
at java.base/java.security.KeyStore.load(KeyStore.java:1479)
at
org.jgroups.protocols.SYM_ENCRYPT.readSecretKeyFromKeystore(SYM_ENCRYPT.java:107)
at org.jgroups.protocols.SYM_ENCRYPT.init(SYM_ENCRYPT.java:88)
at
org.jgroups.stack.ProtocolStack.initProtocolStack(ProtocolStack.java:806)
at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:442)
at org.jgroups.JChannel.init(JChannel.java:894)
at org.jgroups.JChannel.<init>(JChannel.java:124)
at org.jgroups.JChannel.<init>(JChannel.java:105)
at org.jgroups.demos.Chat.start(Chat.java:34)
at org.jgroups.demos.Chat.main(Chat.java:106)
When I use
<SYM_ENCRYPT
provider="SunJCE"
sym_algorithm="AES/CBC/PKCS5Padding"
sym_iv_length="16"
keystore_name="/Users/bela/JGroups/keystore/defaultStore.keystore"
store_password="changeit" alias="myKey"/>,
this works. The keystore is generated via 'ant make-keystore'.
I used Java 11 and 21, and this fails in both cases.
On 30.10.23 17:44, Chintan Mohan Rohila wrote:
> Hello all,
>
> We need an urgent help for configuring a secure JGroups intra-cluster
> communication on our application running on Kubernetes.
>
> _*Protocol stack used is:*_
> _*Keystore used:*_
> keytool -genseckey -alias mykey -keypass xxxxxxxxxxxxxxx -storepass
> xxxxxxxxxxxxxxx -keyalg AES -keysize 128 -keystore jgroup.keystore
> -storetype JCEKS
>
> With the above configuration views are not able to get all the members
> from all the pods and following exception is coming. Please suggest if
> something can be fixed in this configuration or else ASYM protocol can
> be used and how?
>
> _*Exception:*_
> [org.jgroups.protocols.SYM_ENCRYPT]eric-bss-ec-vs50-erxxhar-2-29765:
> rejected decryption of unicast message from non-member
> eric-bss-ec-vs50-erxxhar-1-35959
>
> _*Probe output:*_
> java -cp /opt/vs/bundles/org.jgroups_4.2.10.Final-E002.jar
> org.jgroups.tests.Probe -port 10599 -bind_addr 192.168.134.114
> jmx=SYM_ENCRYPT
>
> local_addr=eric-bss-ec-vs50-erxxhar-0-24353 [ip=
192.168.134.114:8800,
> version=4.2.10.Final (Julier), cluster=TRAFFIC, 1 mbr(s)]
> SYM_ENCRYPT={after_creation_hook=null, asym_algorithm=RSA,
> asym_keylength=2048, cipher_pool_size=8, encrypt_entire_message=false,
> ergonomics=true, id=58, key_map_max_size=20,
> keystore_name=/var/opt/vs/SecureInterface/jgroups/jgroup.keystore,
> keystore_type=JCEKS, level=DEBUG, provider=null, sign_msgs=false,
> stats=true, sym_algorithm=AES, sym_iv_length=0, sym_keylength=128,
> use_adler=false, version=7D1160B53765281EECA6EDEFE6436BB3}
>
> /Note: If I just remove the SYM_ENCRYPT protocol, JGroups cluster works
> just fine with all the completed views./
>
> Any help on this is highly appreciated.
>
> Best regards.
> Chintan Rohila
>
> --
> You received this message because you are subscribed to the Google
> Groups "jgroups-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
jgroups-dev...@googlegroups.com
> <mailto:
jgroups-dev...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/jgroups-dev/7fe11173-ec4d-4fb8-b2f8-3b5ee3dcc7f2n%40googlegroups.com <
https://groups.google.com/d/msgid/jgroups-dev/7fe11173-ec4d-4fb8-b2f8-3b5ee3dcc7f2n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
Bela Ban |
http://www.jgroups.org