I can reproduce the following NPE when logging into Service A via CAS and then trying to access Service B by calling B's URL.
2019-05-10 22:50:34,980 WARN [org.apereo.cas.web.flow.resolver.impl.InitialAuthenticationAttemptWebflowEventResolver] - <null>
java.lang.NullPointerException: null
at org.apereo.cas.web.flow.resolver.impl.InitialAuthenticationAttemptWebflowEventResolver.determineRegisteredServiceForEvent(InitialAuthenticationAttemptWebflowEventResolver.java:126) ~[cas-server-core-webflow-api-5.3.10.jar:5.3.10]
at org.apereo.cas.web.flow.resolver.impl.InitialAuthenticationAttemptWebflowEventResolver.resolveInternal(InitialAuthenticationAttemptWebflowEventResolver.java:86) ~[cas-server-core-webflow-api-5.3.10.jar:5.3.10]
at org.apereo.cas.web.flow.resolver.impl.AbstractCasWebflowEventResolver.resolve(AbstractCasWebflowEventResolver.java:410) ~[cas-server-core-webflow-api-5.3.10.jar:5.3.10]
at org.apereo.cas.web.flow.resolver.impl.AbstractCasWebflowEventResolver.resolveSingle(AbstractCasWebflowEventResolver.java:415) ~[cas-server-core-webflow-api-5.3.10.jar:5.3.10]
LOGGER.debug("Enforcing access strategy policies for registered service [{}] and principal [{}]", registeredService, authn.getPrincipal());
The only thing to cause an NPE here could be authn.getPrincipal() when the authn Object is null.
So, what is wrong here?
a) should there be a check for authn == NULL or
b) is this case not supposed to happen and there is something wrong with my CAS configuration
The
error I experience may point to a problem somewhere else in CAS 5.3.10.
Before I deployed the release version I ran a snapshot version from
April 1st 2019. With that snapshot version, the error does not occur.
So,
a change made between April 1st (date of my working snapshot) and April
19th (release date) must somehow cause the malfunction.
Any clues on how to fix this would be greatly appreciated.
Regards,
Martin