diff --git a/Dockerfile b/Dockerfile index db8329cd8..03d31f54e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -69,20 +69,29 @@ LABEL org.opencontainers.image.source=https://github.com/lambdaclass/ethlambda LABEL org.opencontainers.image.description="A minimalist and fast Beacon Chain and Lean Chain client written in Rust by LambdaClass" LABEL org.opencontainers.image.licenses="MIT" -ARG GIT_COMMIT=unknown -ARG GIT_BRANCH=unknown -ARG VERSION=dev - # A CA store. ethlambda's own HTTP clients use rustls and trust it next to the -# roots compiled into the binary, so they work without one, and a private CA -# added to it (or named by `SSL_CERT_FILE`) is trusted. The `include-ethrex` +# roots compiled into the binary, so they work without one. The `include-ethrex` # build also compiles reqwest's native-tls backend in (ethrex keeps reqwest's # default features), and embedded ethrex's clients read the system store alone: # without one, every HTTPS request they make fails (#944). +# +# A private CA goes into this store: a derived image that adds it under +# /usr/local/share/ca-certificates and runs `update-ca-certificates`, or a copy +# of /etc/ssl/certs/ca-certificates.crt with the CA appended, named by +# `SSL_CERT_FILE`. Never a file holding the CA alone: `SSL_CERT_FILE` replaces +# the store for ethrex's OpenSSL clients too, and they have no compiled-in roots +# to fall back on, so every public request they make would fail. +# +# Above the ARGs: a RUN after an ARG gets it in its environment, so a new +# commit would invalidate this layer and run apt-get again. RUN apt-get update \ && apt-get install -y --no-install-recommends ca-certificates \ && rm -rf /var/lib/apt/lists/* +ARG GIT_COMMIT=unknown +ARG GIT_BRANCH=unknown +ARG VERSION=dev + LABEL org.opencontainers.image.revision=$GIT_COMMIT LABEL org.opencontainers.image.ref.name=$GIT_BRANCH LABEL org.opencontainers.image.version=$VERSION diff --git a/docs/cli.md b/docs/cli.md index ad8a06079..ea8ad8672 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -1212,8 +1212,14 @@ binary (`webpki-roots`), as is every HTTPS request ethlambda itself makes (checkpoint sync, the Engine API, a builder relay, the beacon node API, ClickHouse telemetry; embedded ethrex's own requests read the system store alone). A signer behind an internal CA is therefore reached once -that CA is in the system store, or in a PEM file named by `SSL_CERT_FILE` (or a -directory named by `SSL_CERT_DIR`), which then stands in for the system store. +that CA is in the system store: on Debian or Ubuntu (the image included), a +certificate under `/usr/local/share/ca-certificates/` and a run of +`update-ca-certificates`. `SSL_CERT_FILE` (a PEM file) or `SSL_CERT_DIR` (a +directory) replaces the system store rather than adding to it, and embedded +ethrex reads them too, with no compiled-in roots to fall back on. One of them +must therefore name a copy of the whole store with the CA added (say +`/etc/ssl/certs/ca-certificates.crt` with the CA appended), never the CA alone, +which would leave ethrex unable to reach any public endpoint. The store is read when a client is built, which for all but a signer added through the keymanager API is at startup, so a CA added later takes a restart. There is no per-signer CA option (Lighthouse's