[ 
https://issues.apache.org/jira/browse/KNOX-3343?focusedWorklogId=1024431&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1024431
 ]

ASF GitHub Bot logged work on KNOX-3343:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Jun/26 08:26
            Start Date: 10/Jun/26 08:26
    Worklog Time Spent: 10m 
      Work Description: smolnar82 opened a new pull request, #1254:
URL: https://github.com/apache/knox/pull/1254

   [KNOX-3343](https://issues.apache.org/jira/browse/KNOX-3343) - NPE in RAP, 
when cache key header is custom and not propagated in the request
   
   ## What changes were proposed in this pull request?
   
   Fixed an issue where the incoming request doesn't contain anything in the 
cache key header (`Authorization` by default). When that happened -> 
`hashCacheKey` thew a NPE (see the referenced JIRA).
   
   ## How was this patch tested?
   
   Added a new unit test that covers thi case (refactored existing helper 
methods to satisfy the verification of this new case).
   
   ## Integration Tests
   The driver of this change was that I saw these errors while running 
Docker-based integration tests locally, so I re-ran them with the fix. No NPE 
was thrown:
   ```
   
   ```
   
   ## UI changes
   N/A




Issue Time Tracking
-------------------

            Worklog Id:     (was: 1024431)
    Remaining Estimate: 0h
            Time Spent: 10m

> NPE in RemoteAuthFilter
> -----------------------
>
>                 Key: KNOX-3343
>                 URL: https://issues.apache.org/jira/browse/KNOX-3343
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 3.0.0
>            Reporter: Sandor Molnar
>            Assignee: Sandor Molnar
>            Priority: Major
>             Fix For: 3.0.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Checking the Docker-based integration test logs, I found the following stack 
> trace re-occurring:
> {code:java}
> Caused by: java.lang.NullPointerException: Cannot invoke "String.hashCode()" 
> because "key" is null
>     at 
> org.apache.knox.gateway.filter.RemoteAuthFilter.hashCacheKey(RemoteAuthFilter.java:364)
>  ~[gateway-provider-security-authc-remote-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>     at 
> org.apache.knox.gateway.filter.RemoteAuthFilter.doFilter(RemoteAuthFilter.java:225)
>  ~[gateway-provider-security-authc-remote-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>     at 
> org.apache.knox.gateway.GatewayFilter$Holder.doFilter(GatewayFilter.java:391) 
> ~[gateway-server-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>     at 
> org.apache.knox.gateway.GatewayFilter$Chain.doFilter(GatewayFilter.java:305) 
> ~[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}
> This needs to be fixed.



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

Reply via email to