Browse Source

Service_token_roles_required missing in the server config file

Service_token_roles_required missing in the server config file which
allows backwards compatibility to ensure that the service tokens are
compared against a list of possible roles for validity.

Change-Id: I035313023dfb6efd29b6706262490c78da3557e1
Closes-Bug: 1778198
tags/14.3.0
ZhongShengping 3 months ago
parent
commit
a3f83dfe1f

+ 8
- 0
manifests/keystone/authtoken.pp View File

@@ -163,6 +163,12 @@
163 163
 #   (in seconds). Set to -1 to disable caching completely. Integer value
164 164
 #   Defaults to $::os_service_default.
165 165
 #
166
+# [*service_token_roles_required*]
167
+#   (optional) backwards compatibility to ensure that the service tokens are
168
+#   compared against a list of possible roles for validity
169
+#   true/false
170
+#   Defaults to $::os_service_default.
171
+#
166 172
 # DEPRECATED PARAMETERS
167 173
 #
168 174
 # [*check_revocations_for_cached*]
@@ -215,6 +221,7 @@ class watcher::keystone::authtoken (
215 221
   $manage_memcache_package        = false,
216 222
   $region_name                    = $::os_service_default,
217 223
   $token_cache_time               = $::os_service_default,
224
+  $service_token_roles_required   = $::os_service_default,
218 225
   # DEPRECATED PARAMETERS
219 226
   $check_revocations_for_cached   = undef,
220 227
   $hash_algorithms                = undef,
@@ -269,6 +276,7 @@ class watcher::keystone::authtoken (
269 276
     manage_memcache_package        => $manage_memcache_package,
270 277
     region_name                    => $region_name,
271 278
     token_cache_time               => $token_cache_time,
279
+    service_token_roles_required   => $service_token_roles_required,
272 280
   }
273 281
 
274 282
 }

+ 5
- 0
releasenotes/notes/service_token_roles_required-a4f14cc2f29c8c12.yaml View File

@@ -0,0 +1,5 @@
1
+---
2
+features:
3
+  - Service_token_roles_required missing in the server config file which
4
+    allows backwards compatibility to ensure that the service tokens are
5
+    compared against a list of possible roles for validity.

+ 3
- 0
spec/classes/watcher_keystone_authtoken_spec.rb View File

@@ -46,6 +46,7 @@ describe 'watcher::keystone::authtoken' do
46 46
         is_expected.to contain_watcher_config('keystone_authtoken/memcached_servers').with_value('<SERVICE DEFAULT>')
47 47
         is_expected.to contain_watcher_config('keystone_authtoken/region_name').with_value('<SERVICE DEFAULT>')
48 48
         is_expected.to contain_watcher_config('keystone_authtoken/token_cache_time').with_value('<SERVICE DEFAULT>')
49
+        is_expected.to contain_watcher_config('keystone_authtoken/service_token_roles_required').with_value('<SERVICE DEFAULT>')
49 50
       end
50 51
     end
51 52
 
@@ -84,6 +85,7 @@ describe 'watcher::keystone::authtoken' do
84 85
           :manage_memcache_package              => true,
85 86
           :region_name                          => 'region2',
86 87
           :token_cache_time                     => '301',
88
+          :service_token_roles_required         => false,
87 89
         })
88 90
       end
89 91
 
@@ -119,6 +121,7 @@ describe 'watcher::keystone::authtoken' do
119 121
         is_expected.to contain_watcher_config('keystone_authtoken/memcached_servers').with_value('memcached01:11211,memcached02:11211')
120 122
         is_expected.to contain_watcher_config('keystone_authtoken/region_name').with_value(params[:region_name])
121 123
         is_expected.to contain_watcher_config('keystone_authtoken/token_cache_time').with_value(params[:token_cache_time])
124
+        is_expected.to contain_watcher_config('keystone_authtoken/service_token_roles_required').with_value(params[:service_token_roles_required])
122 125
       end
123 126
 
124 127
       it 'installs python memcache package' do

Loading…
Cancel
Save