Browse Source

Deprecate pki related options

check_revocations_for_cached and hash_algorithms are deprecated for
removel because of PKI token format is no longer supported.
Update warning message and add a release note.

Change-Id: I8cc64c8a0fdf002405e8cfdba178c3a6fcda5bab
Closes-Bug: #1804562
Closes-Bug: #1804720
tags/14.2.0
ZhongShengping 10 months ago
parent
commit
3f4c3625f0

+ 27
- 21
manifests/keystone/authtoken.pp View File

@@ -63,12 +63,6 @@
63 63
 #   (Optional) Required if identity server requires client certificate
64 64
 #   Defaults to $::os_service_default.
65 65
 #
66
-# [*check_revocations_for_cached*]
67
-#   (Optional) If true, the revocation list will be checked for cached tokens.
68
-#   This requires that PKI tokens are configured on the identity server.
69
-#   boolean value.
70
-#   Defaults to $::os_service_default.
71
-#
72 66
 # [*delay_auth_decision*]
73 67
 #   (Optional) Do not handle authorization requests within the middleware, but
74 68
 #   delegate the authorization decision to downstream WSGI components. Boolean
@@ -85,17 +79,6 @@
85 79
 #   must be present in tokens. String value.
86 80
 #   Defaults to $::os_service_default.
87 81
 #
88
-# [*hash_algorithms*]
89
-#   (Optional) Hash algorithms to use for hashing PKI tokens. This may be a
90
-#   single algorithm or multiple. The algorithms are those supported by Python
91
-#   standard hashlib.new(). The hashes will be tried in the order given, so put
92
-#   the preferred one first for performance. The result of the first hash will
93
-#   be stored in the cache. This will typically be set to multiple values only
94
-#   while migrating from a less secure algorithm to a more secure one. Once all
95
-#   the old tokens are expired this option should be set to a single value for
96
-#   better performance. List value.
97
-#   Defaults to $::os_service_default.
98
-#
99 82
 # [*http_connect_timeout*]
100 83
 #   (Optional) Request timeout value for communicating with Identity API
101 84
 #   server.
@@ -190,6 +173,23 @@
190 173
 #   (Optional) Complete public Identity API endpoint.
191 174
 #   Defaults to undef
192 175
 #
176
+# [*check_revocations_for_cached*]
177
+#   (Optional) If true, the revocation list will be checked for cached tokens.
178
+#   This requires that PKI tokens are configured on the identity server.
179
+#   boolean value.
180
+#   Defaults to undef.
181
+#
182
+# [*hash_algorithms*]
183
+#   (Optional) Hash algorithms to use for hashing PKI tokens. This may be a
184
+#   single algorithm or multiple. The algorithms are those supported by Python
185
+#   standard hashlib.new(). The hashes will be tried in the order given, so put
186
+#   the preferred one first for performance. The result of the first hash will
187
+#   be stored in the cache. This will typically be set to multiple values only
188
+#   while migrating from a less secure algorithm to a more secure one. Once all
189
+#   the old tokens are expired this option should be set to a single value for
190
+#   better performance. List value.
191
+#   Defaults to undef.
192
+#
193 193
 class neutron::keystone::authtoken(
194 194
   $username                       = 'neutron',
195 195
   $password                       = $::os_service_default,
@@ -205,10 +205,8 @@ class neutron::keystone::authtoken(
205 205
   $cache                          = $::os_service_default,
206 206
   $cafile                         = $::os_service_default,
207 207
   $certfile                       = $::os_service_default,
208
-  $check_revocations_for_cached   = $::os_service_default,
209 208
   $delay_auth_decision            = $::os_service_default,
210 209
   $enforce_token_bind             = $::os_service_default,
211
-  $hash_algorithms                = $::os_service_default,
212 210
   $http_connect_timeout           = $::os_service_default,
213 211
   $http_request_max_retries       = $::os_service_default,
214 212
   $include_service_catalog        = $::os_service_default,
@@ -228,6 +226,8 @@ class neutron::keystone::authtoken(
228 226
   $service_token_roles_required   = $::os_service_default,
229 227
   # DEPRECATED PARAMETERS
230 228
   $auth_uri                       = undef,
229
+  $check_revocations_for_cached   = undef,
230
+  $hash_algorithms                = undef,
231 231
 ) {
232 232
 
233 233
   include ::neutron::deps
@@ -241,6 +241,14 @@ class neutron::keystone::authtoken(
241 241
   }
242 242
   $www_authenticate_uri_real = pick($auth_uri, $www_authenticate_uri)
243 243
 
244
+  if $check_revocations_for_cached {
245
+    warning('check_revocations_for_cached parameter is deprecated, has no effect and will be removed in the future.')
246
+  }
247
+
248
+  if $hash_algorithms {
249
+    warning('hash_algorithms parameter is deprecated, has no effect and will be removed in the future.')
250
+  }
251
+
244 252
   keystone::resource::authtoken { 'neutron_config':
245 253
     username                       => $username,
246 254
     password                       => $password,
@@ -256,10 +264,8 @@ class neutron::keystone::authtoken(
256 264
     cache                          => $cache,
257 265
     cafile                         => $cafile,
258 266
     certfile                       => $certfile,
259
-    check_revocations_for_cached   => $check_revocations_for_cached,
260 267
     delay_auth_decision            => $delay_auth_decision,
261 268
     enforce_token_bind             => $enforce_token_bind,
262
-    hash_algorithms                => $hash_algorithms,
263 269
     http_connect_timeout           => $http_connect_timeout,
264 270
     http_request_max_retries       => $http_request_max_retries,
265 271
     include_service_catalog        => $include_service_catalog,

+ 6
- 0
releasenotes/notes/deprecate_pki_related_parameters-89ced5b6c65604db.yaml View File

@@ -0,0 +1,6 @@
1
+---
2
+deprecations:
3
+  - check_revocations_for_cached option is now deprecated for removal, the
4
+    parameter has no effect.
5
+  - hash_algorithms option is now deprecated for removal, the parameter
6
+    has no effect.

+ 0
- 6
spec/classes/neutron_keystone_authtoken_spec.rb View File

@@ -22,10 +22,8 @@ describe 'neutron::keystone::authtoken' do
22 22
         should contain_neutron_config('keystone_authtoken/cache').with_value('<SERVICE DEFAULT>')
23 23
         should contain_neutron_config('keystone_authtoken/cafile').with_value('<SERVICE DEFAULT>')
24 24
         should contain_neutron_config('keystone_authtoken/certfile').with_value('<SERVICE DEFAULT>')
25
-        should contain_neutron_config('keystone_authtoken/check_revocations_for_cached').with_value('<SERVICE DEFAULT>')
26 25
         should contain_neutron_config('keystone_authtoken/delay_auth_decision').with_value('<SERVICE DEFAULT>')
27 26
         should contain_neutron_config('keystone_authtoken/enforce_token_bind').with_value('<SERVICE DEFAULT>')
28
-        should contain_neutron_config('keystone_authtoken/hash_algorithms').with_value('<SERVICE DEFAULT>')
29 27
         should contain_neutron_config('keystone_authtoken/http_connect_timeout').with_value('<SERVICE DEFAULT>')
30 28
         should contain_neutron_config('keystone_authtoken/http_request_max_retries').with_value('<SERVICE DEFAULT>')
31 29
         should contain_neutron_config('keystone_authtoken/include_service_catalog').with_value('<SERVICE DEFAULT>')
@@ -62,10 +60,8 @@ describe 'neutron::keystone::authtoken' do
62 60
           :cache                                => 'somevalue',
63 61
           :cafile                               => '/opt/stack/data/cafile.pem',
64 62
           :certfile                             => 'certfile.crt',
65
-          :check_revocations_for_cached         => false,
66 63
           :delay_auth_decision                  => false,
67 64
           :enforce_token_bind                   => 'permissive',
68
-          :hash_algorithms                      => 'md5',
69 65
           :http_connect_timeout                 => '300',
70 66
           :http_request_max_retries             => '3',
71 67
           :include_service_catalog              => true,
@@ -101,10 +97,8 @@ describe 'neutron::keystone::authtoken' do
101 97
         should contain_neutron_config('keystone_authtoken/cache').with_value(params[:cache])
102 98
         should contain_neutron_config('keystone_authtoken/cafile').with_value(params[:cafile])
103 99
         should contain_neutron_config('keystone_authtoken/certfile').with_value(params[:certfile])
104
-        should contain_neutron_config('keystone_authtoken/check_revocations_for_cached').with_value(params[:check_revocations_for_cached])
105 100
         should contain_neutron_config('keystone_authtoken/delay_auth_decision').with_value(params[:delay_auth_decision])
106 101
         should contain_neutron_config('keystone_authtoken/enforce_token_bind').with_value(params[:enforce_token_bind])
107
-        should contain_neutron_config('keystone_authtoken/hash_algorithms').with_value(params[:hash_algorithms])
108 102
         should contain_neutron_config('keystone_authtoken/http_connect_timeout').with_value(params[:http_connect_timeout])
109 103
         should contain_neutron_config('keystone_authtoken/http_request_max_retries').with_value(params[:http_request_max_retries])
110 104
         should contain_neutron_config('keystone_authtoken/include_service_catalog').with_value(params[:include_service_catalog])

Loading…
Cancel
Save