python - Why CherryPy session does not require a secret key? -
python - Why CherryPy session does not require a secret key? -
i noticed cherrypy session not require secret key configuration. on contrary, pylons session does: http://docs.pylonsproject.org/projects/pylons_framework/dev/sessions.html
i'm concerned security issues if i'm using session remember user authentication.
any 1 can explain why cherrypy session not need secret key? or there suggestion how should create secure utilize session remember user login?
there 2 different ways of maintaining session state: on server or on client.
with server-side approach, maintain session info in files, database, or in memory on server , assign id it. session id sent client , stored in cookie (although can embedded in urls). each request, client's session id read , used web application load session info wherever it's stored on server. way, client never has access of session info , can't tamper it, downside have protect against session hijacking through utilize of stale session ids malicious clients. model used web frameworks , applications today.
another approach store session info on client side within of cookies. downside approach info can seen , tampered client, have take care sign , encrypt info prevent tampering. having secret key comes play. upside don't have worry session hijacking.
pylons uses beaker sessions, can configured store session info on client side. that's why need secret key.
cherrypy stores session info on server , sends user cookie session id, client never sees session info , can't tamper it. can configure utilize files or maintain in memory. can hook , utilize database store session info in.
personally, prefer approach used cherrypy, since it's same approach used bulk of web. it's easier secure, , can share session info other applications running on server without worrying encryption or keys.
python pylons web-frameworks cherrypy
Comments
Post a Comment