[JIRA] (IDP-2084) RemoteUser authn servlet uses hardcoded checkHeaders (4.3.0b

Tero Marttila (Jira) jira at shibboleth.atlassian.net
Thu Mar 30 12:09:27 UTC 2023


Tero Marttila ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=5c642d8a911797593beaebd4 ) *created* an issue

Identity Provider ( https://shibboleth.atlassian.net/browse/IDP?atlOrigin=eyJpIjoiOWMyZjZiZTQ3MzEzNDk1MTgwMjJkOTUxODA1OWZmZWMiLCJwIjoiaiJ9 ) / Bug ( https://shibboleth.atlassian.net/browse/IDP-2084?atlOrigin=eyJpIjoiOWMyZjZiZTQ3MzEzNDk1MTgwMjJkOTUxODA1OWZmZWMiLCJwIjoiaiJ9 ) IDP-2084 ( https://shibboleth.atlassian.net/browse/IDP-2084?atlOrigin=eyJpIjoiOWMyZjZiZTQ3MzEzNDk1MTgwMjJkOTUxODA1OWZmZWMiLCJwIjoiaiJ9 ) RemoteUser authn servlet uses hardcoded checkHeaders (4.3.0b ( https://shibboleth.atlassian.net/browse/IDP-2084?atlOrigin=eyJpIjoiOWMyZjZiZTQ3MzEzNDk1MTgwMjJkOTUxODA1OWZmZWMiLCJwIjoiaiJ9 )

Issue Type: Bug Affects Versions: 4.3.0 Assignee: Unassigned Created: 30/Mar/23 8:09 AM Priority: Trivial Reporter: Tero Marttila ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=5c642d8a911797593beaebd4 )

The Shbiboleth IDP 4.3.0 release ships git commit 6d3b4b94185f98d1ecf58cb412af11836d445948 with the following diff to idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/RemoteUserAuthServlet.java :

--- a/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/RemoteUserAuthServlet.java
+++ b/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/RemoteUserAuthServlet.java
@@ -188,7 +188,8 @@ public class RemoteUserAuthServlet extends HttpServlet {
            }
        }

-        param = config.getInitParameter(CHECK_HEADERS_PARAM);
+        //param = config.getInitParameter(CHECK_HEADERS_PARAM);
+        param = "ShibbolethUser";
        if (param != null) {
            final String[] headers = param.split(" ");
            if (headers != null) {

This means that the RemoteUser ( https://shibboleth.atlassian.net/wiki/spaces/IDP4/pages/1265631618/RemoteUserAuthnConfiguration ) authn configuration no longer respects the servlet init-params configured in web.xml , e.g.:

   <!-- Servlet protected by container used for RemoteUser authentication -->
   <servlet>
       <servlet-name>RemoteUserAuthHandler</servlet-name>
       <servlet-class>net.shibboleth.idp.authn.impl.RemoteUserAuthServlet</servlet-class>
       <load-on-startup>2</load-on-startup>
       <init-param>
         <param-name>checkHeaders</param-name>
         <param-value>X-Forwarded-User</param-value>
       </init-param>
   </servlet>
   <servlet-mapping>
       <servlet-name>RemoteUserAuthHandler</servlet-name>
       <url-pattern>/Authn/RemoteUser</url-pattern>
   </servlet-mapping>

This can be observed in the INFO logs at boot:

2023-03-30 11:00:00,713 -  - INFO [net.shibboleth.idp.authn.impl.RemoteUserAuthServlet:215] - RemoteUserAuthServlet will process REMOTE_USER, along with attributes [] and headers [ShibbolethUser]

This is a regression in 4.2.0 → 4.3.0 that breaks RemoteUser authentication flows using HTTP request header based authentication.

This may have security implications, because the default RemoteUser authn configuration now consumes trusted authentication information from a previously unused HTTP request header, which is probably not filtered out and may contain untrusted data supplied by an attacker.

( https://shibboleth.atlassian.net/browse/IDP-2084#add-comment?atlOrigin=eyJpIjoiOWMyZjZiZTQ3MzEzNDk1MTgwMjJkOTUxODA1OWZmZWMiLCJwIjoiaiJ9 ) Add Comment ( https://shibboleth.atlassian.net/browse/IDP-2084#add-comment?atlOrigin=eyJpIjoiOWMyZjZiZTQ3MzEzNDk1MTgwMjJkOTUxODA1OWZmZWMiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100219- sha1:6a6077b )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/commits/attachments/20230330/47ad4eae/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-comment-icon-8773f187-3672-473e-ad92-61b49fa9f02f
Type: image/png
Size: 1084 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230330/47ad4eae/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-trivial-8a9ac724-fed8-4120-a637-66c144e2342d
Type: image/png
Size: 446 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230330/47ad4eae/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-avatar-1aaf06e2-24d1-48bf-89ce-e0722056783c
Type: image/png
Size: 345 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230330/47ad4eae/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-footer-desktop-logo-54902ed1-dc01-447a-865d-729ec85990c7
Type: image/png
Size: 10805 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230330/47ad4eae/attachment-0007.png>


More information about the commits mailing list