From df800efc385c4cda626a77ce9fb9c85ee39cbf80 Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Wed, 3 Jun 2015 13:50:21 -0500 Subject: [PATCH] Allow the Horizon SESSION_TIMEOUT to be configured This will only configure the variable if the horizon_session_timeout user variable is defined. DocImpact Closes-bug: #1461623 Change-Id: Idd9eb58651f6e45bfdb5a65c2529c2e2f0b45f09 --- defaults/main.yml | 4 ++++ templates/horizon_local_settings.py.j2 | 3 +++ 2 files changed, 7 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 38a0ed62..6b8eaee1 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -35,6 +35,10 @@ horizon_service_name: horizon horizon_galera_database: dash horizon_galera_user: dash +## Session configuration +# Specifies the timespan in seconds inactivity, until a user is considered as +# logged out +horizon_session_timeout: 1800 ## Horizon Help URL Path horizon_help_url: http://docs.openstack.org diff --git a/templates/horizon_local_settings.py.j2 b/templates/horizon_local_settings.py.j2 index 964ffd7c..833daab6 100644 --- a/templates/horizon_local_settings.py.j2 +++ b/templates/horizon_local_settings.py.j2 @@ -39,6 +39,9 @@ ALLOWED_HOSTS = ['*'] CSRF_COOKIE_SECURE = True SESSION_COOKIE_SECURE = True +# Define the time after which a Horizon session expires +SESSION_TIMEOUT = {{ horizon_session_timeout }} + # Overrides for OpenStack API versions. Use this setting to force the # OpenStack dashboard to use a specific API version for a given service API. # NOTE: The version should be formatted as it appears in the URL for the