Repository navigation
fix(server): minimal health payload for tokenless requests - #1257
Merged
Merged
Conversation
GET /health was fully exempt from auth and returned version, memory
count, namespace count, and update info - letting any scanner
fingerprint an internet-exposed instance and size its memory store.
Health stays reachable WITHOUT a token (load balancers and uptime
probes keep working), but a request without valid credentials now
receives only {"status":"ok"}. A valid bearer token (admin or
read-only), or a server with auth disabled, still gets the full
payload - unchanged shape.
Closes #1252
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This was referenced Sep 15, 2026
Closed
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.
What
GET /healthstays reachable without a token (load balancers and uptime probes keep working), but a tokenless or invalidly-authenticated request now receives only:{"status":"ok"}A valid bearer token (admin or read-only), or a server with auth disabled (single-operator local mode), still receives the full payload -
version,memories,namespaces,api_versions,update_available- with an unchanged shape.Why
The health endpoint was fully exempt from auth while returning the server version, memory count, namespace count, and update info. On a public deployment that lets anyone fingerprint the instance (exact version for targeted exploits) and size the memory store (counts) with zero credentials. Owner direction: public gets the minimum; holders of an apikey/token see everything. Closes #1252.
Testing
test_health_anonymous_gets_minimal_payloadcovers all four paths:{"status":"ok"}only (noversion/memories/namespaces/update_available)cargo test -p uteke-server --bins: 33 passed / 0 failed.cargo fmt --check+cargo clippy --bins -- -D warningsclean.Note: response remains 200 for LB compatibility; only the body shrinks.