Question

I've defined "security roles" in the web.xml of my Java web-based application built on the Spring MVC framework. I deploy my war to WebSphere 8.0. I navigate to the "Security role to user/group mapping" screen within the "WebSphere Admin Console" and complete additional configuration of mapping what LDAP groups go with each web-application role and save the information in the WebSphere console.

How do I know what role(s) a logged on user belongs too at runtime? Can I interact w/WebSphere via WebSphere APIs to get this information at runtime, since it's not known till runtime what end-user is logged into the application?

Any direction, examples or advice is appreciated

Was it helpful?

Solution

If you are looking for security roles, you may have a look at isUserInRole method from HttpServletRequest. If you are looking for LDAP groups that were mapped to these roles, I think you'd better request directly LDAP.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top