Merge "Impose a min and a max on time values in CONF.token"
This commit is contained in:
commit
db5b76cbf7
@ -11,6 +11,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import hashlib
|
import hashlib
|
||||||
|
import sys
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
@ -46,6 +47,8 @@ binding metadata be supported by keystone.
|
|||||||
expiration = cfg.IntOpt(
|
expiration = cfg.IntOpt(
|
||||||
'expiration',
|
'expiration',
|
||||||
default=3600,
|
default=3600,
|
||||||
|
min=0,
|
||||||
|
max=sys.maxsize,
|
||||||
help=utils.fmt("""
|
help=utils.fmt("""
|
||||||
The amount of time that a token should remain valid (in seconds). Drastically
|
The amount of time that a token should remain valid (in seconds). Drastically
|
||||||
reducing this value may break "long-running" operations that involve multiple
|
reducing this value may break "long-running" operations that involve multiple
|
||||||
@ -96,6 +99,8 @@ unless global caching is enabled.
|
|||||||
|
|
||||||
cache_time = cfg.IntOpt(
|
cache_time = cfg.IntOpt(
|
||||||
'cache_time',
|
'cache_time',
|
||||||
|
min=0,
|
||||||
|
max=sys.maxsize,
|
||||||
help=utils.fmt("""
|
help=utils.fmt("""
|
||||||
The number of seconds to cache token creation and validation data. This has no
|
The number of seconds to cache token creation and validation data. This has no
|
||||||
effect unless both global and `[token] caching` are enabled.
|
effect unless both global and `[token] caching` are enabled.
|
||||||
|
Loading…
Reference in New Issue
Block a user