-
Notifications
You must be signed in to change notification settings - Fork 0
Health check reports false unhealthy for auth-protected services #12
Description
Problem
gapp_status reports deployed services as unhealthy when they're actually running fine. It hits / without auth and gets a 401, which it interprets as unhealthy.
This happens because mcp-app solutions serve on / with JWT auth required — there's no unauthenticated health endpoint. The service is up and responding correctly, but gapp doesn't know how to talk to it.
Open Questions
The fix isn't obvious. Several approaches, and they may not be mutually exclusive:
-
Health endpoint in mcp-app — mcp-app could serve
/healththat returns 200 without auth. Simple, but the solution framework owns this, not gapp. -
gapp.yaml configuration — gapp could learn the health check path and/or auth requirements from config. e.g.,
health_check: /healthorhealth_check: falseto skip. -
Hand off to mcp-app — this may be part of a broader pattern where gapp delegates runtime concerns (health, user management, base URL discovery) to an mcp-app CLI or API. If mcp-app exposes a status/health command that knows how to probe its own services, gapp doesn't need to reinvent this. Similar to how user management is moving to mcp-app (Add CLI and MCP tools for user admin mcp-app#5).
-
Status token — gapp already has
create_status_tokenwhich mints a short-lived JWT withscope: "status". But mcp-app'suser-identitymiddleware doesn't recognize status-scoped tokens — that was agapp_runwrapper concept. If mcp-app added support for status tokens, gapp could use its existing machinery.
Current Behavior
gapp_status → deployment.services[0].healthy = false
curl (no auth) → 401 "Missing authentication token"
curl (with PAT) → 200 (service works fine)
Related
- Add CLI and MCP tools for user admin mcp-app#5 — user management moving to mcp-app (same pattern of gapp delegating runtime concerns)
- Remove dead user management code from SDK #11 — removing dead user management code from gapp