powered by Jive Software

How to uniquely idenfy users in an OpenFire standard instalation?

Hey.

I am using the standard instalation (OF uses an external DB) and the JDBC User Provider.

My problem is that I can have multiple users with the same name, but different other properties (like “domain” or “tenant”), and OF identifies the user solely by one property (username). Is it possible for me to specify multiple properties when trying to select the user ?

Thank you in advance,

Bogdan Pop

You need to have one unique field to identify your user accounts; this is true in any system. The username should be unique even for people with common names. Sometimes this is accomplished by appending the first letter of the last name or simply incrementing the username. So the first John Doe might have username john and the second John Doe might have username johnd or john2.

You would be making things more difficult than they should be if you tried to append fields together to make a unique identifier for your users.

The roster in Spark will list the users firstname and lastname, so from your user’s perspective there will still be two John Doe’s…if you are worried about that.

Thank you for your quick answer.

While what you are saying is true in most systems, sadly it is not in mine. We have the concept of domain in our database and usernames are required to be unique in their domain, not across the entire db. So the db constraint on the users table is UNIQUE (username, domain), thus I could have the same username (eg: admin) in multiple domains. These specs are in stone…

That’s why I would need to somehow tell OF to select the user from a specific domain.

If that is not possible, I will try and use the primary key as the unique column from the users table, but that seems more of a hack :slight_smile:

Thank you again!

Wow. I think I understand what you are saying…your users already have usernames that they are familiar with and you want them to be able to use that to login to Spark.

Honestly, I think you’ll have to create new usernames for everyone. So even though the Johns login to your DB’s with username john they’ll have to use something different when logging into Spark.

How do they login to their PC’s? Are the PC’s simply in workgroups and the users just authenticate against the list of local users?

Yes, I already have lost of users defined, each user having their respective domain. AND some of the usernames are duplicate (like ‘admin’, but there are more).

I am using the Smack 3.2.2. client library to talk to OF, so when these users want to login into the IM module, Smack needs username String and password String. In my system, these 2 variables alone are not enough to uniquely identify the user from the data base, so either I find a way to add another variable (like domain) or I will use the primary key as the column from the users table that OF knows about.

Many thanks for your time,

Bogdan.

Hello, I need suggestions around implementing a multitentant solution of OF. Any help will be appreciated.

Regards

Digvijay Sinha