I am having this same issue. Did you ever get this working? I think you are right. It seems like a bug, or i am missing something as well.
I have been working with 5.3.1 the past few days (trying to re-platform an older cas install) and just came across this tonight.
Here are what i am seeing in my logs.
2018-07-25 00:41:52,874 DEBUG [org.apereo.cas.adaptors.trusted.web.flow.PrincipalFromRequestHeaderNonInteractiveCredentialsAction] - <Available request headers are [ <headers snipped from message>]. Locating first header value for [oam_remote_user]> (it actually finds the header i am interested in within the request)
2018-07-25 00:41:52,876 DEBUG [org.apereo.cas.adaptors.trusted.web.flow.PrincipalFromRequestHeaderNonInteractiveCredentialsAction] - <Remote user [testuser1] found in [oam_remote_user] header> (it extracts the proper user from the interesting header)
2018-07-25 00:41:52,877 DEBUG [org.apereo.cas.adaptors.trusted.web.flow.BasePrincipalFromNonInteractiveCredentialsAction] - <No user found in HttpServletRequest> (The next step could not find the use since remoteUser was blank since it was returned with no value. It seems like the proper value was in a variable name "header")
2018-07-25 00:41:52,877 WARN [org.apereo.cas.web.flow.actions.AbstractNonInteractiveCredentialsAction] - <No credentials detected. Navigating to error...>
It seems like line 60 should be changed from "return remoteUser" to "return header".
if (StringUtils.isNotBlank(this.remotePrincipalHeader)) {
final Map<String, List<String>> headers = getAllRequestHeaderValues(request);
LOGGER.debug("Available request headers are [{}]. Locating first header value for [{}]", headers, this.remotePrincipalHeader);
if (headers.containsKey(this.remotePrincipalHeader)) {
final String header = headers.get(this.remotePrincipalHeader).get(0);
LOGGER.debug("Remote user [{}] found in [{}] header", header, this.remotePrincipalHeader);
return remoteUser;
}
}
I need to work on building this from source to test. Its been a while. Anyone have any thoughts on this and whether is the right path?
Thanks,
Majeed