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 
<https://github.com/apereo/cas/blob/8c97a6a1556337a6c8f58b943ff81baeb3ca01f4/core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/resolver/impl/InitialAuthenticationAttemptWebflowEventResolver.java#L126>:
 


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

Regards,

Martin

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/8f69c112-1ac9-43ae-81b7-3a6ffdd0d9d4%40apereo.org.

Reply via email to