bzp2010 commented on code in PR #11993:
URL: https://github.com/apache/apisix/pull/11993#discussion_r1980620707


##########
apisix/cli/ops.lua:
##########
@@ -529,7 +531,7 @@ Please modify "admin_key" in conf/config.yaml .
         end
 
         local combined_cert_filepath = 
yaml_conf.apisix.ssl.ssl_trusted_combined_path
-                                       or 
"/usr/local/apisix/conf/ssl_trusted_combined.pem"
+                                       or profile.apisix_home .. 
"/conf/ssl_trusted_combined.pem"

Review Comment:
   This is not a rebuttal to the "simple wrapping" statement, it is simple 
wrapping. The problem is that we shouldn't do it at all.
   
   Any action other than _**reading**_ the system certificate file (when this 
value is set to `system`) is outside the scope of the APISIX project. Modifying 
the system certificate chain is a matter for the user's system administrators 
to deal with, not ours.
   
   ### **In short, we do not endorse or take responsibility for any potential 
security risks from this behavior.**
   
   If the file being copied is controlled by APISIX in terms of content and 
lifecycle, the responsibility for ensuring its security is APISIX's. With great 
power comes great responsibility.
   Unless the user reads the code, no one will know that we have copied the 
file and placed it in the unintended unknown, and I think it's fair for me to 
call it a black box. This is a serious discussion for any security and trust 
issues.
   
   System administrators are familiar with the way certificates are managed in 
the Linux distributions their companies use. The `ca-certificates` is a well 
known software package, and there are many documents on how to work with it. 
And what about APISIX's documentation of this? I don't think there's more than 
that on the config file.
   
   ---
   
   There is also more than one way to modify the certificate chain, as I've 
already mentioned.
   
   1. Follow the Linux guide and use the `update-ca-certificates` command
   2. Point `ssl_trusted_certificate` to a CA certificate bundle file that you 
know exactly what it is and want to trust.
   
   It's intuitive, and whether users are more familiar with ca-certificates or 
nginx they will know what should be done.



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