I'm attempting to implement an authentication mechanism in a web app, which I'm deploying on a WebLogic 12c instance. I want to restrict access to certain pages to only authenticated users.
My problem is in figuring out how to define the auth-constraint of my security portion to do this. This is the security portion of my web.xml:
<security-constraint>
<web-resource-collection>
<web-resource-name>secure</web-resource-name>
<url-pattern>/secure/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>user</role-name>
</auth-constraint>
</security-constraint>
<security-role>
<description>Any User</description>
<role-name>user</role-name>
</security-role>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>myrealm</realm-name>
<form-login-config>
<form-login-page>/login.html</form-login-page>
<form-error-page>/auth_error.html</form-error-page>
</form-login-config>
</login-config>
Right now, authentication works properly, but I get a 403 - Forbidden when I try to access any of the secure pages, and I'm fairly certain that this is because I don't have any users mapped to the "user" role. I've already tried specifying the wildcard (*) for role names, and that didn't work.
I'd prefer to not have to configure any mappings on the WebLogic side. WebLogic documentation specifies that there is a special "Authenticated Role" that is automatically given to any user who authenticates (see http://docs.oracle.com/cd/E14571_01/core.1111/e10043/introroles.htm#CJAGGDCA)
That documentation is for 11g - is the same role available in 12c? If so, can I reference it in my web.xml to grant access to any authenticated user? What would its role-name be?