Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

use keytab for ambari rest api

Contributor

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

@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

@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?

Contributor

Enabling kerberos authentication for the ambari resolved the issue.

Thank you @Robert Levas

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.