Project

General

Profile

Tigase 5.2 and Spark Authentication failed

Marcello Lorenzi
Added about 5 years ago

Hi all,

I installed a tigase server on my test VM and I tried to test the login with a user created with the stored procedure present on the database schema created during the installation but it didn't work.

If i tried to login with Spark I received the message "Invalid username or password". My configuration of init.propertis filei is

config-type=--gen-config-all
--admins=admin@local
--virt-hosts = local
--debug=server,xmpp.impl
--cluster-mode=false
--tigase-cache=false
--user-db=pgsql
--user-db-uri=jdbc:postgresql://192.168.10.40:5432/tigase?user=tigase
--auth-db=pgsql
--auth-db-uri=jdbc:postgresql://192.168.10.40:5432/tigase?user=tigase

The messages noted during the login on tigase.0.log are:

2014-04-29 23:46:18.085 [ConnectionOpenThread]  ConnectionManager$ConnectionListenerImpl.accept()  FINEST: Accept called for service: null@null
2014-04-29 23:46:18.086 [ConnectionOpenThread]  ConnectionManager.serviceStarted()  FINER: [[c2s]] Connection started: null, type: accept, Socket: nullSocket[addr=/192.168.10.40,port=55458,localport=5222], jid: null
2014-04-29 23:46:18.104 [pool-11-thread-4]  ClientConnectionManager.xmppStreamOpened()  FINER: Stream opened: {xmlns:stream=http://etherx.jabber.org/streams, to=192.168.10.40, xmlns=jabber:client, version=1.0}
2014-04-29 23:46:18.106 [pool-11-thread-4]  ConnectionManager.serviceStopped()  FINER:  [[c2s]] Connection stopped: c2s@space01.local/192.168.10.40_5222_192.168.10.40_55458, type: accept, Socket: c2s@space01.local/192.168.10.40_5222_192.168.10.40_55458 Socket[unconnected], jid: null
2014-04-29 23:46:18.108 [pool-11-thread-4]  ClientConnectionManager.xmppStreamClosed()  FINER: Stream closed: c2s@space01.local/192.168.10.40_5222_192.168.10.40_55458
2014-04-29 23:46:42.625 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}
2014-04-29 23:47:42.625 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}
2014-04-29 23:48:42.627 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}
2014-04-29 23:49:42.624 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}
2014-04-29 23:50:42.625 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}
2014-04-29 23:51:42.624 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}
2014-04-29 23:52:42.629 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}
2014-04-29 23:53:42.625 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}
2014-04-29 23:54:42.628 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}
2014-04-29 23:55:42.626 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}
2014-04-29 23:56:42.629 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}

Could someone help me to understand if my configuration has some issue?

Thanks,

Marcello


Replies (3)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 5 years ago

You used local as vhost in Tigase but the IP address: 192.168.10.40 as part of the account name in your client where you give the domain name. You have to use the same domain name for both, the Tigase configuration local in your case and for the account configuration in your Spark client.

Added by Marcello Lorenzi about 5 years ago

I have changed the virtual host to drupal-chat.local and I have created on the database some users with suffix @drupal-chat.local and the connectivity works now. I have a question about the user creation for a correct login: Do i have to add for each user the suffix with the domain into the function tigadduserplainpw?

Thanks,

Marcello

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 5 years ago

Yes, you have. The domain is a part of a user ID (Jabber ID). However, you can either do this by entering it in DB or it could be added by the stored procedure in DB.

    (1-3/3)