Add support for trusting additional certs in Kit commands#1058
Merged
amisevsk merged 2 commits intokitops-ml:mainfrom Jan 28, 2026
Merged
Add support for trusting additional certs in Kit commands#1058amisevsk merged 2 commits intokitops-ml:mainfrom
amisevsk merged 2 commits intokitops-ml:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for trusting additional TLS certificates in Kit commands to handle registries served with self-signed or default-untrusted certificates. The implementation adds a new --tls-cert flag that can be used multiple times to specify certificate paths.
Changes:
- Added
TLSTrustCertPathsfield toNetworkOptionsto store paths to additional trusted certificates - Implemented certificate loading logic that combines system certificates with user-provided certificates
- Added new
--tls-certflag that accepts multiple certificate paths via repeated flag usage
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/cmd/options/network.go | Adds TLSTrustCertPaths field and --tls-cert flag to network options |
| pkg/lib/network/auth.go | Implements certificate loading logic in DefaultClient and adds getCertsTrust helper function |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
To handle cases where e.g. a registry is served with a self-signed or otherwise default-untrusted certificate, add flag `--tls-cert` to Kit commands that communicate over the network to supplement the existing `--tls-verify=false` and `--plain-http` flags. Signed-off-by: Angel Misevski <amisevsk@gmail.com>
f05ac96 to
70d83ec
Compare
gorkem
approved these changes
Jan 17, 2026
| transport.TLSClientConfig.InsecureSkipVerify = !opts.TLSVerify | ||
|
|
||
| if len(opts.TLSTrustCertPaths) > 0 { | ||
| certPool, err := getCertsTrust(opts) |
Member
There was a problem hiding this comment.
Should we log a warning if --tls-verify=false is also present at the sametime as CA certs?
Signed-off-by: Angel Misevski <amisevsk@gmail.com>
80f6bed to
f537dc0
Compare
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.
Description
To handle cases where e.g. a registry is served with a self-signed or otherwise default-untrusted certificate, add flag
--tls-certto Kit commands that communicate over the network to supplement the existing--tls-verify=falseand--plain-httpflags.Linked issues
N/A
AI-Assisted Code