Projects tigase _server server-core Issues #773
can not get the custom sasl auth from the init.properties file in SessionManager component class (#773)
来恩 周 opened 8 years ago
Due Date
2017-03-19

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'

}

}

Andrzej Wójcik (Tigase) commented 8 years ago

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.

Andrzej Wójcik (Tigase) commented 8 years ago

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.

Andrzej Wójcik (Tigase) commented 8 years ago

This fix will be part of a next snapshot build.

来恩 周 commented 8 years ago

Thank you!

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

Andrzej Wójcik (Tigase) commented 8 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.

来恩 周 commented 8 years ago

ok, thank you!

issue 1 of 1
Type
Bug
Priority
Major
Assignee
RedmineID
5042
Version
tigase-server-8.0.0
Spent time
23h 45m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#773
Please wait...
Page is in error, reload to recover