Search code examples
securityauthenticationwebspherejaas

Websphere Application Login


I was trying to register an Application Login Module in Websphere but I don´t find any easy example in web.

There are a lot of IBM documents, but too much complex, and I can´t figure out how to register an Application Login Module.

I already have success with a System Login Module bounded to WEB_INBOUND, it works, but affects all my system. I want a Login Module to serve only my applications web, with JAAS authentication.

I´ve tried to bound a login module to existing WSLogin but it doesn´t seems to be working.

Any help ?

tks[]


Solution

  • You need to setup security domains to get the separation you are looking for wrt to the login configurations. The security framework uses the WEB_INBOUND login configuration to authenticate the user for all web applications irrespective of adminConsole or user applications. When you create a security domain and customize the WEB_INBOUND configuration at the server/cluster domain level, it will be used for all the user web applications deployed in those processes. You need to setup the multidomain in a cell topology and assign the domain to the server/cluster where you applications are deployed.

    Once you setup the domains, the WEB_INBOUND configuration at the server/cluster domain will be used by the user applications hosted in that server/cluster while the WEB_INBOUND configuration at the admin/global domain will be used for the adminConsole application at the Deploymener Management process where it is deployed.

    The application JAAS login configurations are meant to be used by the applications directly. One can create an application login configuration and programmatically use it in the application to perform direct login - LoginContext lc = new LoginContext("myAppLoginCfg1", callBackHandler);