Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] CAS Authentication Help

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] CAS Authentication Help


Chronological Thread 
  • From: "Hyzer, Chris" <>
  • To: Grouper Users <>, Jonathan Keller <>
  • Subject: Re: [grouper-users] CAS Authentication Help
  • Date: Tue, 1 Sep 2020 19:57:50 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=isc.upenn.edu; dmarc=pass action=none header.from=isc.upenn.edu; dkim=pass header.d=isc.upenn.edu; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6BRRIV8p3Mxxh31HoZrRmDp5orsfh11MB3BD35nTZN4=; b=dp1rEATPo1L3oL9Xp4y+zfbOBv+VNlyAAfWeWG3lYO1sSROJQ1Z0vO56gLrhVB7dl76XdqGH+WuN+/cjQvF1y+TToPi1PgPYhxdMSLtlYAiveYYoz22fki1KjianGgEKAu2h5jw26J17u9GwlJLCjOmRnDmtqy4/2LtOGXqMsJ9/p4lQ241YXUCXVHYckNBWMbNoDXoC2VjlIg+G5N62MQA9MjVE9YgRgpG+7zhnREGhpCtBrEj3dXMfr/IP7CuhLFhcJ50YD6igQP+VOZNeTlE5lvEgWRCV3ZCZYPGohSKX/ClRzQtaYVVdk5+obRTHZ9P2+SZ0mzRJKajdK57pHA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LKaqXvCclhOPFITu26JC+FByOUa0VK0Eeec24ULkWpR9yiVB4uRNmf3LHhiY6ImsUl+1qW9I8tHRvvxWHujrG2FivTWYFkiC0n3nwEIO4vxO5/yu7SfbvBUktQRsOITHu5I4koriRLoia15MrKF/XzubUu1D0kNvpM5Fo7OdLllDd/FbOyHCwzN90brp/DTzQb4zKatSrseyoOB4sRbsQCVnbx2qJo2fTNfE71OX/m9Q5PqCGV9O81eJAom+udF2rCxr0Ln5H22hvTaCE94iJMuSeeYTuiXF3zP5mTLOMu+/oe3PLwO/YAiRQO6aB44gz0N5XNClO0qsj/qju02Ozw==

do you have access to the grouper wiki to edit the CAS page for grouper with more specifics on the getting mod_auth_cas working?  🙂  If you are on slack, ping me and we can coordinate .  Thanks!

From: <> on behalf of Jonathan Keller <>
Sent: Tuesday, September 1, 2020 3:51 PM
To: Grouper Users <>
Subject: Re: [grouper-users] CAS Authentication Help
 
Just following up on my earlier email.

TL;DR - never got web.xml AuthN working - fell back to mod_auth_cas in the Apache server which did work.

Writing up my findings for others on the authN issue with the 2.5+ containers:

First, the web.xml version seems to be broken.  The changes to the container whereas the servlet config is driven by the file:

/opt/grouper/grouperWebapp/WEB-INF/classes/META-INF/services/javax.servlet.ServletContainerInitializer 

and the https://github.com/Internet2/grouper/blob/master/grouper/src/grouper/edu/internet2/middleware/grouper/j2ee/CommonServletContainerInitializer.java  class it points to results in the filters which you would add in web.xml being processed after the other components of the system, so the user ID is not available at the time the grouper components are reading the HTTP request headers.

I also could not get the Tomcat Valve method to work.  I am not sure why.  I installed the valve as documented and added the login-config and security-constraints to the web.xml, but the redirect to the CAS server would never happen.  (I've never used Tomcat AuthN via Valves before - so I'm assuming I just missed something here.)

I DID finally get CAS AuthN working by installing mod_auth_cas into the container via yum and then pushing in the configuration it via grouperScriptHooks_setupFilesPost() so that I could limit it to the UI server container.  (We do have Shib at UCD, but was not ready to attempt that setup at the current stage.)

--
Jonathan Keller
Application Architect - Administrative IT


On Aug 28, 2020, at 2:49 PM, Jonathan Keller <> wrote:

I'm hoping this is a quick question for someone.  I am trying to get our local campus CAS authentication integrated with the Grouper UI.  I've been following the setup instructions here:


And using the Tomcat web.xml version of the setup.

I have the redirect working, and the CAS servers are redirecting back.  Debug logging shows that the ticket validation is working - I can see my user ID coming back in the XML response from our servers.

However, the resulting user ID does not seem to be getting extracted into the servlet request by the HttpServletRequestWrapperFilter.  I've checked the code of that class, and it attempting to extract the assertion into the getRemoteUser() method of the request, which the above documentation says will be used by the Grouper UI.  However, I'm getting the (dreaded?) 

"You have an anonymous session since you are not logged in,..." message.

Given what I am seeing, it would appear that either the filter is not running, or is not instrumenting the servlet request which is executing the UI.  I'm hoping there is just some additional configuration that I'm missing.  My setup is pretty much like the documentation except for using these for the init params:

<init-param>
<param-name>casServerUrlPrefix</param-name>
<param-value>https://${casHost}/cas</param-value>
</init-param>
<init-param>
<param-name>service</param-name>
<param-value>${serverName}/grouper/</param-value>
</init-param>

I also upgraded to the Cas30ProxyReceivingTicketValidationFilter - but the problem existed with the 2.0 proxy as well.

Any help would be appreciated.

Thanks.

--
Jonathan Keller
Application Architect - Administrative IT

<image001.png>





Archive powered by MHonArc 2.6.19.

Top of Page