<?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 KMS throws exceptions in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/KMS-throws-exceptions/m-p/189454#M65252</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;My cluster is kerbeorized with KMS. When I execute the following command I am getting the below error. Could anyone help me on this asap.&lt;/P&gt;&lt;P&gt;curl --negotiate -u : -X GET &lt;A href="http://&amp;lt;clustername&amp;gt;:9292/kms/v1/keyversion/" target="_blank"&gt;http://&amp;lt;clustername&amp;gt;:9292/kms/v1/keyversion/&lt;/A&gt;&amp;lt;keyname@0/_eek?ee_op=decrypt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{
  "RemoteException" : {
  "message" : null,
  "exception" : "WebApplicationException",
  "javaClassName" : "javax.ws.rs.WebApplicationException"
  }&lt;/P&gt;&lt;P&gt;In the kms-audit.log I see the following error "ErrorMsg:'Authentication required' saying that Authentication required.&lt;/P&gt;&lt;P&gt; I specified --negotiate option and -u option as well.&lt;/P&gt;&lt;P&gt;But the below command is working &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;curl --negotiate -u : -X GET &lt;A href="http://%3cclustername%3e:9292/kms/v1/keyversion/" target="_blank"&gt;http://&amp;lt;clustername&amp;gt;:9292/kms/v1/keyversion/&lt;/A&gt;&amp;lt;keyname@0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{
  "name" : "&amp;lt;keyname",
  "versionName" : "&amp;lt;keyname&amp;gt;&lt;A href="mailto:h@0" target="_blank"&gt;@0&lt;/A&gt;",
  "material" : "&amp;lt;some value&amp;gt;"
}&lt;/P&gt;&lt;P&gt;The user with which the command is being executed has the valid Kerberos ticket and decrypt permissions also set with Ranger kms web ui&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 11:57:41 GMT</pubDate>
    <dc:creator>mravipati</dc:creator>
    <dc:date>2022-09-16T11:57:41Z</dc:date>
    <item>
      <title>KMS throws exceptions</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/KMS-throws-exceptions/m-p/189454#M65252</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;My cluster is kerbeorized with KMS. When I execute the following command I am getting the below error. Could anyone help me on this asap.&lt;/P&gt;&lt;P&gt;curl --negotiate -u : -X GET &lt;A href="http://&amp;lt;clustername&amp;gt;:9292/kms/v1/keyversion/" target="_blank"&gt;http://&amp;lt;clustername&amp;gt;:9292/kms/v1/keyversion/&lt;/A&gt;&amp;lt;keyname@0/_eek?ee_op=decrypt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{
  "RemoteException" : {
  "message" : null,
  "exception" : "WebApplicationException",
  "javaClassName" : "javax.ws.rs.WebApplicationException"
  }&lt;/P&gt;&lt;P&gt;In the kms-audit.log I see the following error "ErrorMsg:'Authentication required' saying that Authentication required.&lt;/P&gt;&lt;P&gt; I specified --negotiate option and -u option as well.&lt;/P&gt;&lt;P&gt;But the below command is working &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;curl --negotiate -u : -X GET &lt;A href="http://%3cclustername%3e:9292/kms/v1/keyversion/" target="_blank"&gt;http://&amp;lt;clustername&amp;gt;:9292/kms/v1/keyversion/&lt;/A&gt;&amp;lt;keyname@0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{
  "name" : "&amp;lt;keyname",
  "versionName" : "&amp;lt;keyname&amp;gt;&lt;A href="mailto:h@0" target="_blank"&gt;@0&lt;/A&gt;",
  "material" : "&amp;lt;some value&amp;gt;"
}&lt;/P&gt;&lt;P&gt;The user with which the command is being executed has the valid Kerberos ticket and decrypt permissions also set with Ranger kms web ui&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 11:57:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/KMS-throws-exceptions/m-p/189454#M65252</guid>
      <dc:creator>mravipati</dc:creator>
      <dc:date>2022-09-16T11:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: KMS throws exceptions</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/KMS-throws-exceptions/m-p/189455#M65253</link>
      <description>&lt;P&gt;Hello &lt;A rel="user" href="https://community.cloudera.com/users/20349/mravipati.html" nodeid="20349"&gt;@mravipati&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;In order to decrypt an EEK, first you'll need to generate one. Here's what is working for me:&lt;/P&gt;&lt;P&gt;1. Generate EEK&lt;/P&gt;&lt;PRE&gt;# curl --negotiate -u : -iv -X GET  "http://&amp;lt;kms-host-fqdn&amp;gt;:9292/kms/v1/key/hr1-ez-key/_eek?eek_op=generate&amp;amp;num_keys=1"&lt;/PRE&gt;&lt;P&gt;2. Store the EEK data into a json:&lt;/P&gt;&lt;PRE&gt;# cat eek.json
{
  "name" : "hr1-ez-key",
  "iv" : "38Eb8nTxxxxxUG7Rc6_wrA",
  "material" : "K8Q0bv8Hxxxxxxn9ByVnT-xxx-Bmwxxxxxy1buCk"
}&lt;/PRE&gt;&lt;P&gt;3. Call decrypt EEK while passing above EEK data:&lt;/P&gt;&lt;PRE&gt;# curl --negotiate -u : -iv -X POST -H "Content-Type: application/json" -d @./eek.json  "http://&amp;lt;kms-host-fqdn&amp;gt;:9292/kms/v1/keyversion/hr1-ez-key@0/_eek?eek_op=decrypt"&lt;/PRE&gt;&lt;P&gt;Please note the change in REST URL and keyname while making decrypt request.&lt;/P&gt;&lt;P&gt;The error you are getting is because you are trying to do a GET request on a URL which is expecting a POST request.&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2017 05:38:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/KMS-throws-exceptions/m-p/189455#M65253</guid>
      <dc:creator>VR46</dc:creator>
      <dc:date>2017-07-21T05:38:29Z</dc:date>
    </item>
  </channel>
</rss>

