blob: d47ef22a0442763e228c3d9603f90a181f54ada0 [file] [log] [blame]
sgarbuzc4b6ed92019-01-15 11:53:08 +02001ssl_enabled = attribute('ssl', default: false)
2
3keystone_default_ssl = {
4 'conn_pool_min_size' => '2',
5 'conn_pool_ttl' => '1200',
6 'control_exchange' => 'openstack',
7 'debug' => 'True',
8 'executor_thread_pool_size' => '64',
9 'log_config_append' => '/etc/keystone/logging.conf',
10 'log_dir' => 'logdir',
11 'log_file' => 'logfile.log',
12 'notification_format' => 'cadf',
13 'rpc_ack_timeout_base' => '15',
14 'rpc_ack_timeout_multiplier' => '2',
15 'rpc_conn_pool_size' => '30',
16 'rpc_message_ttl' => '300',
17 'rpc_poll_timeout' => '1',
18 'rpc_response_timeout' => '60',
19 'rpc_retry_attempts' => '3',
20 'rpc_thread_pool_size' => '100',
21 'rpc_use_acks' => 'False',
22 'syslog_log_facility' => 'LOG_USER',
23 'transport_url' => 'rabbit://openstack:password@127.0.0.1:5671//openstack',
24 'use_syslog' => 'True',
25}
26
27keystone_default = {
28 'conn_pool_min_size' => '2',
29 'conn_pool_ttl' => '1200',
30 'control_exchange' => 'openstack',
31 'debug' => 'True',
32 'executor_thread_pool_size' => '64',
33 'log_config_append' => '/etc/keystone/logging.conf',
34 'log_dir' => 'logdir',
35 'log_file' => 'logfile.log',
36 'notification_format' => 'cadf',
37 'rpc_ack_timeout_base' => '15',
38 'rpc_ack_timeout_multiplier' => '2',
39 'rpc_conn_pool_size' => '30',
40 'rpc_message_ttl' => '300',
41 'rpc_poll_timeout' => '1',
42 'rpc_response_timeout' => '60',
43 'rpc_retry_attempts' => '3',
44 'rpc_thread_pool_size' => '100',
45 'rpc_use_acks' => 'False',
46 'syslog_log_facility' => 'LOG_USER',
47 'transport_url' => 'rabbit://openstack:password@127.0.0.1:5672//openstack',
48 'use_syslog' => 'True',
49}
50
51keystone_assignment = {
52 'driver' => 'sql'
53}
54
55keystone_auth = {
56 'methods' => 'password,token',
57 'oidc' => 'keystone.auth.plugins.mapped.Mapped',
58 'saml2' => 'keystone.auth.plugins.mapped.Mapped',
59}
60
61keystone_catalog = {
62 'template_file' => 'default_catalog.templates',
63 'driver' => 'sql',
64}
65
66keystone_credential = {
67 'key_repository' => '/var/lib/keystone/credential-keys'
68}
69
70keystone_fernet_tokens = {
71 'key_repository' => '/etc/keystone/fernet-keys/',
72 'max_active_keys' => '3',
73}
74
75keystone_identity = {
76 'driver' => 'sql',
77}
78
79keystone_token = {
80 'expiration' => '86400',
81 'provider' => 'fernet',
82 'caching' => 'false',
83 'hash_algorithm' => 'sha256',
84}
85
86keystone_cache = {
87 'backend' => 'oslo_cache.memcache_pool',
88 'enabled' => 'True',
89}
90
91keystone_oslo_messaging_rabbit = {
92 'heartbeat_rate' => '2',
93}
94
95keystone_oslo_messaging_rabbit_ssl = {
96 'channel_max' => '2',
97 'connection_factory' => 'single',
98 'default_notification_exchange' => 'exchange',
99 'default_notification_retry_attempts' => '1',
100 'default_rpc_exchange' => 'rpc_exchange',
101 'default_rpc_retry_attempts' => '10',
102 'default_serializer_type' => 'json',
103 'frame_max' => '2',
104 'heartbeat_interval' => '3',
105 'heartbeat_rate' => '2',
106 'heartbeat_timeout_threshold' => '60',
107 'host_connection_reconnect_delay' => '10',
108 'notification_listener_prefetch_count' => '100',
109 'notification_persistence' => 'False',
110 'notification_retry_delay' => '10',
111 'pool_max_overflow' => '0',
112 'pool_max_size' => '30',
113 'pool_recycle' => '600',
114 'pool_stale' => '60',
115 'pool_timeout' => '30',
116 'rabbit_ha_queues' => 'True',
117 'rabbit_interval_max' => '30',
118 'rabbit_qos_prefetch_count' => '64',
119 'rabbit_retry_backoff' => '2',
120 'rabbit_retry_interval' => '1',
121 'rabbit_transient_queues_ttl' => '1800',
122 'rpc_listener_prefetch_count' => '100',
123 'rpc_queue_expiration' => '60',
124 'rpc_reply_exchange' => 'rpc_reply_exchange',
125 'rpc_reply_listener_prefetch_count' => '100',
126 'rpc_reply_retry_attempts' => '10',
127 'rpc_reply_retry_delay' => '10',
128 'rpc_retry_delay' => '10',
129 'socket_timeout' => '10',
130 'ssl' => 'true',
131 'ssl_ca_file' => '/etc/keystone/ssl/mysql/ca-cert.pem',
132 'ssl_version' => 'TLSv1_2',
133 'tcp_user_timeout' => '10',
134}
135
136keystone_database = {
137 'connection' => 'mysql+pymysql://keystone:passw0rd@127.0.0.1/keystone?charset=utf8',
138 'max_overflow' => '30',
139 'max_pool_size' => '10',
140 'max_retries' => '-1',
141}
142
143keystone_database_ssl = {
144 'connection' => 'mysql+pymysql://keystone:passw0rd@127.0.0.1/keystone?charset=utf8&ssl_ca=/etc/keystone/ssl/mysql/ca-cert.pem&ssl_cert=/etc/keystone/ssl/mysql/client-cert.pem&ssl_key=/etc/keystone/ssl/mysql/client-key.pem',
145 'max_overflow' => '30',
146 'max_pool_size' => '10',
147 'max_retries' => '-1',
148 'connection_recycle_time' => '280',
149}
150
151keystone_oslo_middleware = {
152 'max_request_body_size' => '114688',
153 'enable_proxy_headers_parsing' => 'True',
154}
155
156keystone_cors = {
157 'allowed_origin' => 'https://horizon.example.com',
158 'allow_credentials' => 'True',
159 'expose_headers' => 'X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token',
160 'max_age' => '3600',
161 'allow_methods' => 'GET,PUT,POST,DELETE,PATCH',
162 'allow_headers' => 'X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token,X-Project-Id,X-Project-Name,X-Project-Domain-Id,X-Project-Domain-Name,X-Domain-Id,X-Domain-Name',
163}
164
165keystone_oidc = {
166 'remote_id_attribute' => 'HTTP_OIDC_ISS'
167}
168
169keystone_saml2 = {
170 'remote_id_attribute' => 'HTTP_OIDC_ISS'
171}
172
173keystone_federation = {
174 'cache_group_membership_in_db' => 'True',
175}
176
177keystone_resource = {
178 'admin_project_domain_name' => 'project',
179 'admin_project_name' => 'projectname',
180}
181
182keystone_oslo_middleware = {
183 'max_request_body_size' => '114688',
184}
185
186control 'Keystone' do
187
188 describe parse_config_file('/etc/keystone/keystone.conf') do
189
190 describe 'Keystone messaging' do
191
192 if ssl_enabled
193 keystone_oslo_messaging_rabbit.merge!(keystone_oslo_messaging_rabbit_ssl)
194 keystone_default.merge!(keystone_default_ssl)
195 describe 'SSL' do
196 its('DEFAULT') {
197 should include(keystone_default)
198 }
199 its('oslo_messaging_rabbit') {
200 should include(keystone_oslo_messaging_rabbit)
201 }
202 end
203 else
204 describe 'non SSL' do
205 its('DEFAULT') {
206 should include(keystone_default)
207 }
208 its('oslo_messaging_rabbit') {
209 should include(keystone_oslo_messaging_rabbit)
210 }
211 end
212 end
213
214 end
215
216 describe 'Keystone database' do
217
218 if ssl_enabled
219 keystone_database.merge!(keystone_database_ssl)
220 describe 'SSL' do
221 its('database') {
222 should include(keystone_database)
223 }
224 end
225 else
226 describe 'non SSL' do
227 its('database') {
228 should include(keystone_database)
229 }
230 end
231 end
232
233 end
234
235 describe 'Keystone config' do
236
237 its('DEFAULT') {
238 should include(keystone_default)
239 }
240 its('assignment') {
241 should include(keystone_assignment)
242 }
243 its('auth') {
244 should include(keystone_auth)
245 }
246 its('catalog') {
247 should include(keystone_catalog)
248 }
249 its('credential') {
250 should include(keystone_credential)
251 }
252 its('fernet_tokens') {
253 should include(keystone_fernet_tokens)
254 }
255 its('identity') {
256 should include(keystone_identity)
257 }
258 its('token') {
259 should include(keystone_token)
260 }
261 its('cors') {
262 should include(keystone_cors)
263 }
264 its('oidc') {
265 should include(keystone_oidc)
266 }
267 its('saml2') {
268 should include(keystone_saml2)
269 }
270 its('federation') {
271 should include(keystone_federation)
272 }
273 its('resource') {
274 should include(keystone_resource)
275 }
276 its('oslo_middleware') {
277 should include(keystone_oslo_middleware)
278 }
279 its('cache') {
280 should include(keystone_cache)
281 }
282
283 end
284 end
285end