AUTH protocol in JGroups 5

9 views
Skip to first unread message

Chintan Mohan Rohila

unread,
May 20, 2025, 1:55:25 AMMay 20
to jgroups-dev
Hi,

Till JGroups 4 we have been using the AUTH protocol as follows:

<AUTH 

auth_class="org.jgroups.auth.MD5Token"

auth_value="${jgroups.auth_value}"

token_hash="MD5"/>

But it looks like "org.jgroups.auth.MD5Token" is no longer available in JGroups5.

We have been trying to use "org.jgroups.auth.X509Token" using the following AUTH protocol values, but this is also not working. Please suggest how can AUTH protocol with common auth_value be used in JGroups 5?

<AUTH

       auth_class="org.jgroups.auth.X509Token"

      keystore_path=".../<jgroups_keystore.jks>"

      keystore_password="<password>"

      cert_alias="<alias>"

      cert_password="<password >"

      auth_value="<auth_value>"

      cipher_type="RSA"/>

Error:

Exception in thread "main" java.lang.IllegalArgumentException: JGRP000001: configuration error: the following properties in AUTH are not recognized: {keystore_password= password  , cert_alias= alias  , keystore_path= jgroups_keystore.jks  , cipher_type=RSA, cert_password= password    , auth_value= auth_value  }

  at org.jgroups.stack.Configurator.initializeAttrs(Configurator.java:218)

  at org.jgroups.stack.Configurator.createProtocolsAndInitializeAttrs(Configurator.java:126)

  at org.jgroups.stack.Configurator.setupProtocolStack(Configurator.java:65)

  at org.jgroups.stack.Configurator.setupProtocolStack(Configurator.java:55)

  at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:439)

  at org.jgroups.JChannel.init(JChannel.java:745)

  at org.jgroups.JChannel.<init>(JChannel.java:126)

  at org.jgroups.JChannel.<init>(JChannel.java:107)

  at org.jgroups.demos.Chat.start(Chat.java:34)

  at org.jgroups.demos.Chat.main(Chat.java:97)

Bela Ban

unread,
May 20, 2025, 2:09:31 AMMay 20
to jgrou...@googlegroups.com
The reason why MD5Token was removed is discussed in [1] and [2].

You need to prepend your attributes with "auth_token.", see below.

[1] http://www.jgroups.org/manual5/index.html#AUTH

[2] https://issues.redhat.com/browse/JGRP-2367

  <AUTH auth_class="org.jgroups.auth.X509Token"
        auth_token.auth_value="chris"
        auth_token.keystore_path="/Users/bela/JGroups/keystore/defaultStore.keystore"
        auth_token.keystore_password="changeit"
        auth_token.cert_alias="mykey"
        auth_token.cipher_type="RSA"/>

--
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.
To view this discussion visit https://groups.google.com/d/msgid/jgroups-dev/dffc11f9-bc29-4886-89a0-fbf698e5724bn%40googlegroups.com.

-- 
Bela Ban | http://www.jgroups.org

Reply all
Reply to author
Forward
0 new messages