feat: mTLS for Manager ↔ Decision Maker communication#16
Merged
ianchen0119 merged 7 commits intomainfrom Feb 23, 2026
Merged
Conversation
Co-authored-by: ianchen0119 <42661015+ianchen0119@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add mTLS communication feature for Manager decision maker
feat: mTLS for Manager ↔ Decision Maker communication
Feb 22, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds opt-in mutual TLS (mTLS) to authenticate and encrypt Manager ↔ Decision Maker traffic using a shared private CA, without changing the Manager’s external HTTP API surface.
Changes:
- Introduces
[mtls]configuration (cert/key/CA PEMs) for both Manager and Decision Maker. - Updates the Manager’s Decision Maker client to support HTTPS + client cert auth when enabled.
- Updates the Decision Maker REST app to require and verify client certificates when enabled, plus adds client-side unit/e2e tests and README setup docs.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| manager/client/deicison_maker.go | Adds mTLS-enabled HTTP client creation and switches DM endpoints to http/https based on config. |
| manager/client/deicison_maker_test.go | Adds unit + end-to-end mTLS tests using generated CA/leaf certs. |
| manager/app/module.go | Provides config.MTLSConfig via Fx for injection into the DM client. |
| decisionmaker/app/rest_app.go | Adds mTLS server startup path requiring verified client certs. |
| decisionmaker/app/module.go | Provides config.MTLSConfig via Fx for injection into REST startup. |
| config/manager_config.go | Adds MTLSConfig and wires it into ManageConfig. |
| config/manager_config.default.toml | Documents default (disabled) mTLS config block for Manager. |
| config/dm_config.go | Adds MTLSConfig to DecisionMakerConfig. |
| config/dm_config.default.toml | Documents default (disabled) mTLS config block for Decision Maker. |
| README.md | Adds mTLS configuration snippets and detailed setup instructions (OpenSSL + Kubernetes Secrets). |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Manager distributes kernel scheduling intents to every DM node; a compromised transport allows arbitrary priority manipulation. This adds opt-in mTLS so both sides authenticate via a shared private CA, while the Manager's external HTTP API (web GUI / Ingress) is left untouched.
Config
New
[mtls]block in bothmanager_config.tomlanddm_config.toml(disabled by default):Manager client (
manager/client/deicison_maker.go)NewDecisionMakerClient(keyConfig, mtlsCfg) (DecisionMakerAdapter, error)— Fx handles the error naturally.*http.Transportwithtls.Config{Certificates, RootCAs}and switches all DM endpoint URLs fromhttp://→https://.Decision Maker server (
decisionmaker/app/rest_app.go)mtls.enable = true, creates atls.NewListenerwithClientAuth: tls.RequireAndVerifyClientCertbefore handing the listener to Echo. Plain HTTP path is unchanged.Dependency wiring
manager/app/module.goanddecisionmaker/app/module.goexposeconfig.MTLSConfigvia Fx so it flows into the client constructor and server startup automatically.Tests
Five new unit tests in
manager/client/:http)https)httptestserver using programmatically generated CA + leaf certs with a fixed validity window (2025–2035) for determinismDocs
README.mdgains an mTLS Setup section: trust model rationale, step-by-step OpenSSL commands to create a private CA and sign Manager/DM certificates, config embedding instructions, and a Kubernetes Secret mounting example.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.