bzp2010 commented on code in PR #11993:
URL: https://github.com/apache/apisix/pull/11993#discussion_r1978569149
##########
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:
@nic-6443
> In this case, the usage cost will increase, especially for containerized
deployment. Users need to build their own image based on the APISIX container
image or write corresponding shell scripts to complete this task before
starting the APISIX image. Both methods are somewhat troublesome.
Imagine if the etcd deployed by users has mTLS enabled, in order to use
custom CA certificates and system certificates simultaneously, they would need
to handle the above steps themselves when deploying APISIX, which becomes
inconvenient.
I don't agree with the idea that costs will go up, if a user decides to turn
on mTLS and the server doesn't use trusted certificates, it should handle any
resulting extra work itself, which should follow any debian or redhat
guidelines that exist as well, more people will learn about standard packages
(ca-certificates) than will learn and understand us weird black box
customization mechanisms.
For debian, first make sure the ca-certificates package is installed on your
system, then place your own CA certificates in /usr/local/share/ca-certificates
(the container will need to be mounted), and then just run sudo
update-ca-certificates and those customized certificates will be automatically
added to the root certificate package by the script.
For containers, this can be done by custom ENTRYPOINT or CMD, such as
`docker run -d apache/apisix:3.11.0-debian sh -c "update-ca-certificates &&
apisix start"` (just an example), this doesn't require a script. I'm doing this
for a couple containers and it's working fine.
The difficulties you mention should be improved by some better docker
entrypoint scripts, for example, by providing some directory to place and
execute user's custom scripts before startup, as many are doing
https://docs.linuxserver.io/general/container-customization/#custom-scripts.
this is outside the scope of APISIX, and it's enough for APISIX to ensure that
its behavior is safe.
--
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]