Authenticate from Another Table


I downloaded Openfire 3.7 and installed successfully in a MySQL Schema

I want to authenticate my users from another tables instead of “OFUSER” table.

The help given in Documentation for same is not successful as after lot of digging i found out that XML file is not being used now

Please Help in resolving this issue

Pls Reply

Hi Knight Raider,

Please read the documentation at: ration-guide.html

But it’s a little bit outdated. Instead of putting these configurations in the settings.xml, put it in the admin webinterface at the system settings.

You need the following keys (at least):

  • jdbcAuthProvider.passwordSQL

  • jdbcAuthProvider.passwordType

  • jdbcProvider.connectionString

  • jdbcProvider.driver



Ps: @Openfire Devs: Please update the docs, thanks

hi Michael

i tried all possible combinations …it was not successful

a) i kept both tables in different schemas, as well as in same schema

b) added configproperties in XML file as well as tried by adding properties in Admin Console

i am not able to authenticate user from chat client…

can u please provide the exact details

at present mysql, openfire are on same machine…authentication table is in diff schema and openfire is in diff schema

Hi Knight Raider,

I have both schemas in a different database, no problem

You don’t have to add it in the XML file, only in the Admin console.

Is the passwordSQL correct? Also the passwordType (plain, md5, sha1)?



I found the following error in my Openfire log

Exception in JDBCAuthProvider

java.sql.SQLException: Access denied for user ‘root’@‘localhost’ (using password: NO)

i have added

jdbcProvider.driver = com.mysql.jdbc.Driver



provider.auth.className= org.jivesoftware.openfire.auth.JDBCAuthProvider

and i have already set passwordSQL and passwordType also

from admin console

I Think mysql is not connecting to this schema

how to resolve this…

i think i have to pass the connectionString in a different way;

any help

Its working now

i removed ‘amp;’ from connectionString in ofProperty table…

Now my question is…all other things like roster, presence, rooms do i have to create separate tables are i can use existing tables in openfire…

Openfire will support for other functionality or not as i am authenticating from external table

Nice to hear that. (But strange that it didn’t work like that, afaik it works for us with ‘amp;’…)

You can use the existing tables of openfire (either via the built-in DB or also with a MySQL DB). The authentication is done separately if you configured it like this .

Hi Michael Weibel

I am not able to populate the roster…after implementing external authentication…

is it because i am not using openfire groups…

do i need to add groups and users in openfire…to populate roster

i tried by adding jdbcUserProvider and GroupProvider with all supported SQL statements in Jive Properties…

i am not able to populate roster…

do i need to add groups and users to tables in Openfire schema? coz if i am creating users, groups in openfire tables…things are working fine…like population of roster, subscription, invitations, presence status etc…

as i am authenticating from external Schema, how can i get their presence etc

This would be great help


How do you mean that? What do you want to do?

The authentication does only authenticate your users with your existing User-Table.

The population of roster etc. is done as before, the users from your usertable get when they connect a jid in the form of username@yourserver.tld, like before



I am putting my question in a better way

a) As per my current configuration i am using JDBCAuthProvider to authenticate my XMPP client users from external tables.

b) Due to this configuration i am not able to login into Admin Console of Openfire. and in turn i am not able to add users to groups with (Sharing of Groups enabled at Openfire)

c) In my external tables…i have users master table, groups master table, and usergroups tables…

d) because i am using JDBCUserProvider and JDBCGroupProvider to get these lists, How can i come to know the presence of a user?

e) if i am using DefaultUserProvider,DefaultGroupProvider i can use Openfire tables but still i am not able to login into Admin Console coz of JDBCAuthProvider.

f) as of now my understanding is that, if users and groups of Openfire are used, then only i am able to get presence, roster, invitations etc.

g) if i am using external table. i wont get it…

pls educate me

b) Due to this configuration i am not able to login into Admin Console of Openfire. and in turn i am not able to add users to groups with (Sharing of Groups enabled at Openfire)
Do you have your username@yourserver.tld in the admin list(within configuration)? (with the username you’re authenticating with your external db)

To know the presence of the User: it’s like before, you receive a XML-Message when connecting to the server with Jabber.

Or do you want to know the presence without connecting to jabber, just by reading some db table? Then I don’t know, but I think there’s a standard plugin which creates a API for that…

Wow I authenticated…i got autopopulated list of Groups and Users…Thankx alot Michael…This was my worry…Beautiful it worked…

1 Like