To comply with security guidelines, we need to destroy the session when a user logs out. This means that the session's key in the Redis cache needs to be deleted. Flask expects to _always_ have a session object. If the current session object does not exist in the Redis cache, Flask will reserialize and store it at the end of the request. In order for session deletion to work, we need to delete the key for the existing session and then replace the session object with a new, empty one. This also updates the SessionLimiter class so that the session prefix is configurable.
52 lines
1.1 KiB
INI
52 lines
1.1 KiB
INI
[default]
|
|
ASSETS_URL
|
|
AZURE_ACCOUNT_NAME
|
|
AZURE_STORAGE_KEY
|
|
AZURE_TO_BUCKET_NAME
|
|
AZURE_POLICY_LOCATION=policies
|
|
BLOB_STORAGE_URL=http://localhost:8000/
|
|
CAC_URL = http://localhost:8000/login-redirect
|
|
CA_CHAIN = ssl/server-certs/ca-chain.pem
|
|
CDN_ORIGIN=http://localhost:8000
|
|
CELERY_DEFAULT_QUEUE=celery
|
|
CONTRACT_END_DATE = 2022-09-14
|
|
CONTRACT_START_DATE = 2019-09-14
|
|
CRL_FAIL_OPEN = false
|
|
CRL_STORAGE_CONTAINER = crls
|
|
CSP=mock
|
|
DEBUG = true
|
|
DEBUG_MAILER = false
|
|
DISABLE_CRL_CHECK = false
|
|
ENVIRONMENT = dev
|
|
LIMIT_CONCURRENT_SESSIONS = false
|
|
LOG_JSON = false
|
|
MAIL_PASSWORD
|
|
MAIL_PORT
|
|
MAIL_SENDER
|
|
MAIL_SERVER
|
|
MAIL_TLS
|
|
PERMANENT_SESSION_LIFETIME = 1800
|
|
PGDATABASE = atat
|
|
PGHOST = localhost
|
|
PGPASSWORD = postgres
|
|
PGPORT = 5432
|
|
PGSSLMODE = prefer
|
|
PGSSLROOTCERT
|
|
PGUSER = postgres
|
|
PORT=8000
|
|
REDIS_HOST=localhost:6379
|
|
REDIS_PASSWORD
|
|
REDIS_TLS=False
|
|
REDIS_USER
|
|
SECRET_KEY = change_me_into_something_secret
|
|
SERVER_NAME
|
|
SESSION_COOKIE_NAME=atat
|
|
SESSION_COOKIE_DOMAIN
|
|
SESSION_KEY_PREFIX=session:
|
|
SESSION_TYPE = redis
|
|
SESSION_USE_SIGNER = True
|
|
SQLALCHEMY_ECHO = False
|
|
STATIC_URL=/static/
|
|
USE_AUDIT_LOG = false
|
|
WTF_CSRF_ENABLED = true
|