Project

General

Profile

Bug #5042

can not get the custom sasl auth from the init.properties file in SessionManager component class

Added by 来恩 周 about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
Start date:
2017-03-10
Due date:
2017-03-20
% Done:

0%

Estimated time:
Database:
MongoDB
Applicable version:
7.2.0
Source Code Disclaimer:

Description

Hi, all

When I configure sasl in init.properties, the TigaseSaslProvider settings is empty, not contains any key and value.

I configure the init.properties sess-man like:

'sess-man' (class: tigase.server.xmppsession.SessionManager) {

'urn:ietf:params:xml:ns:xmpp-sasl' (class: tigase.xmpp.impl.SaslAuth) {

    'callbackhandler-THIRD-AUTH' = 'tigase.auth.impl.ThirdAuthCallbackHandler'

    factory = 'tigase.auth.mechanisms.CustomSaslServerFactory'

    'mechanism-selector' = 'tigase.auth.CustomMechanismSelector'

}

}

History

#1 Updated by Andrzej Wójcik IoT 1 CloudTigaseTeam about 2 years ago

  • Due date changed from 2017-03-11 to 2017-03-20
  • Estimated time deleted (2.00 h)

Thank you for reporting this issue. Currently Tigase XMPP Server 7.2.0 is in intensive development phase and this issue is related to extensive changes in configuration of Tigase XMPP Server.

#2 Updated by Andrzej Wójcik IoT 1 CloudTigaseTeam about 2 years ago

  • Status changed from New to In QA
  • Assignee changed from Andrzej Wójcik to 来恩 周

I've fixed issue with usage of custom SASL mechanisms, providers and callback handlers. As SASL settings are reused by JabberIqAuth processor, I created separate sasl-provider which will be used to configure SASL related settings.

In your case SASL configuration would look like this:

'sess-man' () {
    'sasl-provider' () {
        'mechanism-selector' (class: tigase.auth.CustomMechanismSelector) {}
        'callback-handler-factory' (class: tigase.auth.impl.ThirdAuthCallbackHandlerFactory) {}
        'customSaslServerFactory' (class: tigase.auth.mechanisms.CustomSaslServerFactory) {}
        'tigaseSaslServerFactory' (active: false) {}
    }
}

+Note:+ In my example I used @ tigase.auth.impl.ThirdAuthCallbackHandlerFactory@ which is implementation of @CallbackHandlerFactory@, so you need to implement callback handler factory - not only provide callback handler class, as in your example.

#3 Updated by Andrzej Wójcik IoT 1 CloudTigaseTeam about 2 years ago

This fix will be part of a next snapshot build.

#4 Updated by 来恩 周 about 2 years ago

Thank you!

Can you give the ThirdAuthCallbackHandlerFactory code in here, let me reference it to write the implementation of CallbackHandlerFactory

#5 Updated by Andrzej Wójcik IoT 1 CloudTigaseTeam about 2 years ago

As a reference for implementation of ThirdAuthCallbackHandlerFactory please use tigase.auth.CallbackHandlerFactory which is default callback handler for authentication mechanisms used by Tigase XMPP Server.

#6 Updated by 来恩 周 about 2 years ago

ok, thank you!

#7 Avatar?id=6023&size=24x24 Updated by Artur Hefczyc TigaseTeam about 2 years ago

  • Status changed from In QA to Closed

Also available in: Atom PDF