SourceForge.net Logo

Chapter 3. Create Logins

For the following steps we assume that the openCRX administrator has configured the users admin-Root, admin-Standard and guest with the appropriate roles on the application server. In the case of JBoss he would have edited the files openCRX.users.properties and openCRX.roles.properties in directory ./jboss-4.0.1/server/default/conf as follows and then restarted the application server:

Example 3-1. openCRX.users.properties with user=password syntax.

admin-Root=rootSecret
admin-Standard=adminSecret
guest=guest

Example 3-2. openCRX.roles.properties with user.Roles=role1,role2 syntax.

admin-Root.Roles=OpenCrxRoot
admin-Standard.Roles=OpenCrxAdministrator
guest.Roles=OpenCrxUser

Before a user can login to openCRX you must first create a new login at the application server level. Of course you can automate this process. E.g. on JBoss you can replace the file-based org.jboss.security.auth.spi.UsersRolesLoginModule login module with the database login module org.jboss.security.auth.spi.DatabaseServerLoginModule and configure it to access the openCRX security tables security_Principal and security_Credential. Please refer to the JBoss installation guide if you want to make use of the database login module.

Overview

Before we get started with setting up openCRX it is helpful if you know that - by default - there are three types of users playing quite different roles in the context of openCRX:

  • Root (default login is admin-Root)

    • Performs the initial openCRX setup. This initializes the database and loads basic openCRX working data (e.g. code tables). This is a one-time task.

    • Creates new segments. openCRX is multi-entity enabled. Each entity's data is stored in its own data segment. The segmentation of data is a basic and important concept of openCRX. It allows to setup private areas for different user groups, e.g. branches of a company or different small business companies. A user can have multiple logins, whereas a login allows access to exactly one segment. E.g. a user demo can have the logins demo-companyA and demo-companyB which are managed by root in the table security_Principal. If the user logs in as demo-companyA he/she has access to the segment companyA, i.e. he/she can only see data created by users of companyA. This is shown in Figure 3-1. A small to medium setup has typically only 1 data segment named Standard.

  • Administrator (default login is admin-<SegmentName>). Each data segment has its own administrator. E.g. the administrator for the segment companyA has the login admin-companyA, the administrator for the segment Standard has the login admin-Standard. The administrator is responsible for all administrative tasks related to a particular data segment, e.g. creating users.

  • User: A user is a standard openCRX user which manages accounts, products, leads, activities, etc. Each user is assigned to a segment and is member of one or more user groups.

Figure 3-1. Data in the openCRX database can be partitioned into data segments.

All users who access openCRX by the same web application (e.g. opencrx-core-CRX) also share the same customization files (user interface, code tables, basic data). The openCRX/Core README explains how to setup multiple customized web applications.

.

The following sections explain:

http://www.crixp.com/ http://www.openmdx.org/