[ 
https://issues.apache.org/jira/browse/KNOX-2150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16998740#comment-16998740
 ] 

Kevin Risden commented on KNOX-2150:
------------------------------------

So just out of curiosity have you tried different forms of quoting or escaping 
the space?

Some examples:

*Single quote around value*
{code:java}
beeline -u 
"jdbc:hive2://localhost:8443/;ssl=true;AllowSelfSignedCerts=1;AllowAllHostNames=1;sslTrustStore=/Users/abc/knox/install/knox-1.3.0/data/security/keystores/gateway.jks;;AuthMech=0;trustStorePassword=knox;transportMode=http;httpPath=gateway/tokenbased/hive;http.header.Authorization='Bearer
 eyJraWQiOiJp...df'"
{code}

URL encode space

{code:java}
beeline -u 
"jdbc:hive2://localhost:8443/;ssl=true;AllowSelfSignedCerts=1;AllowAllHostNames=1;sslTrustStore=/Users/abc/knox/install/knox-1.3.0/data/security/keystores/gateway.jks;;AuthMech=0;trustStorePassword=knox;transportMode=http;httpPath=gateway/tokenbased/hive;http.header.Authorization=Bearer%20eyJraWQiOiJp...df"
{code}


At least from a quick glance at the code, doesn't look like anything stopping 
the space from getting there:

* 
https://github.com/apache/hive/blob/master/jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java#L248
* 
https://github.com/apache/hive/blob/master/jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java#L258
* 
https://github.com/apache/hive/blob/master/jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java#L489

It might be something in the above, I just did a quick sweep.



> Unable to submit Hive jobs using  Knox JWTProvider
> --------------------------------------------------
>
>                 Key: KNOX-2150
>                 URL: https://issues.apache.org/jira/browse/KNOX-2150
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: KnoxSSO
>            Reporter: Neeraj Verma
>            Priority: Major
>
> While trying to submit Hive Job over JDBC with JWTProvider  ,  I faced 2 
> issues
>  # Space not supported between "{{Bearer ey.."}}
>  # {{if we remove space then http }}{{Authorization}} header is overwritten 
> by default Basic token .
>  
> {{beeline -u 
> "jdbc:hive2://localhost:8443/;ssl=true;AllowSelfSignedCerts=1;AllowAllHostNames=1;sslTrustStore=/Users/abc/knox/install/knox-1.3.0/data/security/keystores/gateway.jks;;AuthMech=0;trustStorePassword=knox;transportMode=http;httpPath=gateway/tokenbased/hive;http.header.Authorization=Bearer
>  eyJraWQiOiJp...df"}}
>  
>  



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

Reply via email to