Commit Graph
17 Commits
Author SHA1 Message Date
Cédric Krier 5a7aca31ea Manage session with max_age and timeout
and clear session when password is changed.

The sessions are checked using on a fix maximum age of 30 days using the
create_date value. The write_date is updated as long as the delay of the last
update is not bigger than the session timeout.
RPC can request a fresh session. A fresh session is a session that was updated
last time before the session timeout. If it is not the case, the session is
deleted and a request to create a new session is sent to the client.
All the sessions of the users for which the password has been changed are also
deleted in order to ensure that stolen session can no more be used.
We use this new feature for set_preferences of user instead of duplicate the
login mechanism.

issue7568
review53331002
2018-08-26 18:04:05 +02:00
Cédric Krier 7a2ce7905a Add __table_handler__ to ModelSQL
issue7581
review48531002
2018-07-24 22:01:08 +02:00
Cédric Krier 1c32a02b64 Simplify API for Session
- Allow to extend session management with a domain
- Let security manage the logging
- Let check differentiate expired session and session that does not exist

issue7134
review39171002
2018-03-07 00:34:09 +01:00
Cédric Krier bd8214a6a9 Ensure Session key is different on bunch creation
issue7087
review40041002
2018-02-07 00:35:46 +01:00
Cédric Krier 34cb03bd1e Increase session randomness to 32 bytes
issue6682
review35521002
2017-08-02 23:11:34 +02:00
Cédric Krier f9c0457416 Remove support for simplejson
On Python 3, simplejson has a different behaviour than the stdlib json,
especially for dumping bytes.

issue6010
review33601002
2016-11-05 19:54:12 +01:00
Nicolas Évrard 2fef479575 Follow PEP-0249 for Transaction and backends
issue4949
review19781002
2016-03-03 21:51:57 +01:00
Cédric Krier c144f8c349 Fix most flake8 errors
review8771002
2014-12-02 12:54:01 +01:00
Cédric Krier e0b995abbe Refactore configuration to allow easy extention
issue3627
review7401002
2014-09-03 23:32:01 +02:00
Cédric Krier fc6c6cfdda Migration to python-sql
* Use python-sql
* Add convert_domain method on Fields
* Add sql_format and sql_type methods on Fields
* Allow to return a full domain for Function.searcher
* Replace static backend by dynamic get method
* Replace order_field by order_<field name> method

review1001002
2013-09-06 22:32:37 +02:00
Cédric Krier 0fe1b93864 Active Record 2012-09-24 22:16:53 +02:00
Cédric Krier 02176f79cc Rename User.connections into User.sessions and manage timeout
review469004
2012-08-23 23:24:19 +02:00
Cédric Krier ee3be37a36 Fix pep8 and pyflakes 2012-04-01 23:08:15 +02:00
Cédric Krier c183cebc9e total_seconds new in version 2.7
issue2397
review226003
2012-01-17 13:59:47 +01:00
Cédric Krier 7d457f46c4 Store session in database
review210012
2012-01-11 20:30:27 +01:00
Cédric Krier 7d8f845fbb Prevent read/write/delete from RPC on wizard.session 2012-01-06 18:59:19 +01:00
Cédric Krier 274ea7bee2 New wizard design
review167001
2012-01-02 17:48:17 +01:00