Skip to content

Commit 6737576

Browse files
committed
Revert "roles: support ssl_verify_client option"
This reverts commit 5ebd39d.
1 parent c6c8ae2 commit 6737576

File tree

4 files changed

+0
-76
lines changed

4 files changed

+0
-76
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,6 @@ roles_cfg:
604604
ssl_ciphers: "cipher1:cipher2"
605605
ssl_password: "password"
606606
ssl_password_file: "path/to/ssl/password"
607-
ssl_verify_client: "off"
608607
```
609608

610609
This role accepts a server by name from a config and creates a route to return

roles/httpd.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ local function parse_params(node)
104104
ssl_password_file = node.ssl_password_file,
105105
ssl_ca_file = node.ssl_ca_file,
106106
ssl_ciphers = node.ssl_ciphers,
107-
ssl_verify_client = node.ssl_verify_client,
108107
}
109108
end
110109

test/integration/httpd_role_test.lua

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -255,59 +255,3 @@ g.test_enable_tls_on_config_reload = function(cg)
255255
local resp = http_client:get('http://localhost:13000/ping')
256256
t.assert_equals(resp.status, 444, 'response not 444')
257257
end
258-
259-
g.test_ssl_verify_client = function(cg)
260-
t.skip_if(not cg.params.use_tls, 'tls config required')
261-
262-
local cfg = table.copy(tls_config)
263-
264-
cfg.groups['group-001'].replicasets['replicaset-001'].roles_cfg['roles.httpd'].default
265-
.ssl_ca_file = fio.pathjoin(ssl_data_dir, 'ca.crt')
266-
cfg.groups['group-001'].replicasets['replicaset-001'].roles_cfg['roles.httpd'].default
267-
.ssl_verify_client = "on"
268-
treegen.write_file(cg.server.chdir, 'config.yaml', yaml.encode(cfg))
269-
local _, err = cg.server:eval("require('config'):reload()")
270-
t.assert_not(err)
271-
272-
t.assert_error_msg_contains(helpers.CONNECTION_REFUSED_ERR_MSG, function()
273-
http_client:get('https://localhost:13000/ping', {
274-
ca_file = fio.pathjoin(ssl_data_dir, 'ca.crt')
275-
})
276-
end)
277-
278-
local resp = http_client:get('https://localhost:13000/ping', {
279-
ca_file = fio.pathjoin(ssl_data_dir, 'ca.crt'),
280-
ssl_cert = fio.pathjoin(ssl_data_dir, 'client.crt'),
281-
ssl_key = fio.pathjoin(ssl_data_dir, 'client.key'),
282-
})
283-
t.assert_equals(resp.status, 200, 'response not 200')
284-
t.assert_equals(resp.body, 'pong')
285-
286-
cfg.groups['group-001'].replicasets['replicaset-001'].roles_cfg['roles.httpd'].default
287-
.ssl_verify_client = "optional"
288-
treegen.write_file(cg.server.chdir, 'config.yaml', yaml.encode(cfg))
289-
_, err = cg.server:eval("require('config'):reload()")
290-
t.assert_not(err)
291-
292-
t.assert_error_msg_contains(helpers.CONNECTION_REFUSED_ERR_MSG, function()
293-
http_client:get('https://localhost:13000/ping', {
294-
ca_file = fio.pathjoin(ssl_data_dir, 'ca.crt'),
295-
ssl_cert = fio.pathjoin(ssl_data_dir, 'bad_client.crt'),
296-
ssl_key = fio.pathjoin(ssl_data_dir, 'bad_client.key'),
297-
})
298-
end)
299-
300-
resp = http_client:get('https://localhost:13000/ping', {
301-
ca_file = fio.pathjoin(ssl_data_dir, 'ca.crt'),
302-
ssl_cert = fio.pathjoin(ssl_data_dir, 'client.crt'),
303-
ssl_key = fio.pathjoin(ssl_data_dir, 'client.key'),
304-
})
305-
t.assert_equals(resp.status, 200, 'response not 200')
306-
t.assert_equals(resp.body, 'pong')
307-
end
308-
309-
g.after_test('test_ssl_verify_client', function(cg)
310-
treegen.write_file(cg.server.chdir, 'config.yaml', yaml.encode(tls_config))
311-
local _, err = cg.server:eval("require('config'):reload()")
312-
t.assert_not(err)
313-
end)

test/unit/httpd_role_test.lua

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -226,24 +226,6 @@ local validation_cases = {
226226
},
227227
},
228228
err = "log_requests option should be a string",
229-
},
230-
["ssl_verify_client_invalid_type"] = {
231-
cfg = {
232-
server = {
233-
listen = "localhost:123",
234-
ssl_verify_client = 1,
235-
}
236-
},
237-
err = "ssl_verify_client option must be a string",
238-
},
239-
["ssl_verify_client_invalid_value"] = {
240-
cfg = {
241-
server = {
242-
listen = "localhost:123",
243-
ssl_verify_client = "unknown",
244-
}
245-
},
246-
err = '"unknown" option not exists. Available options: "on", "off", "optional"',
247229
}
248230
}
249231

0 commit comments

Comments
 (0)