You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

salt-api部署遇401未授权问题求助(Ubuntu16+CherryPy环境)

salt-api 401 Unauthorized Error After CherryPy Downgrade (Ubuntu 16)

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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.29 06:38:15