<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: How to use Knox to securely access HBase through ODBC then Phoenix Query Server? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-Knox-to-securely-access-HBase-through-ODBC-then/m-p/172706#M54304</link>
    <description>&lt;P&gt;Thank you Josh for looking into this.  It would be convenient if Knox can have a configuration switch that would preserve the http body regardless of the content-type of incoming requests, as a proxy server essentially.  Please open a JIRA issue if you think it is a good feature. &lt;/P&gt;&lt;P&gt;Thank you very much for your help of looking into the ODBC driver issue.  Hopefully the fix can come out soon. &lt;/P&gt;</description>
    <pubDate>Thu, 16 Feb 2017 03:18:13 GMT</pubDate>
    <dc:creator>hong_yu</dc:creator>
    <dc:date>2017-02-16T03:18:13Z</dc:date>
    <item>
      <title>How to use Knox to securely access HBase through ODBC then Phoenix Query Server?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-Knox-to-securely-access-HBase-through-ODBC-then/m-p/172700#M54298</link>
      <description>&lt;P&gt;We have HDP 2.5.3 deployed on
RedHat Linux with Phoenix Query Server (PQS) in front of Phoenix+HBase.  Our
plan is to use ODBC on Windows Server through Phoenix Query Server to access
HBase.  &lt;/P&gt;&lt;P&gt;Since we do NOT plan to use Kerberos yet, we plan to use Knox as the secure server to proxy the data flow, as the diagram below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="12410-odbcknoxphoenix.png" style="width: 1153px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19993i5CB55ADB8BA5F08F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="12410-odbcknoxphoenix.png" alt="12410-odbcknoxphoenix.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;We set up the Knox for PQS as described here, &lt;A href="http://knox.apache.org/books/knox-0-11-0/user-guide.html#Avatica" target="_blank" rel="nofollow noopener noreferrer"&gt;http://knox.apache.org/books/knox-0-11-0/user-guide.html#Avatica&lt;/A&gt;.  Even though this user guide is for Knox 0.11 and HDP 2.5.3 uses Knox 0.9, according to &lt;A rel="user" href="https://community.cloudera.com/users/223/jelser.html" nodeid="223" target="_blank"&gt;@Josh Elser&lt;/A&gt;  fix for &lt;A href="https://issues.apache.org/jira/browse/KNOX-844" target="_blank" rel="nofollow noopener noreferrer"&gt;https://issues.apache.org/jira/browse/KNOX-844&lt;/A&gt;, it should work for earlier Knox.&lt;/P&gt;&lt;P&gt;The setup does work in our system.  The traffic from ODBC hit PQS successfully.   However, there is a problem, the PQS failed to parse the request because the http request coming out of ODBC is not urlencoded, but the content is urlencoded after Knox.&lt;/P&gt;&lt;P&gt;After tracing all the calls, it seems that it is caused by ODBC driver sending out Avatica Http request with content-type set to "application/x-www-form-urlencoded”, even though the content is NOT urlencoded at all.  But, when the request passes through Knox, it comes out as urlencoded.  The PQS seems not able to parse urlencoded content.  It seems to take the input as it is.&lt;/P&gt;&lt;P&gt;In comparison, the jdbc thin driver sends out http request with content-type “application/octet-stream”, which seems to be more appropriate. &lt;/P&gt;&lt;P&gt;Question: &lt;/P&gt;&lt;P&gt;Is there any way to change the content type of ODBC driver to use content type “application/octet-stream” instead?  Or is there anyway to tell Knox server not to urlencode the content even though the content type is "application/x-www-form-urlencoded”? Do prefer the first approach.
&lt;/P&gt;&lt;P&gt;We also need help on the following questions to use Ranger control: &lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;How
can Knox pass the authenticated user to PQS along with the proxy-ed HTTP
request?&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;
&lt;LI&gt;Then How
can PQS impersonate as the authenticated user to call HBase so that Ranger can
control the access by that user?  Since PQS runs as "hbase" and it calls PQS as "hbase", ranger control cannot be used.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Thanks for any help!&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 10:32:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-Knox-to-securely-access-HBase-through-ODBC-then/m-p/172700#M54298</guid>
      <dc:creator>hong_yu</dc:creator>
      <dc:date>2019-08-18T10:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Knox to securely access HBase through ODBC then Phoenix Query Server?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-Knox-to-securely-access-HBase-through-ODBC-then/m-p/172701#M54299</link>
      <description>&lt;P&gt;"After tracing all the calls, it seems that it is caused by ODBC 
driver sending out Avatica Http request with content-type set to 
"application/x-www-form-urlencoded”, even though the content is NOT 
urlencoded at all. But, when the request passes through Knox, it comes 
out as urlencoded. The PQS seems not able to parse urlencoded content. 
It seems to take the input as it is."&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;This sounds like a bug in the ODBC driver. I'll have to see what I can find...&lt;/P&gt;&lt;P&gt;"Then How can PQS impersonate as the authenticated user to call 
HBase so that Ranger can control the access by that user? Since PQS runs
 as "hbase" and it calls PQS as "hbase", ranger control cannot be used."&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;This is a factor of impersonation from PQS to HBase (really, Phoenix) only being configured when Kerberos authentication is enabled. My answer to your other question on &lt;A href="https://community.hortonworks.com/questions/83203/how-to-access-hbase-through-odbc-then-phoenix-quer.html" target="_blank"&gt;https://community.hortonworks.com/questions/83203/how-to-access-hbase-through-odbc-then-phoenix-quer.html&lt;/A&gt; already covered this.&lt;/P&gt;&lt;P&gt;"How can Knox pass the authenticated user to PQS along with the proxy-ed HTTP request?"&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;There is some on-going work which would help enable this in Avatica &lt;A href="https://issues.apache.org/jira/browse/CALCITE-1539" target="_blank"&gt;https://issues.apache.org/jira/browse/CALCITE-1539&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 00:18:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-Knox-to-securely-access-HBase-through-ODBC-then/m-p/172701#M54299</guid>
      <dc:creator>elserj</dc:creator>
      <dc:date>2017-02-14T00:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Knox to securely access HBase through ODBC then Phoenix Query Server?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-Knox-to-securely-access-HBase-through-ODBC-then/m-p/172702#M54300</link>
      <description>&lt;P&gt;Thank you Josh. Please let us know whether the ODBC problem can be solved.  We can live with the rest if the ODBC to Knox to PQS is working.  Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 00:28:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-Knox-to-securely-access-HBase-through-ODBC-then/m-p/172702#M54300</guid>
      <dc:creator>hong_yu</dc:creator>
      <dc:date>2017-02-14T00:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Knox to securely access HBase through ODBC then Phoenix Query Server?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-Knox-to-securely-access-HBase-through-ODBC-then/m-p/172703#M54301</link>
      <description>&lt;P&gt;Hi Josh, is there any way to setup Knox server to not urlencode (or change) the http body regardless of the content-type when http requests pass through it?  &lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 22:21:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-Knox-to-securely-access-HBase-through-ODBC-then/m-p/172703#M54301</guid>
      <dc:creator>hong_yu</dc:creator>
      <dc:date>2017-02-15T22:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Knox to securely access HBase through ODBC then Phoenix Query Server?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-Knox-to-securely-access-HBase-through-ODBC-then/m-p/172704#M54302</link>
      <description>&lt;P&gt;
	Not sure, Hong, but I'm also a Knox newbie. Let me see if I can find someone with more expertise &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 00:04:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-Knox-to-securely-access-HBase-through-ODBC-then/m-p/172704#M54302</guid>
      <dc:creator>elserj</dc:creator>
      <dc:date>2017-02-16T00:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Knox to securely access HBase through ODBC then Phoenix Query Server?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-Knox-to-securely-access-HBase-through-ODBC-then/m-p/172705#M54303</link>
      <description>&lt;P&gt;It sounds like this is presently not possible to disable this re-encoding. The thought is that other services actually require this to be done. If you'd like, please feel free to create a JIRA issue in the KNOX project at Apache (or I can do that). We can try to come up with an improvement for Knox in the future to prevent this problem for other services.&lt;/P&gt;&lt;P&gt;I'm also in talks with the ODBC devs who said that they can likely fix the driver to address this issue at the source as well.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 02:41:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-Knox-to-securely-access-HBase-through-ODBC-then/m-p/172705#M54303</guid>
      <dc:creator>elserj</dc:creator>
      <dc:date>2017-02-16T02:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Knox to securely access HBase through ODBC then Phoenix Query Server?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-Knox-to-securely-access-HBase-through-ODBC-then/m-p/172706#M54304</link>
      <description>&lt;P&gt;Thank you Josh for looking into this.  It would be convenient if Knox can have a configuration switch that would preserve the http body regardless of the content-type of incoming requests, as a proxy server essentially.  Please open a JIRA issue if you think it is a good feature. &lt;/P&gt;&lt;P&gt;Thank you very much for your help of looking into the ODBC driver issue.  Hopefully the fix can come out soon. &lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 03:18:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-Knox-to-securely-access-HBase-through-ODBC-then/m-p/172706#M54304</guid>
      <dc:creator>hong_yu</dc:creator>
      <dc:date>2017-02-16T03:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Knox to securely access HBase through ODBC then Phoenix Query Server?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-Knox-to-securely-access-HBase-through-ODBC-then/m-p/172707#M54305</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/223/jelser.html" nodeid="223"&gt;@Josh Elser&lt;/A&gt;  , We seem to hit the same issue, is this resolved ? &lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 17:56:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-Knox-to-securely-access-HBase-through-ODBC-then/m-p/172707#M54305</guid>
      <dc:creator>ashojose</dc:creator>
      <dc:date>2017-12-08T17:56:48Z</dc:date>
    </item>
  </channel>
</rss>

