[Help] Multiple users for development

7 posts / 0 new
Last post
Marc
Offline
Joined: 07/08/2009
[Help] Multiple users for development

Hello,

I arrived at a point where I need to log in as several users/roles that work on the same data, albeit still only in development mode. In the reference guide I find how to specify a single user (his username, password and roles) in the jaas.config file. But I do not know the format for specifing multiple users.  The jaas.config files contains this:

hello {
   org.jspresso.framework.security.auth.spi.DevelopmentLoginModule required
       user=demo
       password=demo
       roles="SalesManager"
       custom.language=en;   
};

How can I enter here multiple users? Or should I follow another road? Or is this out of scope of JSpresso and part of apache-catalina (if yes, any further directions would help)?

Thanks,

Marc

atao
Offline
Joined: 10/15/2008
[Help] Multiple users for development

Marc,

 

The jspresso login module is available only to test your development. To set a multiple users environment, you need to switch to a DBMS, a LDAP...

About LDAP, see the wiki http://www.jspresso.org/wiki/jspresso-wiki/ldap-and-custom-properties

Regards

Pierre

vvandens
Offline
Joined: 05/29/2008
[Help] Multiple users for development

Marc,

Pierre is right. The development login module doesn't allow for multiple users; so switching to a "real-life" JAAS backend is the currently only option to achieve what you want.

But it would be also a good idea to improve the development login module to allow for building a "self-contained" application that demonstrates the different security roles. This would allow to delay the setup of the real JAAS backend, as you can delay the setup of the real DB. Of course there will be a point where you will need to give up the dev login module and do the real switch, as Pierre suggested.

Now, we need to play with the syntax. What about something like :

       user_0=guest
       password_0=pass_guest
       roles_0="Visitor"
       custom_0.language=en

       user_1=marc
       password_1=pass_marc
       roles_1="SalesManager,Accountant"
       custom_1.language=fr;

 

where xxx_0 key should be an alias for the actual xxx key (e.g. password_0 is an alias for password) for backward compatibility.

Does it make sense ? Marc, would you create a feature request ?

 

Best,

Vincent

Marc
Offline
Joined: 07/08/2009
Pierre and Vincent, I created

Pierre and Vincent,

I created a feature request, as this would indeed make sense.

On the other hand, I am not against making the real step now: going to LDAP and to a real DB (so you could postpone the feature implementation and see if I get out of it like this).

By the way what database should I take then: Could I use a non-prototype version of the current database HSQL DB? If not, should I take MySQL or do you recommend another DB in my situation.

Marc

vvandens
Offline
Joined: 05/29/2008
Dev login module and DB

Marc,

The snapshot including the evolution of the DevelopmentLoginModule is deploying right now. I've implemented the proposed syntax except that you can use any suffix to group the users properties (even though _1, _2, ... _n is a good pattern). Beware to add the semi-column (";") only after the last user definition (I fell into the trap...).

Regarding the DB choice, it's difficult to answer, but :

  • what is your app for ?
  • status : still in the middle of the dev stage ? going to pre-production ?
  • targetted backend platform (hardware, OS) ?
  • availability constraints, e.g. do you need replication ?
  • targetted number of users ?
  • estimated size of the DB (number and volume of tables, i.e. estimated # of records per tables) ?
  • do you feel comfortable with database administration ? Do you have a DBA in your team ?

At first shot, I would say you should go on with the backend you know the best unless you have specific constraints to deal with.

 

HTH,

Vincent

Marc
Offline
Joined: 07/08/2009
[help] persistent DB

Hi,

I am still working with the in memory DB as configured by default in JSpresso. I would like to move to a persistant DB, currently for development purposes only, without a need for high volumes of data or other forms of stress tests. I guess the easiest way is just to make the HSQLDB persistent. So my first quesntion is what I should change in the configuration (I refer to the JSpresso manual section I.6.1.2) to that extent.

Just out of curiosity for the moment, I wander what databases are most used in JSpresso projects.

Thanks for your insights.

Marc

maxime
Offline
Joined: 06/23/2008
Hi Marc A added a wiki post

Hi Marc

A added a wiki post here : http://www.jspresso.org/wiki/jspresso-wiki/moving-hsql-persistent-db.
Feel free to update it if you find further details to explain !

For my own, I'm using MYSQL and ORACLE also.

Regards,

Maxime