I think I might be missing something obvious here but I have a weblogic server setup to host my J2EE web application. As well as this I have enterprise manager setup that allows the mapping of an LDAP server to security roles for example the AD group:
g-uk-user
Might be mapped to the security role:
UKUser
I am then trying to authenticate my web application using these security roles however I can only seem to find the mapping between weblogic groups or users and roles within my application for example:
To associate a user or group with the TaskAdmins role, edit the <wls:principal-name> entry that is associated with the <wls:role-name>TaskAdmins</wls:role-name> entry. For example,<wls:security-role-assignment>
<wls:role-name>TaskAdmins</wls:role-name>
<wls:principal-name>User_or_group</wls:principal-name>
Important: You must create a new stanza for each user or group that you want to associate with the TaskAdmins role.
This concept works absolutely fine when using groups within weblogic but I don't want to map to groups I want to be able to map to security roles which I can't seem to do.
web.xml
<security-constraint>
<display-name>MySecurityConstraint</display-name>
<web-resource-collection>
<web-resource-name>SecureContent</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>PORTAL_USER</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>myrealm</realm-name>
<form-login-config>
<form-login-page>/login</form-login-page>
<form-error-page>/login?error</form-error-page>
</form-login-config>
</login-config>
<security-role>
<role-name>PORTAL_USER</role-name>
</security-role>
<security-role>
<role-name>ACT_AS</role-name>
</security-role>
<security-role>
<role-name>ADMIN</role-name>
</security-role>
weblogic.xml
<wls:security-role-assignment>
<wls:role-name>PORTAL_USER</wls:role-name>
<wls:principal-name>Admin</wls:principal-name>
<wls:security-role-assignment>
<wls:role-name>ACT_AS</wls:role-name>
<wls:principal-name>ACT_AS</wls:principal-name>
security-role
assignments in your web.xml as well? See stackoverflow.com/questions/11903739/… and stackoverflow.com/questions/23480900/… If that doesn't help, another option is to create a new group that encompasses all users that have that security role, it's not ideal but it should work – Display Name is missing