I am noticing 500 errors when trying to login concurrently using pam as the external auth. The log message is:
127.0.0.1 - - [13/Mar/2013:08:05:26] "POST /login HTTP/1.1" 500 37 "" "curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5"
[CRITICAL] Authentication module threw an exception: argument 1: <type 'exceptions.TypeError'>: expected PamHandle instance instead of PamHandle
[CRITICAL] Authentication module threw an exception: argument 1: <type 'exceptions.TypeError'>: expected PamHandle instance instead of PamHandle
[CRITICAL] Authentication module threw an exception: argument 1: <type 'exceptions.TypeError'>: expected PamHandle instance instead of PamHandle
[CRITICAL] Authentication module threw an exception: argument 1: <type 'exceptions.TypeError'>: expected PamHandle instance instead of PamHandle
127.0.0.1 - - [13/Mar/2013:08:05:26] "POST /login HTTP/1.1" 500 37 "" "curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5"
Traceback (most recent call last):
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 313, in 'calling callback function'
File "/Library/Python/2.7/site-packages/salt/auth/pam.py", line 122, in my_conv
p_response[0] = cast(addr, POINTER(PamResponse))
File "_ctypes/callbacks.c", line 313, in 'calling callback function'
TypeError: File "/Library/Python/2.7/site-packages/salt/auth/pam.py", line 122, in my_conv
incompatible types, LP_PamResponse instance instead of LP_PamResponse instance p_response[0] = cast(addr, POINTER(PamResponse))
TypeError: incompatible types, LP_PamResponse instance instead of LP_PamResponse instance
curl -sik -d "username=<user>&password=<password>&eauth=pam" "http://localhost:8000/login"
Monitor logs and curl output. The curls will start returning:
HTTP/1.1 500 Internal Server Error
Content-Length: 37
Vary: Accept-Encoding
X-Auth-Token: 144a00d097bc58749cf816f2443b6086796c7716
Allow: GET, HEAD, POST
Date: Wed, 13 Mar 2013 15:05:02 GMT
Server: CherryPy/3.2.2
Content-Type: application/json
Set-Cookie: session_id=144a00d097bc58749cf816f2443b6086796c7716; expires=Thu, 14 Mar 2013 01:05:02 GMT; Path=/
{"status": 500, "message": "'token'"}
I am running salt-api 0.7.5 on OSX but I have also seen the same issue on RHEL6 inside a vagrant instance. Salt master is on version 0.13.1-45-gd52d617. CherryPy is 3.2.2.