salt-api部署遇401未授权问题求助(Ubuntu16+CherryPy环境)
Environment
- Ubuntu 16.04
- Initially used CherryPy 3.5 (downgraded to 3.2.3 to resolve a known SaltStack bug)
- salt-api and salt-master services fully restarted after configuration changes
Relevant Master Configuration
rest_cherrypy: port: 8000 disable_ssl: True external_auth: pam: saltuser: - .*
Successful Base Endpoint Check
After service restarts, the root endpoint responds as expected:
curl -k http://localhost:8000
Response:
{"clients": ["local", "local_async", "local_batch", "local_subset", "runner", "runner_async", "ssh", "wheel", "wheel_async"], "return": "Welcome"}
Problem: 401 Unauthorized on Authentication & Task Execution
All attempts to log in or submit commands return a 401 Unauthorized error:
Login Command
curl -sSk http://localhost:8000/login -H 'Accept: application/x-yaml' -d username=saltuser -d password=passwd -d eauth=pam
Task Submission Command
curl -vki http://localhost:8000 -H "Accept: application/x-yaml" -d client=local -d tgt='stg-ubuntu102*' -d fun='cmd.run' -d "kwarg": {"cmd": "touch /tmp/mannoj"}
I've verified that saltuser exists on the system and has valid PAM credentials. Any help troubleshooting this authentication failure would be much appreciated!
内容的提问来源于stack exchange,提问作者mannoj
相关产品推荐
相关产品推荐

