<?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: Problem when delete policy in ranger by name,How to delete a policy in Ranger with service name and policy name? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Problem-when-delete-policy-in-ranger-by-name-How-to-delete-a/m-p/167600#M129930</link>
    <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/323/akulkarni.html" nodeid="323"&gt;@akulkarni&lt;/A&gt;, the single quotes works.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Feb 2017 10:00:11 GMT</pubDate>
    <dc:creator>hzhang</dc:creator>
    <dc:date>2017-02-10T10:00:11Z</dc:date>
    <item>
      <title>Problem when delete policy in ranger by name,How to delete a policy in Ranger with service name and policy name?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Problem-when-delete-policy-in-ranger-by-name-How-to-delete-a/m-p/167596#M129926</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I try to delete ranger policy by name, but failed(delete by policy id succeeds):&lt;/P&gt;&lt;P&gt;curl -v -u admin:admin -X DELETE &lt;A href="http://myhost:6080/service/public/v2/api/policy?servicename=myservice&amp;amp;policyname=mypolicy" target="_blank"&gt;http://myhost:6080/service/public/v2/api/policy?servicename=myservice&amp;amp;policyname=mypolicy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It reports HTTP/1.1 400 Bad Request&lt;/P&gt;&lt;P&gt;Does anyone know the reasons?&lt;/P&gt;,&lt;P&gt;Follow the document I user the Restapi to delete a policy&lt;/P&gt;&lt;P&gt;I can successfully delete policy by poicyid using curl, but failed to delete policy by name.&lt;/P&gt;&lt;P&gt;curl -v -u admin:admin -X DELETE &lt;A href="http://35.167.43.5:6080/service/public/v2/api/policy?servicename=hawq&amp;amp;policyname=mypolicy" target="_blank"&gt;http://35.167.43.5:6080/service/public/v2/api/policy?servicename=hawq&amp;amp;policyname=mypolicy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But it reports HTTP/1.1 400 Bad Request.&lt;/P&gt;&lt;P&gt;Does anyone know the reason?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 14:21:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Problem-when-delete-policy-in-ranger-by-name-How-to-delete-a/m-p/167596#M129926</guid>
      <dc:creator>hzhang</dc:creator>
      <dc:date>2017-02-09T14:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem when delete policy in ranger by name,How to delete a policy in Ranger with service name and policy name?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Problem-when-delete-policy-in-ranger-by-name-How-to-delete-a/m-p/167597#M129927</link>
      <description>&lt;P&gt;you can delete by using the policy ID&lt;/P&gt;&lt;P&gt;check here : &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.3/bk_Security_Guide/content/ranger_rest_api_delete_policy.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.3/bk_Security_Guide/content/ranger_rest_api_delete_policy.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 16:38:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Problem-when-delete-policy-in-ranger-by-name-How-to-delete-a/m-p/167597#M129927</guid>
      <dc:creator>ahallam</dc:creator>
      <dc:date>2017-02-09T16:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem when delete policy in ranger by name,How to delete a policy in Ranger with service name and policy name?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Problem-when-delete-policy-in-ranger-by-name-How-to-delete-a/m-p/167598#M129928</link>
      <description>&lt;P&gt;Yes, I could delete by id. But I find policy can be deleted by policy name in Ranger wiki. Doesn't it work?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 17:31:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Problem-when-delete-policy-in-ranger-by-name-How-to-delete-a/m-p/167598#M129928</guid>
      <dc:creator>hzhang</dc:creator>
      <dc:date>2017-02-09T17:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem when delete policy in ranger by name,How to delete a policy in Ranger with service name and policy name?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Problem-when-delete-policy-in-ranger-by-name-How-to-delete-a/m-p/167599#M129929</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15930/hzhang.html" nodeid="15930"&gt;@hubert zhang&lt;/A&gt;
bIt should work. I used the following to delete a policy 'test' in service 'cl1_hadoop'&lt;/P&gt;&lt;PRE&gt;# curl -v -u admin:admin -X DELETE 'http://localhost:6080/service/public/v2/api/policy?servicename=cl1_hadoop&amp;amp;policyname=test'
* About to connect() to localhost port 6080 (#0)
*   Trying ::1... connected
* Connected to localhost (::1) port 6080 (#0)
* Server auth using Basic with user 'admin'
&amp;gt; DELETE /service/public/v2/api/policy?servicename=cl1_hadoop&amp;amp;policyname=test HTTP/1.1
&amp;gt; Authorization: Basic YWRtaW46YWRtaW4=
&amp;gt; User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
&amp;gt; Host: localhost:6080
&amp;gt; Accept: */*
&amp;gt;
&amp;lt; HTTP/1.1 204 No Content
&amp;lt; Server: Apache-Coyote/1.1
&amp;lt; Set-Cookie: RANGERADMINSESSIONID=3A91B6A9E428A09CBA0291AA5CA8D8A2; Path=/; HttpOnly
&amp;lt; X-Frame-Options: DENY
&amp;lt; Date: Thu, 09 Feb 2017 06:25:35 GMT
&amp;lt;
* Connection #0 to host localhost left intact
* Closing connection #0

&lt;/PRE&gt;&lt;P&gt;Please note the single quotes above.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2017 02:27:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Problem-when-delete-policy-in-ranger-by-name-How-to-delete-a/m-p/167599#M129929</guid>
      <dc:creator>akulkarni1</dc:creator>
      <dc:date>2017-02-10T02:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem when delete policy in ranger by name,How to delete a policy in Ranger with service name and policy name?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Problem-when-delete-policy-in-ranger-by-name-How-to-delete-a/m-p/167600#M129930</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/323/akulkarni.html" nodeid="323"&gt;@akulkarni&lt;/A&gt;, the single quotes works.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2017 10:00:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Problem-when-delete-policy-in-ranger-by-name-How-to-delete-a/m-p/167600#M129930</guid>
      <dc:creator>hzhang</dc:creator>
      <dc:date>2017-02-10T10:00:11Z</dc:date>
    </item>
  </channel>
</rss>

