Skip to content

Commit

Permalink
config: add missing ssl.ssl_cert for etcd
Browse files Browse the repository at this point in the history
etcd configuration section allows to connect to TLS-encrypted etcd
cluster, providing a way to pass `ssl.ssl_key`. But it is not enough
when etcd server have client cert auth enabled and has a CA file, since
it requires a ssl_cert as well. Actually, propagating ssl_cert is
already a part of the EE connect code [1], we just missing the top-level
config option.

Fixes tarantool/tarantool-ee#827

1. https://github.com/tarantool/tarantool-ee/blame/1138443c46e7a6e1bb855277bc6cb3333240131c/src/box/lua/config/source/etcd.lua#L103

@TarantoolBot document
Title: config: add missing ssl.ssl_cert for etcd

etcd configuration section already allows to set `ssl.ssl_key`. Now it
also allows to pass `ssl.ssl_cert`.

(cherry picked from commit 13249eb)
  • Loading branch information
DifferentialOrange authored and Totktonada committed Jun 24, 2024
1 parent 18005d0 commit 555a44b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions changelogs/unreleased/ghe-827-etcd-ssl-cert.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## bugfix/config

* Added the `ssl.ssl_cert` configuration option for `etcd` configuration
storage (ghe-827).
3 changes: 3 additions & 0 deletions src/box/lua/config/instance_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,9 @@ return schema.new('instance_config', schema.record({
ssl_key = schema.scalar({
type = 'string',
}),
ssl_cert = schema.scalar({
type = 'string',
}),
ca_path = schema.scalar({
type = 'string',
}),
Expand Down
5 changes: 3 additions & 2 deletions test/config-luatest/instance_config_schema_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ g.test_config_enterprise = function()
},
ssl = {
ssl_key = 'seven',
ca_path = 'eight',
ca_file = 'nine',
ssl_cert = 'eight',
ca_path = 'nine',
ca_file = 'ten',
verify_peer = true,
verify_host = false,
},
Expand Down

0 comments on commit 555a44b

Please sign in to comment.