keystone  18.0.0
About: OpenStack Keystone (Core Service: Identity) provides an authentication and authorization service for other OpenStack services. Provides a catalog of endpoints for all OpenStack services.
The "Victoria" series (maintained release).
  Fossies Dox: keystone-18.0.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

receipt.py
Go to the documentation of this file.
1 # Copyright 2018 Catalyst Cloud Ltd
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may
4 # not use this file except in compliance with the License. You may obtain
5 # a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations
13 # under the License.
14 
15 from oslo_config import cfg
16 
17 from keystone.conf import utils
18 
19 
20 expiration = cfg.IntOpt(
21  'expiration',
22  default=300,
23  min=0,
24  max=86400,
25  help=utils.fmt("""
26 The amount of time that a receipt should remain valid (in seconds). This value
27 should always be very short, as it represents how long a user has to reattempt
28 auth with the missing auth methods.
29 """))
30 
31 provider = cfg.StrOpt(
32  'provider',
33  default='fernet',
34  help=utils.fmt("""
35 Entry point for the receipt provider in the `keystone.receipt.provider`
36 namespace. The receipt provider controls the receipt construction and
37 validation operations. Keystone includes just the `fernet` receipt provider for
38 now. `fernet` receipts do not need to be persisted at all, but require that you
39 run `keystone-manage fernet_setup` (also see the `keystone-manage
40 fernet_rotate` command).
41 """))
42 
43 caching = cfg.BoolOpt(
44  'caching',
45  default=True,
46  help=utils.fmt("""
47 Toggle for caching receipt creation and validation data. This has no effect
48 unless global caching is enabled, or if cache_on_issue is disabled as we only
49 cache receipts on issue.
50 """))
51 
52 cache_time = cfg.IntOpt(
53  'cache_time',
54  default=300,
55  min=0,
56  help=utils.fmt("""
57 The number of seconds to cache receipt creation and validation data. This has
58 no effect unless both global and `[receipt] caching` are enabled.
59 """))
60 
61 cache_on_issue = cfg.BoolOpt(
62  'cache_on_issue',
63  default=True,
64  help=utils.fmt("""
65 Enable storing issued receipt data to receipt validation cache so that first
66 receipt validation doesn't actually cause full validation cycle. This option
67 has no effect unless global caching and receipt caching are enabled.
68 """))
69 
70 
71 GROUP_NAME = __name__.split('.')[-1]
72 ALL_OPTS = [
73  expiration,
74  provider,
75  caching,
76  cache_time,
77  cache_on_issue,
78 ]
79 
80 
81 def register_opts(conf):
82  conf.register_opts(ALL_OPTS, group=GROUP_NAME)
83 
84 
85 def list_opts():
86  return {GROUP_NAME: ALL_OPTS}
keystone.conf.receipt.list_opts
def list_opts()
Definition: receipt.py:85
keystone.conf.receipt.register_opts
def register_opts(conf)
Definition: receipt.py:81
keystone.conf
Definition: __init__.py:1