-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create trust bundle based on Debian bookworm #183
Comments
Hello, |
Sorry, I didn't see this until now! Could you explain what you mean by "terms" there? |
I meant "deadlines". |
Ah, no deadlines! We can be flexible, no rush 😁 |
Could you please assign it to me? |
/assign @arsenalzp I think you should be able to self-assign: Ref. https://github.com/jpmcb/prow-github-actions/blob/main/docs/commands.md |
Hello, |
Sure, I'll try to explain my thinking! Basically, the list of CAs trusted by each version of Debian will vary. Bookworm trusts new certs that bullseye doesn't. I'd prefer for people to be able to make the choice of what they trust by themselves. It's OK for us to change the default in trust-manager (and there has to be a default), but I'd like to give people who already use the bullseye images to continue using those. Plus if people are going to keep on using bullseye then we need a build pipeline for updating it in the future! Does that make sense? |
Yes, sure it is clear for me.
|
@SgtCoDFish could you please explain why any user would prefer to trust an outdated trust bundle? |
I guess it is for some reason such as the certificate chain of trust which is based on old CA. Some applications/certificates were not updated to use new CA, something like that. |
But the Debian trust roots are based on publicly trusted roots? And I don't think any root certs will be removed before they expire or are revoked. As a user, I would prefer to use an updated public trust bundle. |
You are right but some CAs might be revoked so it would lead to issue with the new CA bundle. I guess that's why @SgtCoDFish created this issue. |
I think that they'd probably not use the term "outdated" - Debian bullseye will be supported for years still. It's kinda as simple as: if you use the new version, you're potentially trusting more stuff. I just like that people can have the choice, you know? |
Hello, |
I am not sure if there is a "final decision". 😉 But I will try to summarize my view on this, taking the comments from @SgtCoDFish into account. Should which defaultCAs trust bundle to use be configurable on the Bundle API level? That will require changes to the API as it is now just a boolean true/false. IMO this is a complexity we don't want/need. IMO the defaultCAs trust bundle should be configurable when provisioning trust-manager. I also think the easiest solution is to just allow the user to choose image for the init-container to select between the bullseye and bookworm trust bundle. And that we should have CI providing updated tags for both images. |
The best and sophisticated solution is to allow user to leverage trusted bundle image with helm chart parameters. |
I absolutely agree people should be able to configure this in Helm parameters - which they can today, right?
This is the way! We can update the default to bookworm, but leave the bullseye image for older versions of trust-manager and for anyone who chooses that. |
I realised it. |
I don't think we should use latest tags, as they are not reproducible. |
I agree, they don't reflect exact version of image, which is Debian release in our case. |
This is the version number of the package - Debian uses dates for ca-certificates. $ docker run -it --rm docker.io/library/debian:bookworm-slim bash
$ root@91a2868ce75f:/# apt update && apt install ca-certificates
...
$ apt show ca-certificates
...
Version: 20230311
... We also add a number on the end so that we can release new versions of the same package (e.g. if we rebuild the go binary). So I guess for bookworm our first version should look like |
/priority backlog |
Issues go stale after 90d of inactivity. |
/remove-lifecycle stale @arsenalzp Are you still interested in looking into this issue? |
Yes, let's close this issue. |
I don't think we took any final decision! Mostly there just isn't much demand for this - the current bundle isn't massively different to a more "modern" one. I'd still like to provide a more modern one (and move to that) but it's just not the biggest deal! I'd probably rather have this be a different image, rather than just a new tag - just to avoid any risk of confusion. But I don't think this will get worked on any time soon so that doesn't really matter much! |
FYI: Since Go 1.23, it has been changed so that an error occurs when trying to parse a certificate with a negative serial number. The ca-certificates of bullseye contains a CA certificate of
This certificate seems to viloate RFC 5280.
(However, the RFC also notes the following)
This may cause an error when an application built with Go 1.23 or later tries to read the This can currently be avoided by setting the environment variable
EC-ACC seems to have been removed in bookworm (ca-certificates 20230311). |
I am hitting a problem with ingress-nginx when using trust-manager bundles that have When using such bundles with ingress-nginx v1.11.4+, the bundle is ignored since ingress-nginx controller v1.11.4+ is built using Go 1.23, which rejects the bundle outright due to the negative serial CA cert present. Please update the ca-certificates that trust-manager uses to a modern release. |
@logan2211 There is an open PR to fix the existing bundle by filtering out the certificates with negative serial numbers: #515. I expect this PR to be merged early next week and released soon. Stay tuned! |
We currently provide cert-manager-package-debian which contains the trust store from Debian bullseye. That trust store hasn't been updated for a while - since it hasn't needed to be - but it won't be updated to add new CA certificates or to prune CA certificates which have expired.
Since there's a new stable version of Debian - Debian bookworm - we could provide a new trust bundle which uses the ca-certificates package from that new version. That would be more "up to date" for users who want that.
We can create a new bundle for bookworm and update to use it by default in trust-manager. This would involve copying the "debian" bundle here into a new folder ("debian-bookworm") and then updating the new bundle to use bookworm rather than bullseye.
There's some GCB CI/CD for our trust bundles, which is manually configured in the cert-manager GCP org, but I can set that up. The GCB file here would need to be copied and the new version would need to be updated to bookworm.
ℹ️ This would be a great issue for an open source community member to tackle!
The text was updated successfully, but these errors were encountered: