Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

use keytab for ambari rest api

avatar
New Member

I am trying to sync group to ambari server using keytab through curl command.

I am using below command:

curl -i -k --negotiate -u : -H 'X-Requested-By: ambari' -X POST -d '[{"Event": {"specs":[{"principal_type":"groups","sync_type":"specific","names": "group_name"}]}}]' https://<host>:8442/api/v1/ldap_sync_events

Error:

HTTP/1.1 403 Missing authentication token Strict-Transport-Security: max-age=31536000 X-Frame-Options: DENY X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Pragma: no-cache Content-Type: text/plain;charset=ISO-8859-1 Content-Length: 64
1 ACCEPTED SOLUTION

avatar

@Sudheer Velagapudi

What version of Ambari are you using and did you turn on the Kerberos authentication feature of Ambari?

Have you looked at the Ambari server log (/var/log/ambari-server/ambari-server.log) to see if there is anything interesting (and related) in there?

Did you successfully kinit using a principal from a trusted KDC before issuing the curl command?

View solution in original post

2 REPLIES 2

avatar

@Sudheer Velagapudi

What version of Ambari are you using and did you turn on the Kerberos authentication feature of Ambari?

Have you looked at the Ambari server log (/var/log/ambari-server/ambari-server.log) to see if there is anything interesting (and related) in there?

Did you successfully kinit using a principal from a trusted KDC before issuing the curl command?

avatar
New Member

Enabling kerberos authentication for the ambari resolved the issue.

Thank you @Robert Levas