App needs to take advantage of the Web security components in the Servlet container (facilitates Single Sign on in a way JRuby can't in this environment).
Like to have access the the request.getUserPrincipal and request.isUserInRole(String) methods.
Ruby returns nil and false respectively regardless of the fact that the servlet container has authenticated user.
Web.xml fragment:
<security-constraint>
<display-name>The application</display-name>
<web-resource-collection>
<web-resource-name>The Application</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>view</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>CLIENT-CERT</auth-method>
</login-config>
<security-role>
<description>viewer</description>
<role-name>view</role-name>
</security-role>
Code Fragment in view
<%= h $java_servlet_request.userPrincipal.inspect %> <br/>
<%= h $java_servlet_request.remoteUser.inspect %> <br/>
Both return the string 'nil' of course