Salt-api auth errors

130 Views Asked by At

Im trying to get salt-api working for the first time locally

I've added

rest_cherrypy:

port: 8000

disable_ssl: true



external_auth:

pam:

dave:

- .*

to my master config, stopped both master and api service and started again, ran the command

curl -sSk http://localhost:8000/login -H 'Accept: application/x-yaml' -d username=dave -d password=dave -d eauth=pam

But I'm getting 401s in the response. The API log looks like

2023-07-31 10:31:16,274 [cherrypy.error :213 ][INFO ][5132] [31/Jul/2023:10:31:16] ENGINE Bus STARTING

2023-07-31 10:31:16,383 [cherrypy.error :213 ][INFO ][5132] [31/Jul/2023:10:31:16] ENGINE Serving on http://0.0.0.0:8000

2023-07-31 10:31:16,386 [cherrypy.error :213 ][INFO ][5132] [31/Jul/2023:10:31:16] ENGINE Bus STARTED

2023-07-31 10:31:19,058 [salt.loaded.int.netapi.rest_cherrypy.app:747 ][INFO ][5132] [api_acl] Authentication not checked for user dave from IP 127.0.0.1

2023-07-31 10:31:19,090 [cherrypy.access.139938403168848:283 ][INFO ][5132] 127.0.0.1 - - [31/Jul/2023:10:31:19] "POST /login HTTP/1.1" 401 761 "" "curl/7.81.0"

N.B The user "dave" definitely exists as a linux user on the VM im running this on (I assuming that is how a user is created as the docs dont specify how to create)

0

There are 0 best solutions below