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/02/15 22:14:28 UTC

Disable kerberbos using REST API

Hi,    I am using the following REST API to disable kerberos:

curl -k -H 'X-Requested-By:ambari' -u admin:admin -i -X PUT -d @kerberos_disable.json http://localhost:8081/api/v1/clusters/MyCluster  

Here is the content of kerberos_disable.json :
{
  "session_attributes" : {
    "kerberos_admin" : {
      "principal" : "admin@EXAMPLE.COM",
      "password" : "P@ssw0rd"
    }
  },
  "Clusters": {
    "security_type" : "NONE"
  }
}
After this REST API:(1) kerberos principals are removed(2) keytab files are removed.(3) In Ambari UI, "Enable Kerberos" is enabled.
However, in the Ambari UI, I still see "Kerberos" as a service in the dashboard.
Please note that if I disable kerberos via Ambari UI (instead of using REST API).  I will not see "Kerberos" as a service in the dashboard.
Please let me know if I miss anything in the disable-kerberos REST API.

Thanks,-fay
 





Re: Disable kerberbos using REST API

Posted by jun aoki <ja...@apache.org>.
Hi Fay, Rob already answered but here is the pointer.
https://github.com/apache/ambari/blob/trunk/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js#L143

On Tue, Feb 16, 2016 at 9:59 AM, Fay Wang <fa...@yahoo.com> wrote:

> Thanks, Rob, for the great help!
>
>
>
> On Tuesday, February 16, 2016 6:19 AM, Robert Levas <
> rlevas@hortonworks.com> wrote:
>
>
> Fay…
>
> Just as when you enabled Kerberos via the API and you needed to add the
> KERBEROS service and KERBEROS_CLIENT component… when you disable Kerberos,
> you also need to manually remove the KERBEROS_CLIENT component and KERBEROS
> service. The Ambari UI does this as part of the Enabled/Disable Kerberos
> wizard.
>
> Rob
>
>
> From: Fay Wang <fa...@yahoo.com>
> Reply-To: "user@ambari.apache.org" <us...@ambari.apache.org>, Fay Wang <
> faywang300@yahoo.com>
> Date: Monday, February 15, 2016 at 4:14 PM
> To: "user@ambari.apache.org" <us...@ambari.apache.org>
> Subject: Disable kerberbos using REST API
>
> Hi,
>     I am using the following REST API to disable kerberos:
>
> curl -k -H 'X-Requested-By:ambari' -u admin:admin -i -X PUT -d
> @kerberos_disable.json http://localhost:8081/api/v1/clusters/MyCluster
>
> Here is the content of kerberos_disable.json :
> {
>   "session_attributes" : {
>     "kerberos_admin" : {
>       "principal" : "admin@EXAMPLE.COM",
>       "password" : "P@ssw0rd"
>     }
>   },
>   "Clusters": {
>     "security_type" : "NONE"
>   }
> }
>
> After this REST API:
> (1) kerberos principals are removed
> (2) keytab files are removed.
> (3) In Ambari UI, "Enable Kerberos" is enabled.
>
> However, in the Ambari UI, I still see "Kerberos" as a service in the
> dashboard.
>
> Please note that if I disable kerberos via Ambari UI (instead of using
> REST API).  I will not see "Kerberos" as a service in the dashboard.
>
> Please let me know if I miss anything in the disable-kerberos REST API.
>
> Thanks,
> -fay
>
>
>
>
>
>
>
>


-- 
-jun

Re: Disable kerberbos using REST API

Posted by Fay Wang <fa...@yahoo.com>.
Thanks, Rob, for the great help!
 

    On Tuesday, February 16, 2016 6:19 AM, Robert Levas <rl...@hortonworks.com> wrote:
 

 Fay…
Just as when you enabled Kerberos via the API and you needed to add the KERBEROS service and KERBEROS_CLIENT component… when you disable Kerberos, you also need to manually remove the KERBEROS_CLIENT component and KERBEROS service. The Ambari UI does this as part of the Enabled/Disable Kerberos wizard. 
Rob

From: Fay Wang <fa...@yahoo.com>
Reply-To: "user@ambari.apache.org" <us...@ambari.apache.org>, Fay Wang <fa...@yahoo.com>
Date: Monday, February 15, 2016 at 4:14 PM
To: "user@ambari.apache.org" <us...@ambari.apache.org>
Subject: Disable kerberbos using REST API

Hi,    I am using the following REST API to disable kerberos:

curl -k -H 'X-Requested-By:ambari' -u admin:admin -i -X PUT -d @kerberos_disable.jsonhttp://localhost:8081/api/v1/clusters/MyCluster 

Here is the content of kerberos_disable.json :
{
  "session_attributes" : {
    "kerberos_admin" : {
      "principal" : "admin@EXAMPLE.COM",
      "password" : "P@ssw0rd"
    }
  },
  "Clusters": {
    "security_type" : "NONE"
  }
}
After this REST API:(1) kerberos principals are removed(2) keytab files are removed.(3) In Ambari UI, "Enable Kerberos" is enabled.
However, in the Ambari UI, I still see "Kerberos" as a service in the dashboard.
Please note that if I disable kerberos via Ambari UI (instead of using REST API).  I will not see "Kerberos" as a service in the dashboard.
Please let me know if I miss anything in the disable-kerberos REST API.

Thanks,-fay







  

Re: Disable kerberbos using REST API

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

Just as when you enabled Kerberos via the API and you needed to add the KERBEROS service and KERBEROS_CLIENT component… when you disable Kerberos, you also need to manually remove the KERBEROS_CLIENT component and KERBEROS service. The Ambari UI does this as part of the Enabled/Disable Kerberos wizard.

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: Monday, February 15, 2016 at 4:14 PM
To: "user@ambari.apache.org<ma...@ambari.apache.org>" <us...@ambari.apache.org>>
Subject: Disable kerberbos using REST API

Hi,
    I am using the following REST API to disable kerberos:

curl -k -H 'X-Requested-By:ambari' -u admin:admin -i -X PUT -d @kerberos_disable.json http://localhost:8081/api/v1/clusters/MyCluster

Here is the content of kerberos_disable.json :
{
  "session_attributes" : {
    "kerberos_admin" : {
      "principal" : "admin@EXAMPLE.COM<ma...@EXAMPLE.COM>",
      "password" : "P@ssw0rd"
    }
  },
  "Clusters": {
    "security_type" : "NONE"
  }
}

After this REST API:
(1) kerberos principals are removed
(2) keytab files are removed.
(3) In Ambari UI, "Enable Kerberos" is enabled.

However, in the Ambari UI, I still see "Kerberos" as a service in the dashboard.

Please note that if I disable kerberos via Ambari UI (instead of using REST API).  I will not see "Kerberos" as a service in the dashboard.

Please let me know if I miss anything in the disable-kerberos REST API.

Thanks,
-fay