certs: fix self-signed cert guidance in CDH example config#1569
Open
nogunix wants to merge 1 commit into
Open
Conversation
The comment stated that a self-signed certificate must have the basicConstraints CA:true extension, but rustls (the default TLS backend) does the opposite: it rejects a CA:true certificate presented as a leaf with a CaUsedAsEndEntity error. A self-signed cert must therefore use CA:false (or a proper CA:true cert signing a separate CA:false server cert). Verified against rustls 0.23.42 / rustls-webpki 0.103.13 / reqwest 0.12.28: a CA:true self-signed leaf is rejected (CaUsedAsEndEntity), while CA:false is accepted. Fix both the extra_root_certificates and image_pull_proxy comment blocks. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Nogunix <nogunix@gmail.com>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Corrects the self-signed certificate guidance in
confidential-data-hub/example.config.toml. The comment stated that aself-signed certificate must have the
basicConstraints CA:trueextension,but rustls (the default TLS backend) does the opposite: it rejects a
CA:truecertificate when it is presented as a leaf (end-entity), failingwith a
CaUsedAsEndEntityerror.Why
A self-signed certificate added via
extra_root_certificates(or animage_pull_proxycertificate) becomes both the trust anchor and the leafpresented during the TLS handshake. webpki validates the leaf and rejects
CA:truein the end-entity position, so the current guidance leads users tocreate certificates that fail the handshake.
Verification
Reproduced end-to-end with a tokio-rustls server + reqwest (rustls) client,
using the same cert as both trust anchor and leaf, on
rustls 0.23.42 / rustls-webpki 0.103.13 / reqwest 0.12.28:
basicConstraints CA:trueself-signed leaf → REJECTED (CaUsedAsEndEntity)basicConstraints CA:falseself-signed leaf → ACCEPTED (HTTP 200)Change
Fixes the
extra_root_certificatesandimage_pull_proxycomment blocks tostate that a self-signed cert must not have
CA:true, and to point at therecommended alternative (a
CA:trueCA cert signing a separateCA:falseserver cert).