You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Attila Magyar (Jira)" <ji...@apache.org> on 2021/08/30 10:16:00 UTC

[jira] [Created] (KNOX-2651) NPE when token value is missing

Attila Magyar created KNOX-2651:
-----------------------------------

             Summary: NPE when token value is missing
                 Key: KNOX-2651
                 URL: https://issues.apache.org/jira/browse/KNOX-2651
             Project: Apache Knox
          Issue Type: Task
            Reporter: Attila Magyar
            Assignee: Attila Magyar


This happens when one accidentally puts a space between the user and password.
{code:java}
$ curl -vvv -iku Token: xxxxxxx https://localhost:8443/gateway/sandbox/webhdfs/v1/?op=LISTSTATUS {code}
 
{code:java}
Caused by: java.lang.NullPointerException
    at com.nimbusds.jose.JOSEObject.split(JOSEObject.java:214)
    at com.nimbusds.jwt.SignedJWT.parse(SignedJWT.java:110)
    at org.apache.knox.gateway.services.security.token.impl.JWTToken.<init>(JWTToken.java:55)
    at org.apache.knox.gateway.provider.federation.jwt.filter.JWTFederationFilter.doFilter(JWTFederationFilter.java:135)
    at org.apache.knox.gateway.GatewayFilter$Holder.doFilter(GatewayFilter.java:348)
    at org.apache.knox.gateway.GatewayFilter$Chain.doFilter(GatewayFilter.java:262)
    at org.apache.knox.gateway.filter.XForwardedHeaderFilter.doFilter(XForwardedHeaderFilter.java:50)
    at org.apache.knox.gateway.filter.AbstractGatewayFilter.doFilter(AbstractGatewayFilter.java:58)
    ... 54 more {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)