powered by Jive Software

Problem with custom authentication

Hi,

I downloaded openfire 3.6.4 today and I’ve been struggling to get the configuration to work with custom authentication. My openfire.xml config file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<jive>
  <provider>
    <auth>
      <className>org.jivesoftware.openfire.auth.JDBCAuthProvider</className>
    </auth>
  </provider>
  <jdbcProvider>
    <driver>com.mysql.jdbc.Driver</driver>
    <connectionString>jdbc:mysql://localhost/testdb?user=user&amp;password=secret</connectionString>
  </jdbcProvider>
  <jdbcAuthProvider>
    <passwordSQL>SELECT password FROM users WHERE username=?</passwordSQL>
    <passwordType>sha1</passwordType>
  </jdbcAuthProvider>
  <admin>
    <authorizedUsernames>user1</authorizedUsernames>
</admin>
  <adminConsole>
    <port>9090</port>
    <securePort>9091</securePort>
  </adminConsole>
  <locale>en</locale>
    <network>
    <interface></interface>
    </network>
  <setup>true</setup>
  <connectionProvider>
    <className>org.jivesoftware.database.EmbeddedConnectionProvider</className>
  </connectionProvider>
</jive>

I have also set ‘provider.auth.className’ to ‘org.jivesoftware.openfire.auth.JDBCAuthProvider’ in the server properties of the control panel. I don’t get any errors when starting up but it refuses to accept the password for ‘user1’ to login to the control panel. I have noticed also that the ‘authorizedUsernames’ key is always removed from openfire.xml after startup which I believe is the root of the problem, I can’t find anything in the logs to explain why it would be removing this value.

Can anyone help?

Thanks.