You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sp...@apache.org on 2021/11/30 10:00:15 UTC

[apisix] branch master updated: feat: report error when use etcd client cert auth (#5640)

This is an automated email from the ASF dual-hosted git repository.

spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 150c29d  feat: report error when use etcd client cert auth (#5640)
150c29d is described below

commit 150c29d260390a3e7e43e27b554b311b3ebffebf
Author: MizuhaHimuraki <mo...@gmail.com>
AuthorDate: Tue Nov 30 17:59:05 2021 +0800

    feat: report error when use etcd client cert auth (#5640)
---
 apisix/cli/etcd.lua | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/apisix/cli/etcd.lua b/apisix/cli/etcd.lua
index 4595ec5..53c4146 100644
--- a/apisix/cli/etcd.lua
+++ b/apisix/cli/etcd.lua
@@ -347,6 +347,13 @@ function _M.init(env, args)
                 util.die(errmsg)
             end
 
+            if res_put:find("CommonName of client sending a request against gateway", 1, true) then
+                errmsg = str_format("etcd \"client-cert-auth\" cannot be used with gRPC-gateway, "
+                                 .. "please configure the etcd username and password "
+                                 .. "in configuration file\n")
+                util.die(errmsg)
+            end
+
             if res_put:find("error", 1, true) then
                 is_success = false
                 if (index == host_count) then