nic-6443 commented on code in PR #12040:
URL: https://github.com/apache/apisix/pull/12040#discussion_r2022494982


##########
apisix/admin/consumers.lua:
##########
@@ -17,8 +17,51 @@
 local core    = require("apisix.core")
 local plugins = require("apisix.admin.plugins")
 local resource = require("apisix.admin.resource")
+local plugin = require("apisix.plugin")
+local pairs = pairs
+local consumer = require("apisix.consumer")
+local utils = require("apisix.admin.utils")
 
 
+local function check_duplicate_key(username, plugins_conf)
+    if not plugins_conf then
+        return true
+    end
+
+    for plugin_name, plugin_conf in pairs(plugins_conf) do
+        local plugin_obj = plugin.get(plugin_name)
+        if not plugin_obj then
+            return nil, "unknown plugin " .. plugin_name
+        end
+
+        if plugin_obj.type ~= "auth" then
+            goto continue
+        end
+
+        local plugin_conf_copy = core.table.deepcopy(plugin_conf)
+        plugin.decrypt_conf(plugin_name, plugin_conf_copy, 
core.schema.TYPE_CONSUMER)

Review Comment:
   Is this code useful? How can the input of the admin API be encrypted?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to