<?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 Ranger REST API missing policy details? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ranger-REST-API-missing-policy-details/m-p/130342#M43487</link>
    <description>&lt;P&gt;
 I have a Hive policy which specifies Masking and Row Filtering criteria.  Here is a screenshot:&lt;/P&gt;&lt;P&gt;
 &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8543-screen-shot-2016-10-13-at-82622-am.png" style="width: 1578px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/22368i667B16AA32E51E56/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8543-screen-shot-2016-10-13-at-82622-am.png" alt="8543-screen-shot-2016-10-13-at-82622-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;
 When I use the Ranger REST API to get the policy details the Mask and/or Filtering details are missing:&lt;/P&gt;&lt;PRE&gt;curl -s -XGET -u admin:admin &lt;A href="http://localhost:6080/service/public/api/policy/14" target="_blank" rel="nofollow noopener noreferrer"&gt;http://localhost:6080/service/public/api/policy/14&lt;/A&gt;

{"id":14,"createDate":"2016-08-29T08:19:48Z","updateDate":"2016-09-15T19:23:51Z","owner":"Admin","updatedBy":"Admin","policyName":"filter_ww_customers_table","resourceName":"/hortoniabank/ww_customers/","description":"","repositoryName":"secgov_cl1_hive","repositoryType":"hive","permMapList":[],"tables":"ww_customers","databases":"hortoniabank","tableType":"Inclusion","isEnabled":true,"isRecursive":false,"isAuditEnabled":true,"version":"3","replacePerm":false}&lt;/PRE&gt;&lt;P&gt;This appears to be a problem with the newer "Allow" and "Deny" rules as well.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8544-screen-shot-2016-10-13-at-50740-pm.png" style="width: 1581px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/22369i4C6032F3EC18BF09/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8544-screen-shot-2016-10-13-at-50740-pm.png" alt="8544-screen-shot-2016-10-13-at-50740-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;curl -s -XGET -u admin:admin &lt;A href="http://localhost:6080/service/public/api/policy/16" target="_blank" rel="nofollow noopener noreferrer"&gt;http://localhost:6080/service/public/api/policy/16&lt;/A&gt;

{"id":16,"createDate":"2016-09-19T20:16:01Z","updateDate":"2016-09-21T09:26:11Z","owner":"Admin","updatedBy":"Admin","policyName":"prohibit_zipcode_mrn_bloodtype","resourceName":"/hortoniabank/ww_customers/zipcode","description":"","repositoryName":"secgov_cl1_hive","repositoryType":"hive","permMapList":[],"tables":"ww_customers","columns":"zipcode","databases":"hortoniabank","tableType":"Inclusion","columnType":"Inclusion","isEnabled":true,"isRecursive":false,"isAuditEnabled":true,"version":"4","replacePerm":false}&lt;/PRE&gt;&lt;P&gt;Is there a different API call to get these details?&lt;/P&gt;</description>
    <pubDate>Mon, 19 Aug 2019 09:32:18 GMT</pubDate>
    <dc:creator>myoung</dc:creator>
    <dc:date>2019-08-19T09:32:18Z</dc:date>
    <item>
      <title>Ranger REST API missing policy details?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ranger-REST-API-missing-policy-details/m-p/130342#M43487</link>
      <description>&lt;P&gt;
 I have a Hive policy which specifies Masking and Row Filtering criteria.  Here is a screenshot:&lt;/P&gt;&lt;P&gt;
 &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8543-screen-shot-2016-10-13-at-82622-am.png" style="width: 1578px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/22368i667B16AA32E51E56/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8543-screen-shot-2016-10-13-at-82622-am.png" alt="8543-screen-shot-2016-10-13-at-82622-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;
 When I use the Ranger REST API to get the policy details the Mask and/or Filtering details are missing:&lt;/P&gt;&lt;PRE&gt;curl -s -XGET -u admin:admin &lt;A href="http://localhost:6080/service/public/api/policy/14" target="_blank" rel="nofollow noopener noreferrer"&gt;http://localhost:6080/service/public/api/policy/14&lt;/A&gt;

{"id":14,"createDate":"2016-08-29T08:19:48Z","updateDate":"2016-09-15T19:23:51Z","owner":"Admin","updatedBy":"Admin","policyName":"filter_ww_customers_table","resourceName":"/hortoniabank/ww_customers/","description":"","repositoryName":"secgov_cl1_hive","repositoryType":"hive","permMapList":[],"tables":"ww_customers","databases":"hortoniabank","tableType":"Inclusion","isEnabled":true,"isRecursive":false,"isAuditEnabled":true,"version":"3","replacePerm":false}&lt;/PRE&gt;&lt;P&gt;This appears to be a problem with the newer "Allow" and "Deny" rules as well.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8544-screen-shot-2016-10-13-at-50740-pm.png" style="width: 1581px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/22369i4C6032F3EC18BF09/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8544-screen-shot-2016-10-13-at-50740-pm.png" alt="8544-screen-shot-2016-10-13-at-50740-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;curl -s -XGET -u admin:admin &lt;A href="http://localhost:6080/service/public/api/policy/16" target="_blank" rel="nofollow noopener noreferrer"&gt;http://localhost:6080/service/public/api/policy/16&lt;/A&gt;

{"id":16,"createDate":"2016-09-19T20:16:01Z","updateDate":"2016-09-21T09:26:11Z","owner":"Admin","updatedBy":"Admin","policyName":"prohibit_zipcode_mrn_bloodtype","resourceName":"/hortoniabank/ww_customers/zipcode","description":"","repositoryName":"secgov_cl1_hive","repositoryType":"hive","permMapList":[],"tables":"ww_customers","columns":"zipcode","databases":"hortoniabank","tableType":"Inclusion","columnType":"Inclusion","isEnabled":true,"isRecursive":false,"isAuditEnabled":true,"version":"4","replacePerm":false}&lt;/PRE&gt;&lt;P&gt;Is there a different API call to get these details?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 09:32:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ranger-REST-API-missing-policy-details/m-p/130342#M43487</guid>
      <dc:creator>myoung</dc:creator>
      <dc:date>2019-08-19T09:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Ranger REST API missing policy details?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ranger-REST-API-missing-policy-details/m-p/130343#M43488</link>
      <description>&lt;P&gt;The REST endpoint you used is for the older version of Ranger, which does not handle recent additions like row-filter/column masking policies. Please use REST endpoint at service/public&lt;STRONG&gt;/v2&lt;/STRONG&gt;/api/policy (note "/v2" in the path). For more details on the API, please see wiki at &lt;A href="https://cwiki.apache.org/confluence/display/RANGER/REST+APIs+for+Service+Definition%2C+Service+and+Policy+Management"&gt;https://cwiki.apache.org/confluence/display/RANGER/REST+APIs+for+Service+Definition%2C+Service+and+Policy+Management&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If it helps to look at the Java source for the REST API - it is available is at &lt;A href="https://github.com/apache/incubator-ranger/blob/master/security-admin/src/main/java/org/apache/ranger/rest/PublicAPIsv2.java"&gt;https://github.com/apache/incubator-ranger/blob/master/security-admin/src/main/java/org/apache/ranger/rest/PublicAPIsv2.java&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 10:47:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ranger-REST-API-missing-policy-details/m-p/130343#M43488</guid>
      <dc:creator>mneethiraj</dc:creator>
      <dc:date>2016-10-14T10:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Ranger REST API missing policy details?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ranger-REST-API-missing-policy-details/m-p/130344#M43489</link>
      <description>&lt;P&gt;Thank you for your response.  That was the problem.  I was using the Hortonworks documentation which does not show the version part of the URL:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.0/bk_security/content/ranger_rest_api_get_policy.html"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.0/bk_security/content/ranger_rest_api_get_policy.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 22:16:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ranger-REST-API-missing-policy-details/m-p/130344#M43489</guid>
      <dc:creator>myoung</dc:creator>
      <dc:date>2016-10-14T22:16:37Z</dc:date>
    </item>
  </channel>
</rss>

