Changeset - 79a06e68a035
[Not reviewed]
beta
0 3 0
Marcin Kuzminski - 14 years ago 2011-11-21 18:31:23
marcin@python-works.com
changed session to client side encrypted cookie, for better horizontal scalability of rhodecode
3 files changed with 22 insertions and 16 deletions:
0 comments (0 inline, 0 general)
development.ini
Show inline comments
 
@@ -137,10 +137,10 @@ beaker.cache.sql_cache_long.key_length =
 
#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()
production.ini
Show inline comments
 
@@ -56,13 +56,14 @@ use_gravatar = true
 
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.cache.sql_cache_long.key_length =
 
#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()
rhodecode/config/deployment.ini_tmpl
Show inline comments
 
@@ -131,10 +131,16 @@ beaker.cache.sql_cache_long.key_length =
 
## 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 @@ beaker.session.auto = False
 

	
 
##true exire at browser close
 
#beaker.session.cookie_expires = 3600
 

	
 
    
 
################################################################################
 
## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*  ##
0 comments (0 inline, 0 general)