|
|||||||
|
|
|||||||
|
Table of Contents
OpenKM ConfigurationThere are several files at $JBOSS_HOME:
OpenKM configuration fileThe OpenKM configuration file is located at $JBOSS_HOME:
repository.config=repository.xml
repository.home=repotest
default.user.role=UserRol
default.admin.role=AdminRol
principal.adapter=es.git.openkm.core.UsersRolesPrincipalAdapter
max.file.size=5
max.search.results=25 Integration with JBoss logginOpenKM can log the user activity. JBoss is configured in the file $JBOSS_HOME/server/default/conf/loglog4j.xml. To log the user activity this appender has to be created: <appender name="OKM_LOG" class="org.jboss.logging.appender.DailyRollingFileAppender"> <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/> <param name="File" value="${jboss.home.dir}/OpenKM.log"/> <param name="Append" value="true"/> <param name="DatePattern" value="'.'yyyy-MM-dd"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d %-5p %m%n"/> </layout> </appender> Given that the activity is logged with priority INFO this configuration should be also added: <category name="es.git.openkm.ActivityLog"> <priority value="INFO" /> <appender-ref ref="OKM_LOG"/> </category> This configuration creates a log file per day; therefore the action info can better be located. If you want an appender with the same name can be configured in order to store the log info in a database. Integration with JBoss securityFile basedThis is the most simple security (and by default) configuration. It is archived using the JBoss UsersRolesLoginModule login module. “User” is stored in the file $JBOSS_HOME/server/default/conf/users.properties as follows: system=systempass user1=pass1 user2=pass2 ... Note that the password is not encrypted. The roles are in the file $JBOSS_HOME/server/default/conf/roles.properties as follows: System=AdminRol,UserRol user1=UserRol,Rol1,Rol2,... user1=UserRol,Rol1,Rol2,... ... The JBoss security is configured in the file $JBOSS_HOME/server/default/conf/login-config.xml. This is the JBoss configuration for this method: <application-policy name = "OpenKM"> <authentication> <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag = "required"> <module-option name="usersProperties">users.properties</module-option> <module-option name="rolesProperties">roles.properties</module-option> </login-module> <login-module code="org.jboss.security.ClientLoginModule" flag="required" /> </authentication> </application-policy> More information can be found in the JBoss documentation. Another option is the principal.adapter configuration. As it has previously been said, OpenKM uses UsersRolesLoginModule login module by default which uses the users.properties and roles.properties. OpenKM needs this information to create a list of users and roles being available in the changing permissions dialog. This is done by the UsersRolesPrincipalAdapter class. This is an implementation of the es.git.openkm.core.PrincipalAdapter interface: public interface PrincipalAdapter { /** * Method to retrieve all users from a authentication source. * * @return A Collection with all the users. * @throws PrincipalAdapterException If any error occurs. */ public Collection getUsers() throws PrincipalAdapterException; /** * Method to retrieve all roles from a authentication source. * * @return A Collection with all the roles. * @throws PrincipalAdapterException If any error occurs. */ public Collection getRoles() throws PrincipalAdapterException; } LDAP (and Active Directory) basedYou can get LDAP integration through the LdapExtLoginModule login module. <application-policy name="OpenKM"> <authentication> <login-module code="org.jboss.security.auth.spi.LdapExtLoginModule" flag="required" > <module-option name="java.naming.provider.url">ldap://mycompany.com.br:389</module-option> <module-option name="bindDN">CN=My_adm_account,OU=Admin Accounts,DC=mycompany,DC=com,dc=br</module-option> <module-option name="java.naming.security.authentication">simple</module-option> <module-option name="bindCredential">My_adm_account_password</module-option> <module-option name="baseCtxDN">ou=Users Accounts,dc=mycompany,dc=com,dc=br</module-option> <module-option name="baseFilter">(sAMAccountName={0})</module-option> <module-option name="rolesCtxDN">ou=Users Accounts,dc=mycompany,dc=com,dc=br</module-option> <module-option name="roleFilter">(sAMAccountName={0})</module-option> <module-option name="roleAttributeID">memberOf</module-option> <module-option name="roleAttributeIsDN">true</module-option> <module-option name="roleNameAttributeID">cn</module-option> <module-option name="roleRecursion">-1</module-option> <module-option name="searchScope">SUBTREE_SCOPE</module-option> <module-option name="defaultRole">UserRol</module-option> </login-module> </authentication> </application-policy> Here are some configuration comments:
Only users having the “UserRol” set at An admin user must be created to run OpenKM, at the moment administrator user name must be “system” and must have assigned “AdminRol” and “UserRol”. In future releases administrator name will be independent. On order to make a full LDAP integration, you need to implement the PrincipalAdapter interface and provide into to access the list of users and roles defined in the LDAP installation. Find out more information about the options at: http://wiki.jboss.org/wiki/Wiki.jsp?page=LdapExtLoginModule |
![]() Let's improve OpenKM
Latest Forum PostsWhich feature do you need? |
||||||