Commit Graph

55 Commits

Author SHA1 Message Date
Benjamin Dauvergne 4bb08f8d7c fix use of isinstance 2016-04-23 17:04:01 +02:00
Benjamin Dauvergne 3677cd0c19 flatten some config string to str (fixes #10416) 2016-03-24 16:24:41 +01:00
Jérôme Schneider 9bc2c9eb4b on_request: allow hook to return a reponse
Closes #6130
2015-01-27 11:57:18 +01:00
Jérôme Schneider 842a8de945 mandaye/server.py: check if HTTP_COOKIES is not None 2014-10-08 18:07:11 +02:00
Jérôme Schneider 6d0cb0b997 server: remove cookies with bad key
Closes #5606
2014-10-01 14:51:25 +02:00
Jérôme Schneider c62aae3856 backends: complete rewrite of the interface
The old interface was to specific for sqlalchemy this new one allow to
write new backends

WARNING: this commit could break compability for some filter which uses
the old interface
2014-09-10 18:51:54 +02:00
Jérôme Schneider d02c86c77e servers: don't crash when we have a CookieError juste don't keep the
cookie
2014-09-04 18:09:05 +02:00
Jérôme Schneider 02e4ff0d04 dispatcher: improved condition management and force response to be unique
Fixes #716
2014-07-09 14:30:45 +02:00
Jérôme Schneider 83d4065f1e mandaye: fix RAW_URI management 2014-05-28 19:58:14 +02:00
Jérôme Schneider 8946f5e40d now using logging.config.dictConfig
Fixes #4853
2014-05-27 18:38:44 +02:00
Jérôme Schneider e66e0f6a28 add raven support only for exception
Fixes #3889
2014-05-27 13:20:27 +02:00
Jérôme Schneider de6e5967b5 initial import for branch 0.8
This is a complete rewrite of the configuration system

Fixes #4666
2014-05-21 13:15:40 +02:00
Jérôme Schneider 4061796d5e auth/authform.py: improved disacosiation for multi accounts 2014-04-16 12:26:53 +02:00
Jérôme Schneider a7fab0ee2b mandaye:fix multi accounts support 2014-04-15 19:35:22 +02:00
Jérôme Schneider c71e55c06d improving cache management (304 status) 2013-12-03 17:19:43 +01:00
Jérôme Schneider affb13dea2 server: manage local request change
* mandaye/auth/authform.py: clear crypt and decrypt password
 * mandaye/server.py: manage local request change by creating a new
 * dispatcher
2013-06-04 19:20:10 +02:00
Jérôme Schneider 440a24d1c1 saml2: implement slo initiated by IdP and improve slo implementation 2013-05-30 19:04:09 +02:00
Jérôme Schneider b5f19ef9c7 config: allow external application to modify config 2013-05-22 18:46:50 +02:00
Jérôme Schneider 0aaa601bbb Improve logging system: add a uuid and use a specific Mandaye logger
* README.rst: typo
 * mandaye/__init__.py: move logging part to log.py
 * mandaye/auth/authform.py: replace logging by mandaye logger and
   check if pycrpto is installed
 * mandaye/auth/vincennes.py: replace logging by mandaye logger
 * mandaye/config.py: improve comment on encryption
 * mandaye/dispatcher.py: replace logging by mandaye logger and
   add new debug
 * mandaye/emails.py: replace logging by mandaye logger
 * mandaye/filters/vincennes.py: replace logging by mandaye logger
 * mandaye/http.py: replace logging by mandaye logger
 * mandaye/log.py: new file to manage logging
 * mandaye/response.py: replace logging by mandaye logger and
   add debug informations
 * mandaye/server.py: replace logging by mandaye logger and
    add an uuid for the log
 * mandaye_admin.py: replace logging by mandaye logger
 * mandaye_server.py: replace logging by mandaye logger and fix Python
   path
2011-12-23 11:17:15 +01:00
Jérôme Schneider 417b837019 Fix #1154: replace gevent by gunicorn, improve README.txt and
create a mandaye_admin.py script
2011-12-21 18:28:36 +01:00
Jérôme Schneider efe8d23481 Manage auto login for Vincennes based on the referer
* mandaye/auth/authform.py: don't use local_auth anymore
 * mandaye/auth/espacefamille.py: overload VincennesAuth
 * mandaye/auth/vincennes.py: add auto_login and auto_connection.
 VincennesAuth now overload AuthForm
 * mandaye/configs/biblio_vincennes.py: add auto login support
 * mandaye/configs/duonet_vincennes.py: add auto login support
 * mandaye/configs/famille_vincennes.py: add auto login support
 * mandaye/filters/vincennes.py: cosmetic
 * mandaye/configs/vincennes.py: removed
 * mandaye/http.py: add target in the request class
 * mandaye/server.py: add support of target in the request

WARNING: the auto login doesn't work with Duonet
2011-11-17 18:47:47 +01:00
Jérôme Schneider cf08d49541 Support X-Forwarded-Scheme header 2011-11-10 16:43:56 +01:00
root 196358593a fix cookie treatment in server.get_response
- format the unix time expire attribute before giving it to the
   Cookie.BaseCookie class.
 - only set the domain attribute if it is a subdomaine domain cookie
   (Cookijar is forging a domain attribute if none is given).
2011-10-17 15:52:02 +02:00
Benjamin Dauvergne 34d9bfad93 add better formatting of exceptions, use xtraceback package
* use xtraceback to format exceptions
 * log exceptions and environment
 *
2011-10-13 15:43:46 +02:00
root 2208107ccd wrap request handling so that it .rollback() on exception and commit() on success
also properly close the current sql_sesion at the end.
2011-10-11 15:41:59 +02:00
Thomas NOËL d8ee602783 env may have empty CONTENT_LENGHT and CONTENT_TYPE 2011-10-10 23:10:13 +02:00
Jérôme Schneider 810e36b9ee Add multi accounts on the associate page 2011-10-07 19:11:40 +02:00
Jérôme Schneider ed61949fbc Duonet multi accounts now working 2011-10-06 10:57:51 +02:00
Jérôme Schneider df69fe6711 Fix multi accounts association and begin duonet multi accounts 2011-10-05 19:10:41 +02:00
Jérôme Schneider 71cdd79c0e Add static management and improving multi account support
* mandaye/auth/authform.py: create a method to login external users
 * mandaye/config.py: add static root directory
 * mandaye/filters/vincennes.py: improve multi accounts
 * mandaye/server.py: add support for static folder
 * mandaye/templates/biblio/multicompte.html: improve multi accounts
 interface
2011-10-05 15:51:24 +02:00
Jérôme Schneider 9c09e543ff Add an option to force the http scheme 2011-09-30 19:27:23 +02:00
Jerome Schneider 89a800b183 Disable gevent dns and add famille test mapping 2011-09-30 16:52:14 +00:00
Jérôme Schneider d9fe22da99 Fix #707: SimpleCookie add quotes in the cookies
So I replace SimpleCookie by BaseCookie
2011-09-29 15:39:03 +02:00
Jérôme Schneider a9f1e151d6 Logging: enable syslog and add some messages (#706) 2011-09-28 16:08:26 +02:00
Jérôme Schneider dc632a3d46 Cleaning server.py 2011-09-26 16:45:40 +02:00
Jérôme Schneider 5a44802138 Fix biblio association html 2011-09-26 16:42:39 +02:00
Jérôme Schneider 1bafd752d9 Fix url formatting and the login search in db 2011-09-23 10:41:24 +02:00
Jérôme Schneider b316506ed2 Improve authform and begin duonet support
* mandaye/auth/authform.py: add action auto detection
 * mandaye/configs/duonet_vincennes.py: begin duonet mapping
 * mandaye/server.py: improve cookiejar support in get_response
 * mandaye/templates/duonet_associate.html: the associate template
 * mandaye/filters/vincennes.py: begin duonet support
2011-09-22 12:31:46 +02:00
Jérôme Schneider 133a9a931f Improve pwd replay and debug support 2011-09-21 19:34:02 +02:00
Jérôme Schneider 4ad9e6c9e7 Harmonize get response, improve HTTPRequest and cleaning association 2011-09-19 19:18:32 +02:00
Jérôme Schneider e6fc815ff5 Finish mono account management for biblio, improve mapping management
and fix model

 * mandaye/__init__.py: load sqlachemy session
 * mandaye/auth/authform.py: add account management
 * mandaye/auth/vincennes.py: add account management
 * mandaye/configs/biblio_vincennes.py: add vincennes conf
 * mandaye/dispatcher.py; improve mapping management
2011-09-16 19:13:17 +02:00
Jérôme Schneider 7285c43a26 Redisgn mapping to be more fexible, use only one dispatcher and begin
password / site association

* auth/authform.py: class to allow auth form
* config.py: new configuration
* dispatchers/default.py -> dispatcher.py: move default dispatcher
* server.py: change to support the new conf file
* templates/associate.html: html template to associate an account
2011-09-13 19:13:14 +02:00
Jérôme Schneider 6d64b0d2f9 Fix setup.py, fix _404 response and cleaning config file
* mandaye/__init__.py: add mandaye version
* mandaye/config.py: remove Vincennes configuration from the main config
* mandaye/response.py: fix _404 logging
* mandaye/server.py: fix _404 call
* setup.py: rename find_packages
2011-09-12 19:04:36 +02:00
Jérôme Schneider 516df263c4 Add a debug mode and add regexp support for the mapping
* mandaye/config.py: add a generic filter for biblio
 * mandaye/dispatchers/auth.py: improve error management
 * mandaye/dispatchers/default.py: improve mapping support
 * mandaye/filters/vincennes.py: improve error management
 * mandaye/response.py: add debug support and improve the responses
 * mandaye/server.py: improve bad gateway suppport
2011-09-12 16:33:29 +02:00
Jérôme Schneider 7afc5c247d New dispatcher for form authentification, improve mapping support,
add templates support and big cleaning

 * TODO: new file
 * mandaye/config.py: change next_url for biblio mapping and add local
 configuration support
 * mandaye/dispatchers/auth.py: rename authentification dispatcher
 * mandaye/dispatchers/default.py: improve the default dispatcher
 * mandaye/dispatchers/vincennes.py: login through the compte citoyen
 * mandaye/filters/vincennes.py: add a login biblio html filter
 * mandaye/http.py: fix HTTPResponse
 * mandaye/response.py: improve the responses
 * mandaye/server.py: cleaning
 * mandaye/templates/response.html: html template for the responses
 * setup.py: add breaker, sqlalchemy and mako
2011-09-09 17:59:22 +02:00
Jérôme Schneider 2b114abe74 Fix hook call and cleaning
* mandaye/dispatchers/default.py: fix hook call
2011-09-06 19:35:15 +02:00
Jérôme Schneider fff050a09b Impletation of the new mapping 2011-09-06 19:11:30 +02:00
Jérôme Schneider a3e3adba46 Working revision: Add mapping configuration and a begin to supoort
session
2011-09-02 19:28:49 +02:00
Jérôme Schneider df2bb7d0e6 Password replay works for biblio vincennes 2011-09-01 18:54:15 +02:00
Jérôme Schneider 4cf4f02350 Begin biblio support 2011-08-31 19:54:24 +02:00