Do not require explicit peer_ca for antietcd

This commit is contained in:
Vitaliy Filippov
2026-07-05 15:19:03 +03:00
parent 6a0f3a38d0
commit 76410df0e8
2 changed files with 2 additions and 11 deletions
-9
View File
@@ -85,15 +85,6 @@ class AntiEtcdAdapter
antietcd_config.ca = config.client_ca;
antietcd_config.osd_ca = config.osd_ca;
antietcd_config.mon_ca = config.mon_ca;
if (!config.etcd_proxy)
{
antietcd_config.peer_ca = config.antietcd_server_ca;
if (!config.antietcd_server_ca || config.antietcd_server_ca == config.client_ca)
{
console.error('Secure setup requires separate antietcd_server_ca (for signing antietcd server certificates) and client_ca (for signing client certificates)');
process.exit(1);
}
}
}
for (const key in config)
{
+2 -2
View File
@@ -68,10 +68,10 @@ class VitastorAuthFilter
async init()
{
if (!this.cfg.cert || !this.cfg.key || !this.cfg.osd_ca || !this.cfg.etcd_proxy && !this.cfg.peer_ca || !this.cfg.client_cert_auth)
if (!this.cfg.cert || !this.cfg.key || !this.cfg.osd_ca || !this.cfg.client_cert_auth)
{
throw new Error('Authenticated Vitastor setups require enabled client_cert_auth, cert, key'+
' and separate ca (client CA), osd_ca'+(this.cfg.etcd_proxy ? '' : ', peer_ca')+' and optionally mon_ca');
' and separate ca (client CA), osd_ca and optionally mon_ca');
}
this.osd_ca = await this.antietcd.readPEM(this.cfg.osd_ca);
this.osd_ca_obj = new X509Certificate(this.osd_ca);