I have a strange issue with salt-api screaming for *401 Unauthorised* constantly
when running any operation after login for the first time, then the second
time (right after) will success with the same token.
Example:
# curl -i -k localhost:8000/login -H "Accept: application/json" -d
username='<user>' -d password='<password>' -d eauth='pam'
*Success!!!*
# curl -i localhost:8000/keys -H "X-Auth-Token:
1ce57dc24fdb817e3caa027d64c43dc47c665df4" -H "Accept: application/json"
...
</head>
<body>
<h2>*401 Unauthorized*</h2>
<p>No permission -- see authorization schemes</p>
<pre id="traceback">Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 670,
in respond
response.body = self.handler()
File "/usr/lib/python2.7/site-packages/cherrypy/lib/encoding.py", line
217, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/salt/netapi/rest_cherrypy/app.py",
line 352, in hypermedia_handler
raise cherrypy.HTTPError(401)
HTTPError: (401, None)
...
# curl -i localhost:8000/keys -H "X-Auth-Token:
1ce57dc24fdb817e3caa027d64c43dc47c665df4" -H "Accept: application/json"
*Success!!!*
My external_auth configurations are:
external_auth:
pam:
<user>:
- .*
- '@wheel'
- '@runner'
- '@jobs
Any idea?
Thanks avi,
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.