The user has successfully authenticated, but after authentication, when I go to the next controller, I received request.getUserPrincipal()
null. I am using websphere 7 and my application is in spring mvc.
System.out.println("subject.getPrincipals(): " + subject.getPrincipals()); WSSubject.setRunAsSubject(subject);
After authentication in the input controller, subject.getPrincipals () returns the principal, but when I go to the next controller, I received request.getUserPrincipal()
null.
web.xml
<security-role> <role-name>Administrator</role-name> </security-role> <security-constraint> <display-name>manager_Service</display-name> <web-resource-collection> <web-resource-name>manageservice</web-resource-name> <url-pattern>/manageServiceList.htm</url-pattern> </web-resource-collection> <auth-constraint> <role-name>Administrator</role-name> </auth-constraint> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint>
application.xml
<security-role> <role-name>Administrator</role-name> </security-role>
IBM applications bnd.xml
<security-role name="Administrator"> <group name="Administrator" /> </security-role>
The user belongs to the Administrator group. All of my deployment descriptors are configured well. Any idea where I get the error?
source share