WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Database authentication on WAS 7

    Posted 12/28/11 10:53 PM
    Guys, has someone set up an application on WAS 7 to authenticate users from a database? 

    I've been reading the docs and I'm surprised how hard it is to find out a solution... On JBoss we just need to add some lines to login-config.xml and it's done! 

    So far, my options seem to be: 
    - to implement com.ibm.websphere.security.UserRegistry; 
    - to implement LoginModule (JAAS); 
    - to leave behind the security provided by the server (!) and implement it programmaticaly (checking info in session...); 

    Any suggestions?


  • 2.  Database authentication on WAS 7

    Posted 12/29/11 01:09 PM
    Do u want to setup datasource/J2C authentication?


  • 3.  Database authentication on WAS 7

    Posted 12/29/11 01:17 PM
    Alexandre,

    You got it right. One has to go through all these steps to set it up. WAS choice for user registry is LDAP, rather than database. I believe that somewhere in the WAS installation there is an authentication module for database ready, but it is provided as a sample, an example of a module, and it is not supported by IBM for production environements (as far as I recall).

    Cheers,
    Alexei 


  • 4.  Database authentication on WAS 7

    Posted 12/29/11 01:28 PM
    If you want to use database, first u need to configure jdbc providers (XA or NON-XA), then configure datasource. It is advisable to configure it at CELL level as all resources(NODE/CLUSTER/JVM) can access to it. Once you configured these steps, go to datasource-> JAAS - J2C authentication data, here u need to provide username/password to access database.


  • 5.  Database authentication on WAS 7

    Posted 12/29/11 01:48 PM
    Actually, I believe you need only to implement com.ibm.websphere.security.UserRegistry, and you can use the existing capabilities for JAAS. The "user registry" is loosely coupled from the rest. That's the idea of having a UserRegistry class to implement it.