<?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: REST API to assign Sandbox roles to Ambari users in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/REST-API-to-assign-Sandbox-roles-to-Ambari-users/m-p/107628#M70486</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/10331/mrizvi.html" nodeid="10331"&gt;@mrizvi&lt;/A&gt;&lt;P&gt;You can use below api :&lt;/P&gt;&lt;P&gt;curl -iv -u admin:admin -H "X-Requested-By: ambari" -X POST -d '[{"PrivilegeInfo":{"permission_name":"SERVICE.OPERATOR","principal_name":"testuser","principal_type":"USER"}}]'  &lt;A href="https://&amp;lt;ambari_host&amp;gt;:8080/api/v1/clusters/&amp;lt;cluster_name&amp;gt;/privileges" target="_blank"&gt;https://&amp;lt;ambari_host&amp;gt;:8080/api/v1/clusters/&amp;lt;cluster_name&amp;gt;/privileges&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;permission_name &lt;/STRONG&gt;could be one of the below :&lt;/P&gt;&lt;P&gt;CLUSTER.ADMINISTRATOR&lt;/P&gt;&lt;P&gt;CLUSTER.OPERATOR&lt;/P&gt;&lt;P&gt;SERVICE.ADMINISTRATOR&lt;/P&gt;&lt;P&gt;SERVICE.OPERATOR&lt;/P&gt;&lt;P&gt;CLUSTER.USER&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;principal_type &lt;/STRONG&gt;could be either : USER or GROUP&lt;/P&gt;</description>
    <pubDate>Thu, 18 Aug 2016 01:41:23 GMT</pubDate>
    <dc:creator>ssharma</dc:creator>
    <dc:date>2016-08-18T01:41:23Z</dc:date>
    <item>
      <title>REST API to assign Sandbox roles to Ambari users</title>
      <link>https://community.cloudera.com/t5/Support-Questions/REST-API-to-assign-Sandbox-roles-to-Ambari-users/m-p/107627#M70485</link>
      <description>&lt;P&gt;I can see 5 new Sandbox roles - Cluster Administrator, Cluster Operator, Service Administrator, Service Operator, Cluster User. Can someone please tell me the REST API to assign these roles to Ambari users? I tried retrieving roles through this call:&lt;/P&gt;&lt;P&gt;curl -iv -u admin:admin -X GET &lt;A href="http://ambari-server:8080/api/v1/roles" target="_blank"&gt;http://ambari-server:8080/api/v1/roles&lt;/A&gt; &lt;/P&gt;&lt;P&gt;but this seems broken. Please help.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 00:02:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/REST-API-to-assign-Sandbox-roles-to-Ambari-users/m-p/107627#M70485</guid>
      <dc:creator>mrizvi</dc:creator>
      <dc:date>2016-08-18T00:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: REST API to assign Sandbox roles to Ambari users</title>
      <link>https://community.cloudera.com/t5/Support-Questions/REST-API-to-assign-Sandbox-roles-to-Ambari-users/m-p/107628#M70486</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/10331/mrizvi.html" nodeid="10331"&gt;@mrizvi&lt;/A&gt;&lt;P&gt;You can use below api :&lt;/P&gt;&lt;P&gt;curl -iv -u admin:admin -H "X-Requested-By: ambari" -X POST -d '[{"PrivilegeInfo":{"permission_name":"SERVICE.OPERATOR","principal_name":"testuser","principal_type":"USER"}}]'  &lt;A href="https://&amp;lt;ambari_host&amp;gt;:8080/api/v1/clusters/&amp;lt;cluster_name&amp;gt;/privileges" target="_blank"&gt;https://&amp;lt;ambari_host&amp;gt;:8080/api/v1/clusters/&amp;lt;cluster_name&amp;gt;/privileges&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;permission_name &lt;/STRONG&gt;could be one of the below :&lt;/P&gt;&lt;P&gt;CLUSTER.ADMINISTRATOR&lt;/P&gt;&lt;P&gt;CLUSTER.OPERATOR&lt;/P&gt;&lt;P&gt;SERVICE.ADMINISTRATOR&lt;/P&gt;&lt;P&gt;SERVICE.OPERATOR&lt;/P&gt;&lt;P&gt;CLUSTER.USER&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;principal_type &lt;/STRONG&gt;could be either : USER or GROUP&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 01:41:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/REST-API-to-assign-Sandbox-roles-to-Ambari-users/m-p/107628#M70486</guid>
      <dc:creator>ssharma</dc:creator>
      <dc:date>2016-08-18T01:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: REST API to assign Sandbox roles to Ambari users</title>
      <link>https://community.cloudera.com/t5/Support-Questions/REST-API-to-assign-Sandbox-roles-to-Ambari-users/m-p/107629#M70487</link>
      <description>&lt;P&gt;The principal_name should be a kerberos principal? Because my Sandbox is not kerberized.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 01:50:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/REST-API-to-assign-Sandbox-roles-to-Ambari-users/m-p/107629#M70487</guid>
      <dc:creator>mrizvi</dc:creator>
      <dc:date>2016-08-18T01:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: REST API to assign Sandbox roles to Ambari users</title>
      <link>https://community.cloudera.com/t5/Support-Questions/REST-API-to-assign-Sandbox-roles-to-Ambari-users/m-p/107630#M70488</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10331/mrizvi.html" nodeid="10331"&gt;@mrizvi&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Its not kerberos principle. Its the 'username' to which you want to grant the respective role.&lt;/P&gt;&lt;P&gt;For example above api call grants 'SERVICE.OPERATOR' role to 'testuser'.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 03:02:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/REST-API-to-assign-Sandbox-roles-to-Ambari-users/m-p/107630#M70488</guid>
      <dc:creator>ssharma</dc:creator>
      <dc:date>2016-08-18T03:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: REST API to assign Sandbox roles to Ambari users</title>
      <link>https://community.cloudera.com/t5/Support-Questions/REST-API-to-assign-Sandbox-roles-to-Ambari-users/m-p/107631#M70489</link>
      <description>&lt;P&gt;It is giving me below exception:&lt;/P&gt;&lt;P&gt;* About to connect() to sandbox.hortonworks.com port 8080 (#0)&lt;/P&gt;&lt;P&gt;*   Trying 10.0.2.15... connected&lt;/P&gt;&lt;P&gt;* Connected to sandbox.hortonworks.com (10.0.2.15) port 8080 (#0)&lt;/P&gt;&lt;P&gt;* Initializing NSS with certpath: sql:/etc/pki/nssdb&lt;/P&gt;&lt;P&gt;*   CAfile: /etc/pki/tls/certs/ca-bundle.crt&lt;/P&gt;&lt;P&gt;  CApath: none&lt;/P&gt;&lt;P&gt;* NSS error -12263&lt;/P&gt;&lt;P&gt;* Closing connection #0&lt;/P&gt;&lt;P&gt;* SSL connect error&lt;/P&gt;&lt;P&gt;curl: (35) SSL connect error&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 03:07:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/REST-API-to-assign-Sandbox-roles-to-Ambari-users/m-p/107631#M70489</guid>
      <dc:creator>mrizvi</dc:creator>
      <dc:date>2016-08-18T03:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: REST API to assign Sandbox roles to Ambari users</title>
      <link>https://community.cloudera.com/t5/Support-Questions/REST-API-to-assign-Sandbox-roles-to-Ambari-users/m-p/107632#M70490</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10331/mrizvi.html" nodeid="10331"&gt;@mrizvi&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Did you enable ambari server ssl ? &lt;/P&gt;&lt;P&gt;From your command I presume your cluster is not https. &lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 03:12:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/REST-API-to-assign-Sandbox-roles-to-Ambari-users/m-p/107632#M70490</guid>
      <dc:creator>ssharma</dc:creator>
      <dc:date>2016-08-18T03:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: REST API to assign Sandbox roles to Ambari users</title>
      <link>https://community.cloudera.com/t5/Support-Questions/REST-API-to-assign-Sandbox-roles-to-Ambari-users/m-p/107633#M70491</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10331/mrizvi.html" nodeid="10331"&gt;@mrizvi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I didnt mean that. Its not compulsory for this operation. The api end point which I provided should grant the necessary role.&lt;/P&gt;&lt;P&gt;But the issue which you are facing might be due to some corrupted configs and need to be debugged further.&lt;/P&gt;&lt;P&gt;Can you please post the output of /var/log/ambari-server/ambari-server.log&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 03:22:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/REST-API-to-assign-Sandbox-roles-to-Ambari-users/m-p/107633#M70491</guid>
      <dc:creator>ssharma</dc:creator>
      <dc:date>2016-08-18T03:22:49Z</dc:date>
    </item>
  </channel>
</rss>

