Merge "Selectively disable token caching"

This commit is contained in:
Zuul 2017-12-07 03:07:30 +00:00 committed by Gerrit Code Review
commit 40b4f46cc2
4 changed files with 9 additions and 0 deletions

View File

@ -173,6 +173,8 @@ PLUGIN_SETTINGS = CONFIG.get('PLUGIN_SETTINGS', {})
ROLES_MAPPING = CONFIG['ROLES_MAPPING']
TOKEN_CACHE_TIME = CONFIG.get('TOKEN_CACHE_TIME', 60)
PROJECT_QUOTA_SIZES = CONFIG.get('PROJECT_QUOTA_SIZES')
QUOTA_SIZES_ASC = CONFIG.get('QUOTA_SIZES_ASC', [])

View File

@ -386,6 +386,8 @@ QUOTA_SIZES_ASC = ['small', 'medium', 'large']
SHOW_ACTION_ENDPOINTS = True
TOKEN_CACHE_TIME = 60
conf_dict = {
"DEBUG": True,
"SECRET_KEY": SECRET_KEY,
@ -405,4 +407,5 @@ conf_dict = {
"PROJECT_QUOTA_SIZES": PROJECT_QUOTA_SIZES,
"SHOW_ACTION_ENDPOINTS": SHOW_ACTION_ENDPOINTS,
"QUOTA_SIZES_ASC": QUOTA_SIZES_ASC,
"TOKEN_CACHE_TIME": TOKEN_CACHE_TIME,
}

View File

@ -45,5 +45,6 @@ conf = {
"auth_url": settings.KEYSTONE['auth_url'],
'delay_auth_decision': True,
'include_service_catalog': False,
'token_cache_time': settings.TOKEN_CACHE_TIME,
}
application = AuthProtocol(application, conf)

View File

@ -410,6 +410,9 @@ PROJECT_QUOTA_SIZES:
router: 10
port: 500
# Time in seconds to cache token from Keystone
TOKEN_CACHE_TIME: 600
# Ordered list of quota sizes from smallest to biggest
QUOTA_SIZES_ASC:
- small