URLCallback from JAAS to WAS?
I extended the JAAS javax.security.auth.spi.LoginModule and installed it on a WAS server. It works; all logins go through the code of this new class, and if it says it won't let them log in, they are not allowed to log in.
Root issue: I don't want it to filter logins for the admin console (/ ibm / console), but I want it to filter logins for other things on the server. I think that with the customization available, the registration module applies to everything that is installed on the server, including the administration screens.
I would like to solve this by getting the url of the page that caused the call in the LoginModule. If I was using WebLogic I would use URLCallback to get the url. Does anyone know if Websphere Application Server has any parallel functionality or if there is another workaround?
As a potentially useful added information, I cannot apply JAAS for individual applications on the server; deployment descriptors are grayed out in the admin console. I can only apply the new JAAS JAR modules for the whole server, which is a problem for me.
source to share
Weblogic does this with weblogic.security.auth.callback.URLCallback, WAS does it through WSServletRequestCallback.
callbacks[0] = new com.ibm.wsspi.security.auth.callback.WSServletRequestCallback(
"HttpServletRequest: ");
(load callbacks)
HttpServletRequest request = ((WSServletRequestCallback)callbacks[3]).getHttpServletRequest();
String contextPath = request.getContextPath();
Go from there.
source to share