Skip to content

add core client cert validation#273

Merged
wojcik91 merged 27 commits intorelease/2.0from
mtls
Apr 21, 2026
Merged

add core client cert validation#273
wojcik91 merged 27 commits intorelease/2.0from
mtls

Conversation

@wojcik91
Copy link
Copy Markdown
Contributor

@wojcik91 wojcik91 self-assigned this Apr 16, 2026
Comment thread src/tests/mtls.rs Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds mTLS hardening for the Core↔Proxy gRPC channel by introducing Core client certificate chain validation and serial pinning, and updates setup to accept/store the CA + Core client cert alongside the component cert.

Changes:

  • Replace the old gRPC TLS Configuration with TlsConfig (server cert/key + CA cert + pinned Core client cert DER).
  • Validate the certificate bundle received during setup and configure gRPC server with CA-validated mTLS + serial-pin interceptor.
  • Add integration-style mTLS tests covering valid client, missing client cert, wrong serial, and rogue CA scenarios.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/setup.rs Accepts CertBundle, validates CA-signed component + Core client certs, and passes TlsConfig via oneshot.
src/grpc.rs Configures gRPC server TLS using CA + serial pinning; purge removes additional cert files.
src/http.rs Writes/reads additional TLS artifacts (CA cert + Core client cert) during setup and restart.
src/main.rs Loads full TlsConfig (including CA + Core client cert) from disk at startup.
src/lib.rs Registers new test module and removes unused CommsChannel type.
src/tests/mtls.rs Adds mTLS/serial-pinning integration tests for the gRPC server.
src/tests/mod.rs Wires the mTLS test module.
Cargo.toml Adds defguard_grpc_tls, rustls-webpki, rustls-pki-types, and a tokio dev-dependency.
Cargo.lock Locks dependency updates required by the new TLS validation stack.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/setup.rs
Comment thread src/grpc.rs Outdated
Comment thread src/tests/mtls.rs Outdated
Comment thread Cargo.toml
Comment thread src/tests/mtls.rs Outdated
@wojcik91 wojcik91 merged commit 366bbc3 into release/2.0 Apr 21, 2026
3 checks passed
@wojcik91 wojcik91 deleted the mtls branch April 21, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants