• How to use the database user authentication?

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #226  by boatboy
 
I want to create user and role of openkm system in db,not openkm-roles.properties and openkm-users.properties .when I login use users and roles of db.


I am very thank you
 #228  by jllort
 
You have two ways:

1. OpenKM 2.0. Enterprise edition will come with database user autentication ( you could use it, but it\'s pay supported version).

2- If you want to connect to existing database take a Look at this documentation entry point OpenKM Configuration.

You must change OpenKM login to autenticate to your database ( really simply ).
For full integration you need to extend PrincipalAdapter class ( really simply too ).

If you decide to do the second option, see Developer guide ( on les 10 minuts you\'ve got running).

Hope It could help you.
 #725  by coolmudassir4u
 
I am trying to integrate my openkm with postgresql but it gives me error that my repository home is locked by another process,i remove .lock in repository directory/remove repository directory/shutdown and start properly/install and configure multiple times with my previous configuration but..... but................ nothing works for me ,i take full Oracle integration as example from openkm documentation, i successfully integrate ldap with openkm ,please anyone guide me how i integrade my postgresql with openkm???????.........
 #726  by jllort
 
About user autentication it must be something like it:

On login-config.xml

<application-policy name=\"OpenKM\">
<authentication>
<login-module code =\"org.jboss.security.auth.spi.DatabaseServerLoginModule\" flag=\"required\">
<module-option name = \"unauthenticatedIdentity\">Anonymous</module-option>
<module-option name=\"dsJndiName\">java:/jndi.datasource.name.db</module-option>
<module-option name=\"principalsQuery\">select user_pwd_table as PASSWD from user_table where user_name=?</module-option>
<module-option name=\"rolesQuery\">select role_name as ROLEID, \'Roles\' from user_table, roles_table where user_roles_name=user_name and user_name=?</module-option>
</login-module>
</authentication>
</application-policy>

The query it\'ll be dependant on your table structure ( remember it, it\'s only and exemple of how could be )

Some file called datasource-ds.xml or something fileXXX-ds.xml to create jndi name like it

<?xml version=\"1.0\" encoding=\"UTF-8\"?>

<datasources>
<local-tx-datasource>
<jndi-name>jndi.datasource.name.db</jndi-name>
<connection-url>jdbc:postgresql://localhost/you_databasename</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>user</user-name>
<password>pwd</password>
</local-tx-datasource>
</datasources>

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.