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


##########
apisix/admin/resource.lua:
##########
@@ -421,6 +422,13 @@ function _M:patch(id, conf, sub_path, args)
     local node_value = res_old.body.node.value
     local modified_index = res_old.body.node.modifiedIndex
 
+    -- the encrypt_fields of the stored plugin conf are ciphertext, decrypt
+    -- them before merging, otherwise the check_conf below will encrypt them
+    -- again, resulting in fields that are encrypted multiple times
+    if apisix_plugin.enable_gde() then
+        utils.decrypt_params(apisix_plugin.decrypt_conf, res_old.body)
+    end

Review Comment:
   Good point — moved the "new conf" info log to after check_conf in 308df55c2, 
so it logs the re-encrypted value.



-- 
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