tzssangglass commented on code in PR #8403:
URL: https://github.com/apache/apisix/pull/8403#discussion_r1033423399


##########
apisix/consumer.lua:
##########
@@ -32,6 +33,23 @@ local lrucache = core.lrucache.new({
     ttl = 300, count = 512
 })
 
+
+local function decrypt_items(name, conf)
+    local schema = plugin.get(name)
+    local consumer_schema = schema.consumer_schema
+    if not consumer_schema then
+        return
+    end
+
+    for key, props in pairs(consumer_schema.properties) do
+        if props.type == "string" and props.encrypted then
+            local encrypted = apisix_ssl.aes_decrypt_pkey(conf[key], 
"global_data_encrypt")
+            conf[key] = encrypted
+        end
+    end

Review Comment:
   I know that since this PR does not include this case, we can optimize this 
point in the next PR.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to