Repository navigation
Verify server TLS certificates by default when dialing gRIBI targets. - #291
Merged
Merged
Conversation
* (M) client/gribiclient(_test)?.go
- replace unimplemented DialOpt with grpc.DialOption and verify server
TLS certificates against the host root CA pool by default.
* (M) fluent/fluent(_test)?.go
- add WithDialOptions to pass gRPC dial options when dialing a target.
* (M) rib/reconciler/{remote,remote_test,reconcile_test}.go
- accept variadic grpc.DialOption arguments in NewRemoteRIB.
* (M) {compliance/compliance,device/device}_test.go
- pass skip-verify credentials for self-signed test fixtures.
* (M) cmd/ccli/ccli_test.go
* (M) demo/ipv4/ipv4_test.go
- default -skip_verify to false and configure verified TLS by default.
Member
Author
|
@thesrinath -- please could you review this PR as well? (GitHub would not allow adding you directly as a repository reviewer.) |
alshabib
approved these changes
Nov 20, 2026
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.
TLDR
Verify server TLS certificates against the host root CA pool by default across
client.Dial,fluent, andreconciler.NewRemoteRIB, and accept standardgrpc.DialOptionvalues for custom credentials.Problem Statement
(*Client).Dialpreviously hardcodedtls.Config{InsecureSkipVerify: true}and accepted an unimplemented
DialOptmarker interface. Every dial throughclient.Dial,fluent.WithTarget, orreconciler.NewRemoteRIBskippedverifying server certificates. In addition,
cmd/ccliomitted transportcredentials when both
-insecureand-skip_verifywerefalse.Proposed Solution
client.Dial: RemoveDialOpt, accept...grpc.DialOption, and prependcredentials.NewTLS(&tls.Config{})so callers can override transportcredentials via
grpc.WithTransportCredentials.fluentandreconciler: AddWithDialOptions(...grpc.DialOption)onthe
fluentconnection builder and forward...grpc.DialOptioninreconciler.NewRemoteRIB.-skip_verifytofalseincmd/cclianddemo/ipv4, and configure verified TLS incmd/ccliby default.Implementation Details
client/gribiclient(_test)?.go: ReplaceDialOptwithgrpc.DialOptionand add
TestDialTLScovering untrusted CAs, mismatched IP SANs, custom rootpools, plaintext servers, and per-RPC metadata.
fluent/fluent(_test)?.goandrib/reconciler/*: Thread dial optionsinto
Dialand test default untrusted-certificate rejection and custom rootCA pools.
{compliance,device}/*_test.go,cmd/ccli, anddemo/ipv4: Passexplicit skip-verify credentials for self-signed test fixtures and update CLI
flag defaults.