changeset 1710:79a06e68a035 beta

changed session to client side encrypted cookie, for better horizontal scalability of rhodecode
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 21 Nov 2011 19:31:23 +0200
parents 5ca2a5e96793
children b369bec5d468
files development.ini production.ini rhodecode/config/deployment.ini_tmpl
diffstat 3 files changed, 22 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/development.ini	Mon Nov 21 03:26:48 2011 +0200
+++ b/development.ini	Mon Nov 21 19:31:23 2011 +0200
@@ -137,10 +137,10 @@
 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
 #beaker.session.table_name = db_session 
 
-beaker.session.type = file
-
+beaker.session.type = cookie
 beaker.session.key = rhodecode
-beaker.session.secret = g654dcno0-9873jhgfreyu
+beaker.session.encrypt_key = g654dcno0-9873jhgfreyu
+beaker.session.validate_key = 9712sds2212c--zxc123
 beaker.session.timeout = 36000
 
 ##auto save the session to not to use .save()
--- a/production.ini	Mon Nov 21 03:26:48 2011 +0200
+++ b/production.ini	Mon Nov 21 19:31:23 2011 +0200
@@ -56,13 +56,14 @@
 container_auth_enabled = false
 proxypass_auth_enabled = false
 
-## available vars
-## scheme - http/https
-## user - current user
-## pass - password 
-## netloc - network location
-## path - usually repo_name
-clone_uri = {scheme}://{user}{pass}{netloc}{path}
+## overwrite schema of clone url
+# available vars:
+# scheme - http/https
+# user - current user
+# pass - password 
+# netloc - network location
+# path - usually repo_name
+# clone_uri = {scheme}://{user}{pass}{netloc}{path}
 
 ####################################
 ###        CELERY CONFIG        ####
@@ -136,10 +137,10 @@
 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
 #beaker.session.table_name = db_session 
 
-beaker.session.type = file
-
+beaker.session.type = cookie
 beaker.session.key = rhodecode
-beaker.session.secret = g654dcno0-9873jhgfreyu
+beaker.session.encrypt_key = g654dcno0-9873jhgfreyu
+beaker.session.validate_key = 9712sds2212c--zxc123
 beaker.session.timeout = 36000
 
 ##auto save the session to not to use .save()
--- a/rhodecode/config/deployment.ini_tmpl	Mon Nov 21 03:26:48 2011 +0200
+++ b/rhodecode/config/deployment.ini_tmpl	Mon Nov 21 19:31:23 2011 +0200
@@ -131,10 +131,16 @@
 ## dbm, file, memcached, database, and memory. 
 ## The storage uses the Container API 
 ##that is also used by the cache system.
-beaker.session.type = file
 
+#db session example
+#beaker.session.type = ext:database
+#beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
+#beaker.session.table_name = db_session 
+
+beaker.session.type = cookie
 beaker.session.key = rhodecode
-beaker.session.secret = ${app_instance_secret}
+beaker.session.encrypt_key = ${app_instance_secret}
+beaker.session.validate_key = ${app_instance_secret}
 beaker.session.timeout = 36000
 
 ##auto save the session to not to use .save()
@@ -142,7 +148,6 @@
 
 ##true exire at browser close
 #beaker.session.cookie_expires = 3600
-
     
 ################################################################################
 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*  ##