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


##########
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:
   Specifically, we should hardcode some list of paths based on the default 
system certificate paths of some of the major Linux distributions (Debian, 
Redhat) and find and use them at boot time.
   As currently designed, this file will be copied and generated in 
/usr/local/apisix, a place where permissions management is typically more 
complex than in /etc/ssl/xxx.
   
   This introduces security risks to APISIX that are not otherwise within its 
administrative purview. This is bad if a malicious user is not authorized to 
modify /etc and it can modify /usr/local/apisix.
   A TLS CA file silently copied by APISIX to authenticate an authoritative 
certificate chain could be corrupted by a malicious user, unbeknownst to APISIX 
itself or the user, jeopardizing the user's system.



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