Added session timeout config option

Added a configurable session timeout for Horizon logouts. The default
session timeout is set to 1800 seconds (which is the default if not
configured).

Change-Id: Ide178e49154a7d93c14f3ec38d81a411a151c9fb
This commit is contained in:
Kalle Happonen 2015-12-28 10:31:30 +02:00
parent c224677fae
commit 32569ef655
3 changed files with 11 additions and 1 deletions

View File

@ -256,6 +256,11 @@
# of data fetched by default when rendering the Overview panel.
# Defaults to undef.
#
# [*session_timeout*]
# (optional) The session timeout for horizon in seconds. After this manys seconds of inavtivity
# the user is logged out.
# Defaults to 1800.
#
# === Examples
#
# class { 'horizon':
@ -316,6 +321,7 @@ class horizon(
$keystone_default_domain = undef,
$image_backend = {},
$overview_days_range = undef,
$session_timeout = 1800,
# DEPRECATED PARAMETERS
$can_set_mount_point = undef,
$vhost_extra_params = undef,

View File

@ -118,7 +118,8 @@ describe 'horizon' do
:api_versions => {'identity' => 3},
:keystone_multidomain_support => true,
:keystone_default_domain => 'domain.tld',
:overview_days_range => 1
:overview_days_range => 1,
:session_timeout => 1800,
})
end
@ -156,6 +157,7 @@ describe 'horizon' do
"CUSTOM_THEME_PATH = 'static/themes/green'",
" 'level': 'DEBUG',",
" 'handlers': ['syslog'],",
"SESSION_TIMEOUT = 1800",
'COMPRESS_OFFLINE = False',
"FILE_UPLOAD_TEMP_DIR = '/var/spool/horizon'",
"OVERVIEW_DAYS_RANGE = 1"

View File

@ -617,6 +617,8 @@ LOGIN_URL = '<%= scope.lookupvar("horizon::params::root_url") %>/auth/login/'
LOGOUT_URL = '<%= scope.lookupvar("horizon::params::root_url") %>/auth/logout/'
LOGIN_REDIRECT_URL = '<%= scope.lookupvar("horizon::params::root_url") %>'
SESSION_TIMEOUT = <%= @session_timeout %>
# The Ubuntu package includes pre-compressed JS and compiled CSS to allow
# offline compression by default. To enable online compression, install
# the python-lesscpy package and disable the following option.