powered by Jive Software

org.jivesoftware.openfire.admin.DefaultAdminProvider

Is there a JDBC alternative to this? I have configured JDBC authentication for users and groups, but now I can’t get into the admin interface because none of the username are recognized as admins. I see absolutely nothing in the custom database integration guide to address this.

Doing back-end chat integration where a unique id is used for the sign in. All I keep getting in the debug log is this:

org.jivesoftware.openfire.auth.UnauthorizedException: User ‘1597’ not allowed to login.

I can find absolutely NO way to get around this. If you see my earlier post,

1594,1597</authorizedUsernames

Does not work because openfire keeps ERASING the value.

Would reverting to 3.6.1 fix this? 3.6.2 seems to be horribly documented.

Reverting to 3.5 fixed this since it actually allows you to specify admin users in the conf file. Please PLEASE update your documentation for database integration to actually give a possible means to authenticate admin users this way. Without your web interface I might as well use ejabberd.

Hi,

with 3.6.2/3 you can specify the admins in the web console and they are stored in the database.

As long as you have access to the Openfire web console you may want to set the Openfire System Property “admin.authorizedJIDs” to "foo@example.com".

I’ll review the documentation and may create an issue to add this info.

LG

“As long as you have access to the Openfire web console”

The problem is, after i set up the database integration I no longer have a means of accessing the web console. None of the users the system is pulling from the mysql table are registered as users so I essentially just cut my own access to the web interface. None of the users are named “admin” which I imagine would work otherwise.

Is there a setting somewhere specifically that I can set this without using the web interface? Is this a property that has been moved to the database, and if so where?

“are registered as users”

oops, meant

"are registered as admins "

The primary issue here is that “admin” isn’t necessarily a valid user when doing database integration. I needed to manually create an authorizedJID as well as migrate all of the configurations to the new mysql config method. The documentation is incorrect as it still states this should be done in openfire.xml.

I was able to get it working by doing the following:

  1. Complete initial install via the web admin, using MySQL Database configuration

  2. Halt the openfire service

  3. On the database created, table “ofProperty”, set the following values (updating the propValue as you need):

name
propValue
admin.authorizedJIDs
validjid@yourdomain.com
provider.user.className
org.jivesoftware.openfire.user.JDBCUserProvider
provider.auth.className
org.jivesoftware.openfire.auth.JDBCAuthProvider
jdbcAuthProvider.passwordSQL
SELECT password FROM accounts WHERE username=?
jdbcAuthProvider.passwordType
plain
jdbcUserProvider.loadUserSQL
SELECT CONCAT_WS(’ ‘,first_name,last_name) as name,email FROM accounts WHERE account_id=?
jdbcUserProvider.userCountSQL
SELECT COUNT(*) FROM accounts
jdbcUserProvider.allUsersSQL
SELECT username FROM accounts
jdbcUserProvider.searchSQL
SELECT username FROM accounts WHERE
jdbcUserProvider.usernameField
username
jdbcUserProvider.nameField
CONCAT_WS(’ ',first_name, last_name) as name
jdbcUserProvider.emailField
email
jdbcProvider.driver
com.mysql.jdbc.Driver
jdbcProvider.connectionString
jdbc:mysql:///?user=&password=

  1. Start up the openfire service.

  2. You should be able to log in with any JIDs set in the “admin.authorizedJIDs” on “ofProperty”

Sorry, did not mean to post here. Please remove.