ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Stadtler <a...@phdata.io>
Subject Re: question on enable kerberos choosing "manage kerberos principals and keytabs manually"
Date Wed, 11 May 2016 21:52:02 GMT
Fay,

Tested on Ambari 2.2.1.0 and no issue, though I think you want "manage_identities" : “false”
if you are going to managing the kerberos principals and keytabs manually.


# curl -k -H "X-Requested-By:ambari" -u admin:admin -i -X POST -d '{"type": "kerberos-env",
"tag": "test", "properties" : {"kdc_type" : "none"}}' http://10.0.0.21:8080/api/v1/clusters/Sandbox/configurations

HTTP/1.1 404 Not Found
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
User: admin
Set-Cookie: AMBARISESSIONID=16xblt5ffavx51xhv163tpfwt2;Path=/;HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Length: 0
Server: Jetty(8.1.17.v20150415)

#  curl -k -H "X-Requested-By:ambari" -u admin:admin -i -X POST -d '{"type": "kerberos-env",
"tag": "test", "properties" : {"kdc_type" : "none"}}' http://10.0.0.21:8080/api/v1/clusters/Sandbox/configurations

HTTP/1.1 201 Created
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
User: admin
Set-Cookie: AMBARISESSIONID=1ardiaj35v3q2q71a6u2spdxa;Path=/;HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/plain
Content-Length: 0
Server: Jetty(8.1.17.v20150415)




          "Config" : {
            "cluster_name" : "Sandbox",
            "stack_id" : "HDP-2.4"
          },
          "type" : "kerberos-env",
          "tag" : "test",
          "version" : 2,
          "properties" : {
            "kdc_type" : "none"
          }

  

> On May 11, 2016, at 4:06 PM, Fay Wang <faywang300@yahoo.com> wrote:
> 
> Hi,
>     Is there a way to programmatically enable kerberos which is equivalent to the option
of "Manage kerberos principals and keytabs manually" via Ambari UI?
> 
> I set kdc_type as "none" in my json file, 
> 
>  "Clusters": {
>       "desired_config": {
>         "type": "kerberos-env",
>         "tag": "version2",
>         "properties": {
>           "kdc_type": "none",
>           "manage_identities": "true"
> 
> but got the error when executing the curl command:
> 
> curl -k -H "X-Requested-By:ambari" -u admin:admin -i -X PUT -d @/tmp/kerberos_enable.json
http://localhost:8080/api/v1/clusters/MyCluster
> HTTP/1.1 400 Bad Request
> Strict-Transport-Security: max-age=31536000
> X-Frame-Options: DENY
> X-XSS-Protection: 1; mode=block
> User: admin
> Set-Cookie: AMBARISESSIONID=12qbtr9rz5f3514x4farf0ip2b;Path=/;Secure;HttpOnly
> Expires: Thu, 01 Jan 1970 00:00:00 GMT
> Content-Type: text/plain
> Content-Length: 104
> Server: Jetty(8.1.17.v20150415)
> 
> {
>   "status" : 400,
>   "message" : "java.lang.IllegalArgumentException: Unexpected kdcType value: NONE"
> 
> Any help is highly appreciated...
> 
> -fay
> 


Mime
View raw message