You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ambari.apache.org by Fay Wang <fa...@yahoo.com> on 2016/01/07 20:42:12 UTC

how to automate kerberos using REST API

Hi,      I need to automate kerberos on my cluster using REST API. Following the document attached in AMBARI-7204 to register and kerberize the cluster, I got the error below:

(1) curl -u admin:admin -H "X-Requested-By: ambari" -X POST -d /tmp/kerberos_plan.json http://localhost:8081/api/v1/kerberos/MyKerberos
(2) curl -u admin:admin -H 'X-Requested-By: ambari' -X PUT -d {"RequestInfo":{"context":"Enable kerberos"},"Body":{"kerberos-enabled":"true", "kerberos-plan":"EHaasKerberos"}}' http://localhost:8081/api/v1/clusters/MyCluster 

{
  "status" : 400,
  "message" : "org.apache.ambari.server.controller.spi.UnsupportedPropertyException: The properties [kerberos-enabled, kerberos-plan] specified in the request or predicate are not supported for the resource type Cluster."}

Any help is highly appreciated!
-fay







   

Re: how to automate kerberos using REST API

Posted by Robert Levas <rl...@hortonworks.com>.
Hi Fay…

I think that data is outdated… You should follow the instructions at https://cwiki.apache.org/confluence/display/AMBARI/Automated+Kerberizaton#AutomatedKerberizaton-TheRESTAPI

Rob


From: Fay Wang <fa...@yahoo.com>>
Reply-To: "user@ambari.apache.org<ma...@ambari.apache.org>" <us...@ambari.apache.org>>, Fay Wang <fa...@yahoo.com>>
Date: Thursday, January 7, 2016 at 2:42 PM
To: "user@ambari.apache.org<ma...@ambari.apache.org>" <us...@ambari.apache.org>>
Subject: how to automate kerberos using REST API

Hi,
     I need to automate kerberos on my cluster using REST API. Following the document attached in AMBARI-7204 to register and kerberize the cluster, I got the error below:

(1) curl -u admin:admin -H "X-Requested-By: ambari" -X POST -d /tmp/kerberos_plan.json http://localhost:8081/api/v1/kerberos/MyKerberos

(2) curl -u admin:admin -H 'X-Requested-By: ambari' -X PUT -d {"RequestInfo":{"context":"Enable kerberos"},"Body":{"kerberos-enabled":"true", "kerberos-plan":"EHaasKerberos"}}' http://localhost:8081/api/v1/clusters/MyCluster

{
  "status" : 400,
  "message" : "org.apache.ambari.server.controller.spi.UnsupportedPropertyException: The properties [kerberos-enabled, kerberos-plan] specified in the request or predicate are not supported for the resource type Cluster."
}

Any help is highly appreciated!

-fay





<http://localhost:8081/api/v1/kerberos/MyKerberos>