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
 
@@ -134,16 +134,16 @@ beaker.cache.sql_cache_long.key_length =
 

	
 
#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 = 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()
 
beaker.session.auto = False
 

	
 
##true exire at browser close
production.ini
Show inline comments
 
@@ -53,19 +53,20 @@ cut_off_limit = 256000
 
force_https = false 
 
commit_parse_limit = 50
 
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        ####
 
####################################
 
use_celery = false
 
broker.host = localhost
 
@@ -133,16 +134,16 @@ beaker.cache.sql_cache_long.key_length =
 

	
 
#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 = 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()
 
beaker.session.auto = False
 

	
 
##true exire at browser close
rhodecode/config/deployment.ini_tmpl
Show inline comments
 
@@ -128,25 +128,30 @@ beaker.cache.sql_cache_long.key_length =
 
###       BEAKER SESSION        ####
 
####################################
 
## Type of storage used for the session, current types are 
 
## 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()
 
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*  ##
 
## Debug mode will enable the interactive debugging tool, allowing ANYONE to  ##
 
## execute malicious code after an exception is raised.                       ##
 
################################################################################
 
set debug = false
0 comments (0 inline, 0 general)