feat!: addition of configuration end point - #425
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an operational endpoint to introspect the KMS runtime configuration and adjusts startup behavior so TLS isn’t initialized in threshold recovery mode (when the signing key is unavailable), improving recoverability and troubleshooting.
Changes:
- Added a
/configHTTP route on the telemetry/metrics server to return the currently loaded configuration as JSON. - Refactored telemetry initialization to accept a full config object (via
ConfigTracing) instead of onlyTelemetryConfig. - Prevented TLS identity initialization in threshold recovery mode; updated troubleshooting docs and clarified TLS cert file error messages.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
observability/src/telemetry.rs |
Adds /config handler and stores serialized config in metrics state; updates telemetry init APIs to accept a full config via ConfigTracing. |
docs/operations/advanced/troubleshooting.md |
Documents additional troubleshooting endpoints (/version, /config). |
core/service/src/conf/threshold.rs |
Improves error message when TLS cert file can’t be read. |
core/service/src/conf/mod.rs |
Moves ConfigTracing usage to observability and updates telemetry init call site accordingly. |
core/service/src/bin/kms-server.rs |
Skips TLS identity initialization when running threshold in recovery mode (no signing key). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Consolidated Tests Results 2026-02-25 - 11:33:06Test ResultsDetails
test-reporter: Run #574
🎉 All tests passed!TestsView All Tests
🍂 No flaky tests in this run. Github Test Reporter by CTRF 💚 🔄 This comment has been updated |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
dd23
left a comment
There was a problem hiding this comment.
Great! LGTM, besides one small remark.
Description of changes
To validate run the centralized server (threshold will currently not boot in recovery see here)
and run
curl http://127.0.0.1:9646/configto see the configuration used as json.Maybe infra wants to add this to the
operator-checktool?Issue ticket number and link
This closes https://github.com/zama-ai/kms-internal/issues/2891
PR Checklist
I attest that all checked items are satisfied. Any deviation is clearly justified above.
chore: ...).TODO(#issue).unwrap/expect/paniconly in tests or for invariant bugs (documented if present).devopslabel + infra notified + infra-team reviewer assigned.!and affected teams notified.Zeroize+ZeroizeOnDropimplemented.unsafe; if unavoidable: minimal, justified, documented, and test/fuzz covered.Dependency Update Questionnaire (only if deps changed or added)
Answer in the
Cargo.tomlnext to the dependency (or here if updating):More details and explanations for the checklist and dependency updates can be found in CONTRIBUTING.md