NullPointerException in InitialAuthenticationAttemptWebflowEventResolver.java in CAS 5.3.10

27 views
Skip to first unread message

Martin Böhmer

unread,
May 11, 2019, 9:12:27 AM5/11/19
to CAS Community
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]

The NPE refers to this line:

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

Ray Bon

unread,
May 13, 2019, 10:52:34 AM5/13/19
to cas-...@apereo.org
Martin,

Looking on github, the current 5.3.x version id 5.3.9 from 04 March.

Ray
-- 
Ray Bon
Programmer Analyst
Development Services, University Systems

Martin Böhmer

unread,
May 27, 2019, 3:16:22 PM5/27/19
to CAS Community
Ray, all,

the current 5.3.x release is 5.3.10 from 19th April, see https://github.com/apereo/cas/releases/tag/v5.3.10

I still haven't got any further working around this NPE. So, hints are appreciated.

Cheers,

Martin
Reply all
Reply to author
Forward
0 new messages