https://github.com/ging/horizon
Revision 4824239730cf628df20d28d0e72ec02c4f7139a8 authored by Yves-Gwenael Bourhis on 17 April 2014, 09:18:00 UTC, committed by Yves-Gwenael Bourhis on 25 September 2014, 13:06:19 UTC
If both the keystone token and the session expired, the user was asked to login
twice. This is because the token expiration was not checked.
When a user had timed out both in session and keystone token validity, the user
was asked to log in, then the timestamp was checked, and the user logged out
again and asked to log in a second time.

We now check both the timestamp and keystone token validity before
authentication validity and force back the login page to retrieve a new
keystone token, avoiding the timeout race condition between session and token
validity which was forcing a dual login. A keystone token expiration is now
considered as a session timeout too.

Also, a page can start loading while the token is valid, and finish while it's
invalid. This was leading to errors during the page loading.
We now set a TOKEN_TIMEOUT_MARGIN period in seconds which allows defining
a margin before which we consider the token as expired.
This is a configurable parameter in the django settings because the time a page
takes to render is infra and deployment specific. This margin is preset to
ten seconds.

Requires: https://review.openstack.org/101556

Closes-Bug: 1308918

Change-Id: I0bf0d079a9dc000c1a30f0e20dcaa03b22d63e51
1 parent d614789
History
Tip revision: 4824239730cf628df20d28d0e72ec02c4f7139a8 authored by Yves-Gwenael Bourhis on 17 April 2014, 09:18:00 UTC
Checking session timeout before authentication
Tip revision: 4824239
File Mode Size
.tx
doc
horizon
openstack_dashboard
tools
.gitignore -rw-r--r-- 415 bytes
.gitreview -rw-r--r-- 76 bytes
.mailmap -rw-r--r-- 581 bytes
.pylintrc -rw-r--r-- 1.4 KB
CONTRIBUTING.rst -rw-r--r-- 593 bytes
HACKING.rst -rw-r--r-- 1.2 KB
LICENSE -rw-r--r-- 9.9 KB
MANIFEST.in -rw-r--r-- 654 bytes
Makefile -rw-r--r-- 588 bytes
README.rst -rw-r--r-- 3.0 KB
manage.py -rwxr-xr-x 838 bytes
openstack-common.conf -rw-r--r-- 233 bytes
requirements.txt -rw-r--r-- 1.9 KB
run_tests.sh -rwxr-xr-x 16.2 KB
setup.cfg -rw-r--r-- 1.0 KB
setup.py -rwxr-xr-x 1.0 KB
test-requirements.txt -rw-r--r-- 860 bytes
tox.ini -rw-r--r-- 3.3 KB

README.rst

back to top