Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading