Show More
@@ -353,46 +353,35 b' beaker.cache.sql_cache_short.key_length ' | |||||
353 | #################################### |
|
353 | #################################### | |
354 | ### BEAKER SESSION #### |
|
354 | ### BEAKER SESSION #### | |
355 | #################################### |
|
355 | #################################### | |
|
356 | ||||
|
357 | ## Name of session cookie. Should be unique for a given host and path, even when running | |||
|
358 | ## on different ports. Otherwise, cookie sessions will be shared and messed up. | |||
|
359 | beaker.session.key = kallithea | |||
|
360 | ## Sessions should always only be accessible by the browser, not directly by JavaScript. | |||
|
361 | beaker.session.httponly = true | |||
|
362 | ## Session lifetime. 2592000 seconds is 30 days. | |||
|
363 | beaker.session.timeout = 2592000 | |||
|
364 | ||||
|
365 | ## Server secret used with HMAC to ensure integrity of cookies. | |||
|
366 | beaker.session.secret = development-not-secret | |||
|
367 | ## Further, encrypt the data with AES. | |||
|
368 | #beaker.session.encrypt_key = <key_for_encryption> | |||
|
369 | #beaker.session.validate_key = <validation_key> | |||
|
370 | ||||
356 | ## Type of storage used for the session, current types are |
|
371 | ## Type of storage used for the session, current types are | |
357 | ## dbm, file, memcached, database, and memory. |
|
372 | ## dbm, file, memcached, database, and memory. | |
358 | ## The storage uses the Container API |
|
373 | ||
359 | ## that is also used by the cache system. |
|
374 | ## File system storage of session data. (default) | |
|
375 | #beaker.session.type = file | |||
360 |
|
376 | |||
361 | ## db session ## |
|
377 | ## Cookie only, store all session data inside the cookie. Requires secure secrets. | |
|
378 | #beaker.session.type = cookie | |||
|
379 | ||||
|
380 | ## Database storage of session data. | |||
362 | #beaker.session.type = ext:database |
|
381 | #beaker.session.type = ext:database | |
363 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea |
|
382 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea | |
364 | #beaker.session.table_name = db_session |
|
383 | #beaker.session.table_name = db_session | |
365 |
|
384 | |||
366 | ## encrypted cookie client side session, good for many instances ## |
|
|||
367 | #beaker.session.type = cookie |
|
|||
368 |
|
||||
369 | ## file based cookies (default) ## |
|
|||
370 | #beaker.session.type = file |
|
|||
371 |
|
||||
372 | ## beaker.session.key should be unique for a given host, even when running |
|
|||
373 | ## on different ports. Otherwise, cookie sessions will be shared and messed up. |
|
|||
374 | beaker.session.key = kallithea |
|
|||
375 | beaker.session.secret = development-not-secret |
|
|||
376 |
|
||||
377 | ## Secure encrypted cookie. Requires AES and AES python libraries |
|
|||
378 | ## you must disable beaker.session.secret to use this |
|
|||
379 | #beaker.session.encrypt_key = <key_for_encryption> |
|
|||
380 | #beaker.session.validate_key = <validation_key> |
|
|||
381 |
|
||||
382 | ## sets session as invalid if it haven't been accessed for given amount of time |
|
|||
383 | beaker.session.timeout = 2592000 |
|
|||
384 | beaker.session.httponly = true |
|
|||
385 | #beaker.session.cookie_path = /<your-prefix> |
|
|||
386 |
|
||||
387 | ## uncomment for https secure cookie |
|
|||
388 | beaker.session.secure = false |
|
|||
389 |
|
||||
390 | ## auto save the session to not to use .save() |
|
|||
391 | beaker.session.auto = False |
|
|||
392 |
|
||||
393 | ## default cookie expiration time in seconds `true` expire at browser close ## |
|
|||
394 | #beaker.session.cookie_expires = 3600 |
|
|||
395 |
|
||||
396 | ############################ |
|
385 | ############################ | |
397 | ## ERROR HANDLING SYSTEMS ## |
|
386 | ## ERROR HANDLING SYSTEMS ## | |
398 | ############################ |
|
387 | ############################ |
@@ -22,7 +22,7 b' Follow these few steps to improve perfor' | |||||
22 |
|
22 | |||
23 | 1. Increase cache |
|
23 | 1. Increase cache | |
24 |
|
24 | |||
25 |
Tweak beaker cache settings in the ini file. Th |
|
25 | Tweak beaker cache settings in the ini file. The actual effect of that | |
26 | is questionable. |
|
26 | is questionable. | |
27 |
|
27 | |||
28 | 2. Switch from sqlite to postgres or mysql |
|
28 | 2. Switch from sqlite to postgres or mysql |
@@ -351,46 +351,35 b' beaker.cache.sql_cache_short.key_length ' | |||||
351 | <%text>####################################</%text> |
|
351 | <%text>####################################</%text> | |
352 | <%text>### BEAKER SESSION ####</%text> |
|
352 | <%text>### BEAKER SESSION ####</%text> | |
353 | <%text>####################################</%text> |
|
353 | <%text>####################################</%text> | |
|
354 | ||||
|
355 | <%text>## Name of session cookie. Should be unique for a given host and path, even when running</%text> | |||
|
356 | <%text>## on different ports. Otherwise, cookie sessions will be shared and messed up.</%text> | |||
|
357 | beaker.session.key = kallithea | |||
|
358 | <%text>## Sessions should always only be accessible by the browser, not directly by JavaScript.</%text> | |||
|
359 | beaker.session.httponly = true | |||
|
360 | <%text>## Session lifetime. 2592000 seconds is 30 days.</%text> | |||
|
361 | beaker.session.timeout = 2592000 | |||
|
362 | ||||
|
363 | <%text>## Server secret used with HMAC to ensure integrity of cookies.</%text> | |||
|
364 | beaker.session.secret = ${uuid()} | |||
|
365 | <%text>## Further, encrypt the data with AES.</%text> | |||
|
366 | #beaker.session.encrypt_key = <key_for_encryption> | |||
|
367 | #beaker.session.validate_key = <validation_key> | |||
|
368 | ||||
354 | <%text>## Type of storage used for the session, current types are</%text> |
|
369 | <%text>## Type of storage used for the session, current types are</%text> | |
355 | <%text>## dbm, file, memcached, database, and memory.</%text> |
|
370 | <%text>## dbm, file, memcached, database, and memory.</%text> | |
356 | <%text>## The storage uses the Container API</%text> |
|
371 | ||
357 | <%text>## that is also used by the cache system.</%text> |
|
372 | <%text>## File system storage of session data. (default)</%text> | |
|
373 | #beaker.session.type = file | |||
358 |
|
|
374 | ||
359 | <%text>## db session ##</%text> |
|
375 | <%text>## Cookie only, store all session data inside the cookie. Requires secure secrets.</%text> | |
|
376 | #beaker.session.type = cookie | |||
|
377 | ||||
|
378 | <%text>## Database storage of session data.</%text> | |||
360 | #beaker.session.type = ext:database |
|
379 | #beaker.session.type = ext:database | |
361 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea |
|
380 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea | |
362 | #beaker.session.table_name = db_session |
|
381 | #beaker.session.table_name = db_session | |
363 |
|
382 | |||
364 | <%text>## encrypted cookie client side session, good for many instances ##</%text> |
|
|||
365 | #beaker.session.type = cookie |
|
|||
366 |
|
||||
367 | <%text>## file based cookies (default) ##</%text> |
|
|||
368 | #beaker.session.type = file |
|
|||
369 |
|
||||
370 | <%text>## beaker.session.key should be unique for a given host, even when running</%text> |
|
|||
371 | <%text>## on different ports. Otherwise, cookie sessions will be shared and messed up.</%text> |
|
|||
372 | beaker.session.key = kallithea |
|
|||
373 | beaker.session.secret = ${uuid()} |
|
|||
374 |
|
||||
375 | <%text>## Secure encrypted cookie. Requires AES and AES python libraries</%text> |
|
|||
376 | <%text>## you must disable beaker.session.secret to use this</%text> |
|
|||
377 | #beaker.session.encrypt_key = <key_for_encryption> |
|
|||
378 | #beaker.session.validate_key = <validation_key> |
|
|||
379 |
|
||||
380 | <%text>## sets session as invalid if it haven't been accessed for given amount of time</%text> |
|
|||
381 | beaker.session.timeout = 2592000 |
|
|||
382 | beaker.session.httponly = true |
|
|||
383 | #beaker.session.cookie_path = /<your-prefix> |
|
|||
384 |
|
||||
385 | <%text>## uncomment for https secure cookie</%text> |
|
|||
386 | beaker.session.secure = false |
|
|||
387 |
|
||||
388 | <%text>## auto save the session to not to use .save()</%text> |
|
|||
389 | beaker.session.auto = False |
|
|||
390 |
|
||||
391 | <%text>## default cookie expiration time in seconds `true` expire at browser close ##</%text> |
|
|||
392 | #beaker.session.cookie_expires = 3600 |
|
|||
393 |
|
||||
394 | %if error_aggregation_service == 'errormator': |
|
383 | %if error_aggregation_service == 'errormator': | |
395 | <%text>############################</%text> |
|
384 | <%text>############################</%text> | |
396 | <%text>## ERROR HANDLING SYSTEMS ##</%text> |
|
385 | <%text>## ERROR HANDLING SYSTEMS ##</%text> |
@@ -347,46 +347,35 b' beaker.cache.sql_cache_short.key_length ' | |||||
347 | #################################### |
|
347 | #################################### | |
348 | ### BEAKER SESSION #### |
|
348 | ### BEAKER SESSION #### | |
349 | #################################### |
|
349 | #################################### | |
|
350 | ||||
|
351 | ## Name of session cookie. Should be unique for a given host and path, even when running | |||
|
352 | ## on different ports. Otherwise, cookie sessions will be shared and messed up. | |||
|
353 | beaker.session.key = kallithea | |||
|
354 | ## Sessions should always only be accessible by the browser, not directly by JavaScript. | |||
|
355 | beaker.session.httponly = true | |||
|
356 | ## Session lifetime. 2592000 seconds is 30 days. | |||
|
357 | beaker.session.timeout = 2592000 | |||
|
358 | ||||
|
359 | ## Server secret used with HMAC to ensure integrity of cookies. | |||
|
360 | beaker.session.secret = ${app_instance_uuid} | |||
|
361 | ## Further, encrypt the data with AES. | |||
|
362 | #beaker.session.encrypt_key = <key_for_encryption> | |||
|
363 | #beaker.session.validate_key = <validation_key> | |||
|
364 | ||||
350 | ## Type of storage used for the session, current types are |
|
365 | ## Type of storage used for the session, current types are | |
351 | ## dbm, file, memcached, database, and memory. |
|
366 | ## dbm, file, memcached, database, and memory. | |
352 | ## The storage uses the Container API |
|
367 | ||
353 | ## that is also used by the cache system. |
|
368 | ## File system storage of session data. (default) | |
|
369 | #beaker.session.type = file | |||
354 |
|
370 | |||
355 | ## db session ## |
|
371 | ## Cookie only, store all session data inside the cookie. Requires secure secrets. | |
|
372 | #beaker.session.type = cookie | |||
|
373 | ||||
|
374 | ## Database storage of session data. | |||
356 | #beaker.session.type = ext:database |
|
375 | #beaker.session.type = ext:database | |
357 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea |
|
376 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea | |
358 | #beaker.session.table_name = db_session |
|
377 | #beaker.session.table_name = db_session | |
359 |
|
378 | |||
360 | ## encrypted cookie client side session, good for many instances ## |
|
|||
361 | #beaker.session.type = cookie |
|
|||
362 |
|
||||
363 | ## file based cookies (default) ## |
|
|||
364 | #beaker.session.type = file |
|
|||
365 |
|
||||
366 | ## beaker.session.key should be unique for a given host, even when running |
|
|||
367 | ## on different ports. Otherwise, cookie sessions will be shared and messed up. |
|
|||
368 | beaker.session.key = kallithea |
|
|||
369 | beaker.session.secret = ${app_instance_uuid} |
|
|||
370 |
|
||||
371 | ## Secure encrypted cookie. Requires AES and AES python libraries |
|
|||
372 | ## you must disable beaker.session.secret to use this |
|
|||
373 | #beaker.session.encrypt_key = <key_for_encryption> |
|
|||
374 | #beaker.session.validate_key = <validation_key> |
|
|||
375 |
|
||||
376 | ## sets session as invalid if it haven't been accessed for given amount of time |
|
|||
377 | beaker.session.timeout = 2592000 |
|
|||
378 | beaker.session.httponly = true |
|
|||
379 | #beaker.session.cookie_path = /<your-prefix> |
|
|||
380 |
|
||||
381 | ## uncomment for https secure cookie |
|
|||
382 | beaker.session.secure = false |
|
|||
383 |
|
||||
384 | ## auto save the session to not to use .save() |
|
|||
385 | beaker.session.auto = False |
|
|||
386 |
|
||||
387 | ## default cookie expiration time in seconds `true` expire at browser close ## |
|
|||
388 | #beaker.session.cookie_expires = 3600 |
|
|||
389 |
|
||||
390 | ############################ |
|
379 | ############################ | |
391 | ## ERROR HANDLING SYSTEMS ## |
|
380 | ## ERROR HANDLING SYSTEMS ## | |
392 | ############################ |
|
381 | ############################ |
@@ -123,7 +123,8 b' def log_in_user(user, remember, is_exter' | |||||
123 | session.invalidate() |
|
123 | session.invalidate() | |
124 | session['authuser'] = cookie = auth_user.to_cookie() |
|
124 | session['authuser'] = cookie = auth_user.to_cookie() | |
125 |
|
125 | |||
126 | # If they want to be remembered, update the cookie |
|
126 | # If they want to be remembered, update the cookie. | |
|
127 | # NOTE: Assumes that beaker defaults to browser session cookie. | |||
127 | if remember: |
|
128 | if remember: | |
128 | t = datetime.datetime.now() + datetime.timedelta(days=365) |
|
129 | t = datetime.datetime.now() + datetime.timedelta(days=365) | |
129 | session._set_cookie_expires(t) |
|
130 | session._set_cookie_expires(t) |
@@ -353,46 +353,35 b' beaker.cache.sql_cache_short.key_length ' | |||||
353 | #################################### |
|
353 | #################################### | |
354 | ### BEAKER SESSION #### |
|
354 | ### BEAKER SESSION #### | |
355 | #################################### |
|
355 | #################################### | |
|
356 | ||||
|
357 | ## Name of session cookie. Should be unique for a given host and path, even when running | |||
|
358 | ## on different ports. Otherwise, cookie sessions will be shared and messed up. | |||
|
359 | beaker.session.key = kallithea | |||
|
360 | ## Sessions should always only be accessible by the browser, not directly by JavaScript. | |||
|
361 | beaker.session.httponly = true | |||
|
362 | ## Session lifetime. 2592000 seconds is 30 days. | |||
|
363 | beaker.session.timeout = 2592000 | |||
|
364 | ||||
|
365 | ## Server secret used with HMAC to ensure integrity of cookies. | |||
|
366 | beaker.session.secret = {74e0cd75-b339-478b-b129-07dd221def1f} | |||
|
367 | ## Further, encrypt the data with AES. | |||
|
368 | #beaker.session.encrypt_key = <key_for_encryption> | |||
|
369 | #beaker.session.validate_key = <validation_key> | |||
|
370 | ||||
356 | ## Type of storage used for the session, current types are |
|
371 | ## Type of storage used for the session, current types are | |
357 | ## dbm, file, memcached, database, and memory. |
|
372 | ## dbm, file, memcached, database, and memory. | |
358 | ## The storage uses the Container API |
|
373 | ||
359 | ## that is also used by the cache system. |
|
374 | ## File system storage of session data. (default) | |
|
375 | #beaker.session.type = file | |||
360 |
|
376 | |||
361 | ## db session ## |
|
377 | ## Cookie only, store all session data inside the cookie. Requires secure secrets. | |
|
378 | #beaker.session.type = cookie | |||
|
379 | ||||
|
380 | ## Database storage of session data. | |||
362 | #beaker.session.type = ext:database |
|
381 | #beaker.session.type = ext:database | |
363 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea |
|
382 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea | |
364 | #beaker.session.table_name = db_session |
|
383 | #beaker.session.table_name = db_session | |
365 |
|
384 | |||
366 | ## encrypted cookie client side session, good for many instances ## |
|
|||
367 | #beaker.session.type = cookie |
|
|||
368 |
|
||||
369 | ## file based cookies (default) ## |
|
|||
370 | #beaker.session.type = file |
|
|||
371 |
|
||||
372 | ## beaker.session.key should be unique for a given host, even when running |
|
|||
373 | ## on different ports. Otherwise, cookie sessions will be shared and messed up. |
|
|||
374 | beaker.session.key = kallithea |
|
|||
375 | beaker.session.secret = {74e0cd75-b339-478b-b129-07dd221def1f} |
|
|||
376 |
|
||||
377 | ## Secure encrypted cookie. Requires AES and AES python libraries |
|
|||
378 | ## you must disable beaker.session.secret to use this |
|
|||
379 | #beaker.session.encrypt_key = <key_for_encryption> |
|
|||
380 | #beaker.session.validate_key = <validation_key> |
|
|||
381 |
|
||||
382 | ## sets session as invalid if it haven't been accessed for given amount of time |
|
|||
383 | beaker.session.timeout = 2592000 |
|
|||
384 | beaker.session.httponly = true |
|
|||
385 | #beaker.session.cookie_path = /<your-prefix> |
|
|||
386 |
|
||||
387 | ## uncomment for https secure cookie |
|
|||
388 | beaker.session.secure = false |
|
|||
389 |
|
||||
390 | ## auto save the session to not to use .save() |
|
|||
391 | beaker.session.auto = False |
|
|||
392 |
|
||||
393 | ## default cookie expiration time in seconds `true` expire at browser close ## |
|
|||
394 | #beaker.session.cookie_expires = 3600 |
|
|||
395 |
|
||||
396 | ############################ |
|
385 | ############################ | |
397 | ## ERROR HANDLING SYSTEMS ## |
|
386 | ## ERROR HANDLING SYSTEMS ## | |
398 | ############################ |
|
387 | ############################ |
General Comments 0
You need to be logged in to leave comments.
Login now