The Shibboleth IdP V4 software has reached its End of Life and is no longer supported. This documentation is available for historical purposes only. See the IDP5 wiki space for current documentation on the supported version.
RemoteUserAuthnConfiguration
Current File(s): conf/authn/remoteuser-authn-config.xml, (edit-)webapp/WEB-INF/web.xml, conf/authn/authn.properties (V4.1+)
Format: Native Spring, Properties (V4.1+)
Overview
The authn/RemoteUser login flow relies on whatever container-based mechanism you have available (HTTP BASIC auth, LDAP, Kerberos, other SSO systems, etc.). By default, this flow is configured without support for advanced authentication controls like passive or forced authentication. In most cases, implementing support for those features in conjunction with other SSO systems should be done with the External flow.
This flow is actually implemented as a special case of the External flow that happens to use a supplied servlet to implement the External contract that supports extraction of the identity from the request. Rather than customizing this flow, use the External flow itself if you need to do other things instead of or in addition to this behavior.
Enabling Module (V4.1+)
For V4.1+, configuring and using this feature requires that you first enable the "idp.authn.RemoteUser" module if it isn't already enabled. Systems upgraded from older releases generally come pre-enabled due to the prior state of the configuration tree.
(Windows)
C:\opt\shibboleth-idp> bin\module.bat -t idp.authn.RemoteUser || bin\module.bat -e idp.authn.RemoteUser
(Other)
$ bin/module.sh -t idp.authn.RemoteUser || bin/module.sh -e idp.authn.RemoteUser
General Configuration
If you need to support multiple external paths, you can supply a bean of type Function<ProfileRequestContext,String> with the name shibboleth.authn.RemoteUser.externalAuthnPathStrategy
The shibboleth.authn.RemoteUser.ClassifiedMessageMap bean is a map of error messages to classified error conditions that isn't often used with this handler because it generally won't return with any contextual details that you can make use of. If this comes into play, the External flow is probably what you're meant to use. One typical need is to map specific events to the "ReselectFlow" event in order to allow the IdP to "fall-through" to other methods.
The servlet that implements the authentication for this flow is configured in webapp/WEB-INF/web.xml and can be given parameters that extend it to support arbitrary headers or request attributes instead of or in addition to the REMOTE_USER reserved CGI variable (the identity of the requester as established by the web server / container, which Java exposes in the Servlet API with the getRemoteUser
method). By default, it supports only the "real" REMOTE_USER value exposed via that API (this does not include headers named to emulate it, a very poor practice due to the potential for confusion).
As always, when editing this file, make sure to copy it to edit-webapp/WEB-INF/web.xml first and make any changes to that copy.
The following servlet init parameters are supported:
checkRemoteUser (true or false)
whether to look for a principal name in REMOTE_USER
checkAttributes (list of space-delimited request attribute names)
servlet request attribute(s) to search for a principal name, instead of or in addition to REMOTE_USER
checkHeaders (list of space-delimited request header names)
servlet request header(s) to search for a principal name, instead of or in addition to REMOTE_USER
subjectAttribute (name of request attribute)
single request attribute to check for a Java Subject to use for the authentication result
authnMethodHeader (name of request header)
request header(s) to check for "method" strings to attach to Java subject as custom principals
authnAuthorityHeader (name of request header) (V3.4+)
request header(s) to check for URIs to attach to Java subject as proxied authenticating authorities
The algorithm of the servlet is roughly:
If subjectAttribute is set, check it for a Java Subject to use. If found, it will be returned through the External Authentication interface and all the other settings are ignored.
Otherwise, check for a principal name as directed by the settings, in REMOTE_USER, attributes, and headers (in that order). If not found, authentication fails.
If authnMethodHeader is set, check each value to see if the associated login flow supports a custom Principal matching the value in the header, and if so, attach that Principal to the Subject returned through the External Authentication interface. Note that if the header contains a value not supported by the associated login flow, it will be logged, but otherwise not impact the success of this flow. By the time this feature is executing, it's already a given that the result was successful.
If you need something different from this, your best option is to use the External login flow and possibly adapt the existing servlet as an example to copy from for your own purposes. In all respects, this flow is simply a more concrete use of the External flow.
Reference
Notes
This flow is configured by default without support for non-browser profiles (namely ECP) because the RemoteUserInternal flow is a better choice for container-based authentication when a browser isn't required. It eliminates the extra redirects used by this flow. If your clients can handle the redirects and you prefer to use this flow, you can (V4.0) change or remove the nonBrowserSupported
bean property set on the flow in authn/general-authn.xml, or (V4.1+) set the idp.authn.RemoteUser.nonBrowserSupported property in authn/authn.properties.