Projects tigase _server server-core Issues #821
Problem with Custom Authentication when upgrading to 7.1.0 (#821)
Closed
Claus Weng opened 7 years ago
Due Date
2017-05-03

Hi

We are currently running tigase 5.2.2 with a custom authentication. We are trying to upgrade our tigase server to 7.1.0 and we have implemented the methods in our custom auth according to the tigase.db.AuthRepository.

The server starts up fine as I can see (I've attached the console.log) but our clients cannot connect and in the log we only get:

java.lang.IllegalArgumentException: Empty key

at javax.crypto.spec.SecretKeySpec.<init>(SecretKeySpec.java:96)

at tigase.auth.mechanisms.AbstractSaslSCRAM.key(AbstractSaslSCRAM.java:181)

at tigase.auth.mechanisms.AbstractSaslSCRAM.processClientFirstMessage(AbstractSaslSCRAM.java:221)

at tigase.auth.mechanisms.AbstractSaslSCRAM.evaluateResponse(AbstractSaslSCRAM.java:151)

at tigase.xmpp.impl.SaslAuth.process(SaslAuth.java:277)

at tigase.server.xmppsession.SessionManager$ProcessorWorkerThread.process(SessionManager.java:2562)

at tigase.util.WorkerThread.run(WorkerThread.java:128)

I've attached the init.properties (removed sensitive info)

Looking forward to hear from you

Best regards

Claus Weng

init.properties tigase-console.log

Andrzej Wójcik (Tigase) commented 7 years ago

It looks like your custom authentication mechanism is not used and your XMPP client prefers to use SCRAM-SHA1 mechanism which is not working with your implementation of @AuthRepository@, ie. due to encoded passwords in a database, password not being stored in a database or similar issue. We are working on a mechanism which will disable SCRAM-SHA1 if it cannot be used but it will be available in version 7.2.0, see #4814

As I workaround for version 7.1.0 and 7.1.1, I would like to suggest to add following entry to etc/init.properties file:

sess-man/plugins-conf/enabled-mechanisms=PLAIN,DIGEST-MD5

which will disable SCRAM-SHA1 mechanism and leave PLAIN and DIGEST-MD5 enabled.

Claus Weng commented 7 years ago

Thank you very much. sess-man/plugins-conf/enabled-mechanisms=PLAIN,DIGEST-MD5 did the trick

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
5457
Version
tigase-server-7.1.1
Spent time
2h 30m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#821
Please wait...
Page is in error, reload to recover