- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
python api Cloudera Manager login issue in SAML external authencation
- Labels:
-
Cloudera Manager
Created ‎01-11-2018 07:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Team,
I have configured SAML authenation for cloudera manager/hue/navigator and i am able to login via respective Web UI. however when i connect though python api, i am getting below exception.
Please note that, i have enabled Settings - Cloudera Manager
File "ssl-update_cm_connect.py", line 17, in <module>
clu=api.get_cluster('Cluster 1')
File "/anaconda2/lib/python2.7/site-packages/cm_api/api_client.py", line 140, in get_cluster
return clusters.get_cluster(self, name)
File "anaconda2/lib/python2.7/site-packages/cm_api/endpoints/clusters.py", line 57, in get_cluster
return call(resource_root.get, "%s/%s" % (CLUSTERS_PATH, name), ApiCluster)
File "/anaconda2/lib/python2.7/site-packages/cm_api/endpoints/types.py", line 139, in call
ret = method(path, params=params)
File "//anaconda2/lib/python2.7/site-packages/cm_api/resource.py", line 110, in get
return self.invoke("GET", relpath, params)
File "/anaconda2/lib/python2.7/site-packages/cm_api/resource.py", line 73, in invoke
headers=headers)
File "/anaconda2/lib/python2.7/site-packages/cm_api/http_client.py", line 183, in execute
raise self._exc_class(ex)
cm_api.api_client.ApiException: <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 401 Full authentication is required to access this resource</title>
</head>
<body><h2>HTTP ERROR 401</h2>
<p>Problem accessing /api/v12/clusters/Cluster%201. Reason:
<pre> Full authentication is required to access this resource</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/>
api = ApiResource(CM_HOST,version=12, username="admin", password="admin",ssl_context=context)
Created ‎01-11-2018 12:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ignore my post. i was able to fix above issue by creating correct ssl context
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
cxt = ssl.create_default_context(cafile="/opt/pki/etc/tca/ca_cs_combined.pem")
Created ‎01-11-2018 12:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ignore my post. i was able to fix above issue by creating correct ssl context
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
cxt = ssl.create_default_context(cafile="/opt/pki/etc/tca/ca_cs_combined.pem")
