Repository navigation
fix(security): minimal /health; runtime status behind auth at /status (Fixes #225) - #235
Merged
Merged
Conversation
…nticated /status (#225) - GET /health (unauthenticated liveness probe, skipped by the IP allowlist) now returns only {"status": "ok"}. It used to expose AUTO_APPLY, the emergency stop, the storage backend, the org ID and queue state. - New GET /status with the previous fields, behind a viewer (or higher) token for the org, the same as /audit; org_id query parameter. - Probes, Docker HEALTHCHECK and CI keep using /health unchanged. - API reference and API testing guide updated. Fixes #225
9 tasks done
Merged
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.
Fixes #225.
Problem
GET /healthneeds no token (it's the liveness probe, and the IP allowlist skips it), but it returnedauto_apply,emergency_stop,storage_provider,org_idandqueue_worker. Anyone who could reach the agent learned whether it would run changes without approval and whether the emergency stop was on.Change
GET /health{"status": "ok"}onlyGET /status(new)?org_id=, defaultORG_ID), the same as/audit/healthused to return, withorg_idset to the requested orgThe Docker
HEALTHCHECK, the k8s probes and CI'scurl -f /healthonly check the status code, so they're unchanged.Docs
docs/API_REFERENCE.md(auth table,/health, new/status) anddocs/API_TESTING.mdare updated. The website's API page should mention/statusonce this merges.Note on #203
#203 (cloudgpuapp) adds
"version"to/health. If both merge, the version should go in/statusinstead, to keep the unauthenticated probe minimal. I'll mention it on #203.Tests
tests/test_health_status.py:/healthis minimal and contains none of the sensitive keys;/statuswithout a token gives 401;test_security.py's emergency-stop check now uses/status, and also asserts that/healthdoesn't reveal it.