Debian Codegraph @

manifests/keystone/authtoken.pp

raw
1 # class: vmms::keystone::authtoken
2 #
3 # Configure the keystone_authtoken section in the configuration file
4 #
5 # === Parameters
6 #
7 # [*password*]
8 # (Required) Password to create for the service user
9 #
10 # [*username*]
11 # (Optional) The name of the service user
12 # Defaults to 'vmms'
13 #
14 # [*auth_url*]
15 # (Optional) The URL to use for authentication.
16 # Defaults to 'http://localhost:5000'
17 #
18 # [*project_name*]
19 # (Optional) Service project name
20 # Defaults to 'services'
21 #
22 # [*user_domain_name*]
23 # (Optional) Name of domain for $username
24 # Defaults to 'Default'
25 #
26 # [*project_domain_name*]
27 # (Optional) Name of domain for $project_name
28 # Defaults to 'Default'
29 #
30 # [*system_scope*]
31 # (Optional) Scope for system operations.
32 # Defaults to $facts['os_service_default']
33 #
34 # [*insecure*]
35 # (Optional) If true, explicitly allow TLS without checking server cert
36 # against any certificate authorities. WARNING: not recommended. Use with
37 # caution.
38 # Defaults to $facts['os_service_default']
39 #
40 # [*auth_section*]
41 # (Optional) Config Section from which to load plugin specific options
42 # Defaults to $facts['os_service_default'].
43 #
44 # [*auth_type*]
45 # (Optional) Authentication type to load
46 # Defaults to 'password'
47 #
48 # [*www_authenticate_uri*]
49 # (Optional) Complete public Identity API endpoint.
50 # Defaults to 'http://localhost:5000'
51 #
52 # [*auth_version*]
53 # (Optional) API version of the admin Identity API endpoint.
54 # Defaults to $facts['os_service_default'].
55 #
56 # [*cache*]
57 # (Optional) Env key for the swift cache.
58 # Defaults to $facts['os_service_default'].
59 #
60 # [*cafile*]
61 # (Optional) A PEM encoded Certificate Authority to use when verifying HTTPs
62 # connections.
63 # Defaults to $facts['os_service_default'].
64 #
65 # [*certfile*]
66 # (Optional) Required if identity server requires client certificate
67 # Defaults to $facts['os_service_default'].
68 #
69 # [*delay_auth_decision*]
70 # (Optional) Do not handle authorization requests within the middleware, but
71 # delegate the authorization decision to downstream WSGI components. Boolean
72 # value
73 # Defaults to $facts['os_service_default'].
74 #
75 # [*enforce_token_bind*]
76 # (Optional) Used to control the use and type of token binding. Can be set
77 # to: "disabled" to not check token binding. "permissive" (default) to
78 # validate binding information if the bind type is of a form known to the
79 # server and ignore it if not. "strict" like "permissive" but if the bind
80 # type is unknown the token will be rejected. "required" any form of token
81 # binding is needed to be allowed. Finally the name of a binding method that
82 # must be present in tokens. String value.
83 # Defaults to $facts['os_service_default'].
84 #
85 # [*http_connect_timeout*]
86 # (Optional) Request timeout value for communicating with Identity API
87 # server.
88 # Defaults to $facts['os_service_default'].
89 #
90 # [*http_request_max_retries*]
91 # (Optional) How many times are we trying to reconnect when communicating
92 # with Identity API Server. Integer value
93 # Defaults to $facts['os_service_default'].
94 #
95 # [*include_service_catalog*]
96 # (Optional) Indicate whether to set the X-Service-Catalog header. If False,
97 # middleware will not ask for service catalog on token validation and will
98 # not set the X-Service-Catalog header. Boolean value.
99 # Defaults to $facts['os_service_default'].
100 #
101 # [*keyfile*]
102 # (Optional) Required if identity server requires client certificate
103 # Defaults to $facts['os_service_default'].
104 #
105 # [*memcache_pool_conn_get_timeout*]
106 # (Optional) Number of seconds that an operation will wait to get a memcached
107 # client connection from the pool. Integer value
108 # Defaults to $facts['os_service_default'].
109 #
110 # [*memcache_pool_dead_retry*]
111 # (Optional) Number of seconds memcached server is considered dead before it
112 # is tried again. Integer value
113 # Defaults to $facts['os_service_default'].
114 #
115 # [*memcache_pool_maxsize*]
116 # (Optional) Maximum total number of open connections to every memcached
117 # server. Integer value
118 # Defaults to $facts['os_service_default'].
119 #
120 # [*memcache_pool_socket_timeout*]
121 # (Optional) Number of seconds a connection to memcached is held unused in
122 # the pool before it is closed. Integer value
123 # Defaults to $facts['os_service_default'].
124 #
125 # [*memcache_pool_unused_timeout*]
126 # (Optional) Number of seconds a connection to memcached is held unused in
127 # the pool before it is closed. Integer value
128 # Defaults to $facts['os_service_default'].
129 #
130 # [*memcache_secret_key*]
131 # (Optional, mandatory if memcache_security_strategy is defined) This string
132 # is used for key derivation.
133 # Defaults to $facts['os_service_default'].
134 #
135 # [*memcache_security_strategy*]
136 # (Optional) If defined, indicate whether token data should be authenticated
137 # or authenticated and encrypted. If MAC, token data is authenticated (with
138 # HMAC) in the cache. If ENCRYPT, token data is encrypted and authenticated in the
139 # cache. If the value is not one of these options or empty, auth_token will
140 # raise an exception on initialization.
141 # Defaults to $facts['os_service_default'].
142 #
143 # [*memcache_use_advanced_pool*]
144 # (Optional) Use the advanced (eventlet safe) memcached client pool. The
145 # advanced pool will only work under python 2.x Boolean value
146 # Defaults to $facts['os_service_default'].
147 #
148 # [*memcached_servers*]
149 # (Optional) Optionally specify a list of memcached server(s) to use for
150 # caching. If left undefined, tokens will instead be cached in-process.
151 # Defaults to $facts['os_service_default'].
152 #
153 # [*manage_memcache_package*]
154 # (Optional) Whether to install the python-memcache package.
155 # Defaults to false.
156 #
157 # [*region_name*]
158 # (Optional) The region in which the identity server can be found.
159 # Defaults to $facts['os_service_default'].
160 #
161 # [*token_cache_time*]
162 # (Optional) In order to prevent excessive effort spent validating tokens,
163 # the middleware caches previously-seen tokens for a configurable duration
164 # (in seconds). Set to -1 to disable caching completely. Integer value
165 # Defaults to $facts['os_service_default'].
166 #
167 # [*service_token_roles*]
168 # (Optional) A choice of roles that must be present in a service token.
169 # Service tokens are allowed to request that an expired token
170 # can be used and so this check should tightly control that
171 # only actual services should be sending this token. Roles
172 # here are applied as an ANY check so any role in this list
173 # must be present. For backwards compatibility reasons this
174 # currently only affects the allow_expired check. (list value)
175 # Defaults to $facts['os_service_default'].
176 #
177 # [*service_token_roles_required*]
178 # (optional) backwards compatibility to ensure that the service tokens are
179 # compared against a list of possible roles for validity
180 # true/false
181 # Defaults to $facts['os_service_default'].
182 #
183 # [*service_type*]
184 # (Optional) The name or type of the service as it appears in the service
185 # catalog. This is used to validate tokens that have restricted access rules.
186 # Defaults to $facts['os_service_default'].
187 #
188 # [*interface*]
189 # (Optional) Interface to use for the Identity API endpoint. Valid values are
190 # "public", "internal" or "admin".
191 # Defaults to $facts['os_service_default'].
192 #
193 # [*params*]
194 # (Optional) Hash of additional parameters to pass through to the keystone
195 # authtoken class. Values set here override the individual parameters above.
196 #
197 class vmms::keystone::authtoken(
198 String[1] $password,
199 $username = 'vmms',
200 $auth_url = 'http://localhost:5000',
201 $project_name = 'services',
202 $user_domain_name = 'Default',
203 $project_domain_name = 'Default',
204 $system_scope = $facts['os_service_default'],
205 $insecure = $facts['os_service_default'],
206 $auth_section = $facts['os_service_default'],
207 $auth_type = 'password',
208 $www_authenticate_uri = 'http://localhost:5000',
209 $auth_version = $facts['os_service_default'],
210 $cache = $facts['os_service_default'],
211 $cafile = $facts['os_service_default'],
212 $certfile = $facts['os_service_default'],
213 $delay_auth_decision = $facts['os_service_default'],
214 $enforce_token_bind = $facts['os_service_default'],
215 $http_connect_timeout = $facts['os_service_default'],
216 $http_request_max_retries = $facts['os_service_default'],
217 $include_service_catalog = $facts['os_service_default'],
218 $keyfile = $facts['os_service_default'],
219 $memcache_pool_conn_get_timeout = $facts['os_service_default'],
220 $memcache_pool_dead_retry = $facts['os_service_default'],
221 $memcache_pool_maxsize = $facts['os_service_default'],
222 $memcache_pool_socket_timeout = $facts['os_service_default'],
223 $memcache_pool_unused_timeout = $facts['os_service_default'],
224 $memcache_secret_key = $facts['os_service_default'],
225 $memcache_security_strategy = $facts['os_service_default'],
226 $memcache_use_advanced_pool = $facts['os_service_default'],
227 $memcached_servers = $facts['os_service_default'],
228 $manage_memcache_package = false,
229 $region_name = $facts['os_service_default'],
230 $token_cache_time = $facts['os_service_default'],
231 $service_token_roles = $facts['os_service_default'],
232 $service_token_roles_required = $facts['os_service_default'],
233 $service_type = $facts['os_service_default'],
234 $interface = $facts['os_service_default'],
235 $params = {},
236 ) {
237
238 include vmms::deps
239
240 keystone::resource::authtoken {
241 'vmms_config':
242 * => $params;
243 default:
244 username => $username,
245 password => $password,
246 project_name => $project_name,
247 auth_url => $auth_url,
248 www_authenticate_uri => $www_authenticate_uri,
249 auth_version => $auth_version,
250 auth_type => $auth_type,
251 auth_section => $auth_section,
252 user_domain_name => $user_domain_name,
253 project_domain_name => $project_domain_name,
254 system_scope => $system_scope,
255 insecure => $insecure,
256 cache => $cache,
257 cafile => $cafile,
258 certfile => $certfile,
259 delay_auth_decision => $delay_auth_decision,
260 enforce_token_bind => $enforce_token_bind,
261 http_connect_timeout => $http_connect_timeout,
262 http_request_max_retries => $http_request_max_retries,
263 include_service_catalog => $include_service_catalog,
264 keyfile => $keyfile,
265 memcache_pool_conn_get_timeout => $memcache_pool_conn_get_timeout,
266 memcache_pool_dead_retry => $memcache_pool_dead_retry,
267 memcache_pool_maxsize => $memcache_pool_maxsize,
268 memcache_pool_socket_timeout => $memcache_pool_socket_timeout,
269 memcache_secret_key => $memcache_secret_key,
270 memcache_security_strategy => $memcache_security_strategy,
271 memcache_use_advanced_pool => $memcache_use_advanced_pool,
272 memcache_pool_unused_timeout => $memcache_pool_unused_timeout,
273 memcached_servers => $memcached_servers,
274 manage_memcache_package => $manage_memcache_package,
275 region_name => $region_name,
276 token_cache_time => $token_cache_time,
277 service_token_roles => $service_token_roles,
278 service_token_roles_required => $service_token_roles_required,
279 service_type => $service_type,
280 interface => $interface;
281 }
282
283 Keystone::Resource::Authtoken['vmms_config'] -> Anchor['vmms::config::end']
284 }