-
Notifications
You must be signed in to change notification settings - Fork 19
SHIP-0042: Trusted certificates #281
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
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
adambkaplan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial comments since this proposal is in the draft state. I'd like to see the scope of this proposal more clearly defined before accepting it in the "provisional" state.
| # ... | ||
| spec: | ||
| # ... | ||
| certificates: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that we are supporting multiple certificates - this enables more fine grained distribution of trust.
I am concerned that the naming "certificates" is too broad. Are we concerned with certificate authorities for TLS verficiation? X.509 certificates for workload identity? Mutual TLS certificates between services? These are all very different things that utilize similar underlying fundamental technologies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are only concerned about X.509 certificates here.
Proposal to add a Shipwright feature to use trusted certificates in Build steps. Signed-off-by: Sayan Biswas <sayan-biswas@live.com>
aea7ec0 to
aae10db
Compare
|
I think the scope of this SHIP should be narrowed to TLS certificate authority trust bundles. The prerequisite is that a cluster administrator defines and distributes a trust bundle, which the containers in a Shipwright build consume. Adding additional CAs to a Linux system is otherwise a huge pain - you need to save/mount the CA to the right location (which is distro-dependent), and likewise run the right "update-ca" command as root, which is likewise distro-dependent. Mounting the CA bundle avoids the requirement to run containers as root. I used the following prompt in Google Gemini with its "Thinking" model to help research the general requirements: Below is the response, which matches my knowledge and experience: When using cert-manager’s trust-manager, you are essentially automating the creation of a "source of truth" CA bundle. To make your containerized applications trust this bundle, you must mount it into the specific paths where those applications or the operating system's libraries look for root certificates. 1. Where should the CA bundle be mounted?The mount point depends primarily on the base image of your container. Most Linux-based applications (like those written in Go, or tools like
Important: If you mount the ConfigMap directly to
2. Should this file be mounted in more than one place?Yes, in two specific scenarios:
3. Does the mount location vary by base image?Yes. Linux distributions are split into two main families regarding certificate management:
4. Do these files need to be mounted with a specific name?While many applications can be configured via environment variables to look for a custom filename (e.g.,
Example Kubernetes Deployment SnippetIf you are using spec:
containers:
- name: my-app
volumeMounts:
- name: trusted-ca
mountPath: /etc/ssl/certs/ca-certificates.crt
subPath: ca-certificates.crt # Prevents overwriting the whole /etc/ssl/certs dir
volumes:
- name: trusted-ca
configMap:
name: my-org-bundle
items:
- key: root-ca.pem # The key in your ConfigMap
path: ca-certificates.crt # The name it will take inside the container
Summary Checklist
|
|
The one thing I would add in light of a recent issue I became aware of (konflux-ci/build-definitions#3149), is that the recommended mount points should not overwrite a symlink. |
|
This is what I think the container mount points ultimately should look like for UBI containers: |
Proposal to add a Shipwright feature to use trusted certificates in Build steps.
Changes
Submitter Checklist
See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.
Release Notes