Skip to content

fix(gateway): reject mismatched certificate keys - #917

Merged
kvinwang merged 2 commits into
masterfrom
codex/fix-gateway-cert-key-match
Aug 4, 2026
Merged

fix(gateway): reject mismatched certificate keys#917
kvinwang merged 2 commits into
masterfrom
codex/fix-gateway-cert-key-match

Conversation

@kvinwang

@kvinwang kvinwang commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Problem

Gateway loaded a certificate and private key without checking that their public keys matched. Reload appeared accepted, but the TLS listener then failed to use the identity.

Root cause and fix

Compare the public keys before publication and reject mismatched certificate/key material.

Implementation

The branch records the following focused implementation work:

  • fix(gateway): reject mismatched certificate keys
  • test(gateway): retain cert on mismatched hot reload

Changed paths:

  • dstack/gateway/src/cert_store.rs

Scope

This PR addresses one logical gateway finding. It intentionally excludes the acceptance-test infrastructure from #841 and unrelated product fixes from #840.

Dependency and merge order

This PR is based directly on master and does not require another split product PR to merge first.

Verification

  • git diff --check origin/master..origin/codex/fix-gateway-cert-key-match: passed.
  • The declared base was verified as an ancestor of the PR head.
  • Focused compile/check verification was run for the changed component where applicable; non-Rust packaging or configuration changes were reviewed against their exact branch delta.

Copilot AI review requested due to automatic review settings July 31, 2026 03:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kvinwang
kvinwang merged commit 8aba453 into master Aug 4, 2026
22 checks passed
@kvinwang
kvinwang deleted the codex/fix-gateway-cert-key-match branch August 7, 2026 13:46
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.

2 participants