Sandeep More created KNOX-3230:
----------------------------------

             Summary: Knox throws NPE in RemoteAuthProvider when 
remote.auth.expire.after is missing
                 Key: KNOX-3230
                 URL: https://issues.apache.org/jira/browse/KNOX-3230
             Project: Apache Knox
          Issue Type: Bug
          Components: Server
            Reporter: Sandeep More


While adding integration tests for RAP, i discovered that when 
`remote.auth.expire.after` is missing Knox throws the following exception
{code:java}
Caused by: java.lang.NullPointerException: Cannot invoke 
"com.google.common.cache.Cache.getIfPresent(Object)" because 
"this.authenticationCache" is null    at 
org.apache.knox.gateway.filter.RemoteAuthFilter.doFilter(RemoteAuthFilter.java:222)
 ~[gateway-provider-security-authc-remote-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]    
at 
org.apache.knox.gateway.GatewayFilter$Holder.doFilter(GatewayFilter.java:392) 
~[gateway-server-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]    at 
org.apache.knox.gateway.GatewayFilter$Chain.doFilter(GatewayFilter.java:306) 
~[gateway-server-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]    at 
org.apache.knox.gateway.filter.XForwardedHeaderFilter.doFilter(XForwardedHeaderFilter.java:50)
 ~[gateway-server-xforwarded-filter-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]    at 
org.apache.knox.gateway.filter.AbstractGatewayFilter.doFilter(AbstractGatewayFilter.java:59)
 ~[gateway-spi-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT] {code}
Adding 
{code:java}
<param>                                                                         
                    <name>remote.auth.expire.after</name>                       
                                             <value>5</value>                   
                                                                                
                                                                    </param> 
{code}
Fixes the issue.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to