Project

General

Profile

mongodb admins could not be created with starting

w xy
Added 2 months ago

admins could not be created with starting

admins = [ '10005@xmpp.server' ]

dataSource {
default () {
'schema-management' = false
uri = 'mongodb://xmppUser:123456@192.168.97.132:27017/tigase'
}
'muc-store' () {
'schema-management' = false
uri = 'mongodb://xmppUser:123456@192.168.97.132:27017/imRoom'
}
}

However, in the table 'tig_users', there is not a account named '10005',
and create tigase user via smack , there is a account by created with the tig_users, but there are created credentials in the tig_user_credentials

XMPPTCPConnection conn = this.getConnection();
AccountManager accountManager = AccountManager.getInstance(conn);
accountManager.createAccount(Localpart.from(username), password);


Replies (6)

Added by w xy 2 months ago

the account named 10005 was created later via smack, not by starting tigase

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam 2 months ago

Tigase XMPP Server is not creating admins based on entries in the config file. Those are just JIDs which should be assumed to be admins, but users need to be created manually or during installation of Tigase XMPP Server using web-based installer which is capable of creating users in the database.

Added by w xy 2 months ago

a lot of users need to be created, so it is not useful by using web-based installer. however it is ok via a smack jar, but it is no data in the table tig_users, but there are created credentials in the tig_user_credentials.

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam 2 months ago

I was referring to your question, in which you wanted to create admin accounts and for that, you can use the web-based installer. For creating plain users, creation using XEP-0077: In-Band Registration (as you do with use of SMACK) is one of the solutions. You can use HTTP REST API provided by Tigase XMPP Server as well.

however it is ok via a smack jar, but it is no data in the table tig_users, but there are created credentials in the tig_user_credentials.

I do not get this part. If you refer to the fact that password field in tig_users table is not filled in Tigase XMPP Server, then that is true. This field is deprecated and instead of using this field Tigase XMPP Server uses tig_user_credentials table as a more flexible way to store passwords.

Added by w xy 2 months ago

the first , i didn't use web-ui program, the second, in the my another one, i used Smack that it is a class library for communicating with XMPP servers, enabling instant messaging and chat.

the code like :

XMPPTCPConnection conn = this.getConnection();
AccountManager accountManager = AccountManager.getInstance(conn);
accountManager.createAccount(Localpart.from(username), password);

It is a code to create users through smack. there are credentials of user in the the tig_user_credentials table , but there are not account in the tig_users.

Added by w xy 2 months ago

It was available some time ago, and later it was not available.

    (1-6/6)