Coder Social home page Coder Social logo

Comments (4)

whiteinge avatar whiteinge commented on August 13, 2024

Interesting. I'm trying to reproduce this but no luck so far. What version of salt-api?

from salt-api.

dthom91 avatar dthom91 commented on August 13, 2024

This error is occurring for a pull of develop that I grabbed yesterday. I was blocked running 0.7.1 by #27. I can pull again and retest if that's helpful.

Steps to reproduce:

  1. Auth, like so: curl -sik https://localhost:8000/login -H "Accept: application/json" -d username=saltuser -d password=xxxxxx -d eauth=pam

  2. Use X-Auth-Token in request: curl -sik https://localhost:8000/ -H "X-Auth-Token: 7d492a13dd0ebd4b3991c55d4eede1d8ec40c518" -H "Accept: application/x-yaml" -d client=local -d tgt='salt-master*' -d fun='test.ping'

reply-
HTTP/1.1 200 OK
Content-Length: 69
Vary: Accept-Encoding
Server: CherryPy/3.2.2
Allow: GET, HEAD, POST
Cache-Control: private
Date: Sun, 02 Dec 2012 05:11:21 GMT
Content-Type: application/x-yaml
Set-Cookie: session_id=7d492a13dd0ebd4b3991c55d4eede1d8ec40c518; expires=Sun, 02 Dec 2012 15:11:21 GMT; Path=/

return:

  • salt-master-i-190f4c65.vpc.us-east-1a.qa2.cloudhub.io: true
  1. Wait 5 minutes or so with no requests.

  2. Use X-Auth-Token in request: curl -sik https://localhost:8000/ -H "X-Auth-Token: 7d492a13dd0ebd4b3991c55d4eede1d8ec40c518" -H "Accept: application/x-yaml" -d client=local -d tgt='salt-master*' -d fun='test.ping'

reply-

Server: CherryPy/3.2.2
Allow: GET, HEAD, POST
Cache-Control: private
Date: Sun, 02 Dec 2012 05:16:47 GMT
Content-Type: text/html;charset=utf-8
Set-Cookie: session_id=7d492a13dd0ebd4b3991c55d4eede1d8ec40c518; expires=Sun, 02 Dec 2012 15:16:47 GMT; Path=/

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
    <title>500 Internal Server Error</title>
    <style type="text/css">
    #powered_by {
        margin-top: 20px;
        border-top: 2px solid black;
        font-style: italic;
    }

    #traceback {
        color: red;
    }
    </style>
</head>
    <body>
        <h2>500 Internal Server Error</h2>
        <p>The server encountered an unexpected condition which prevented it from fulfilling the request.</p>
        <pre id="traceback">Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/cherrypy/_cprequest.py", line 656, in respond
    response.body = self.handler()
  File "/usr/lib/python2.6/site-packages/cherrypy/lib/encoding.py", line 188, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/saltapi/netapi/rest_cherrypy/__init__.py", line 141, in hypermedia_handler
    'message': '{0}'.format(exc) if cherrypy.config['debug']
KeyError: 'debug'
</pre>
    <div id="powered_by">
    <span>Powered by <a href="http://www.cherrypy.org">CherryPy 3.2.2</a></span>
    </div>
    </body>
</html>

Log entry- http://pastebin.com/w1rRUe06

Updated because github's rich text editor mangled the log blob.

from salt-api.

whiteinge avatar whiteinge commented on August 13, 2024

This should be returning a 401 response as of fc99a10. Also there was a contributing issue in Salt saltstack/salt#3048 with short-lived tokens.

from salt-api.

whiteinge avatar whiteinge commented on August 13, 2024

@dthom91 Have you had a chance to upgrade? Are you still seeing this error?

from salt-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.