DocsEngineeringService boundaries

Service boundaries

HTTP gateway and gRPC domain ownership.

HTTP gateway

The server process owns public HTTP concerns: method routing, request limits, CORS, compression, browser security response headers, session validation, constant-time CSRF HMAC verification, idempotency headers, error mapping, and propagation of authorization metadata to gRPC.

Users service

Owns registration, login, user reads, notification preference updates, password verification, and service authorization claims.

Workflows service

Owns definitions, generations, build status, list filters, cleanup, termination, deletion, and workflow-side effects of terminal jobs.

Jobs service

Owns scheduling, job reads, status transitions, durable leases, recovery, retained log reads, search, downloads, and live log streams. It also owns container intent and materialization identity, cleanup attempt authority/receipts, physical capacity holds, durable cleanup metrics and administrative redrive audit. Workflow workers perform cleanup through jobs-service authority; they do not invent completion proof.

Cleanup administration uses internal gRPC with an admin JWT and authenticated principal. It is not exposed through the public HTTP/OpenAPI surface.

Notifications service

Owns notification creation, cursor-based listing, and read state.

Analytics service

Reads user and workflow aggregates maintained by the analytics processor.

Authorization boundary

The HTTP gateway attaches service JWT metadata to downstream gRPC calls. Services validate the target audience and role. For authenticated owner-scoped RPCs, the requested owner must match the user JWT subject. Internal admin calls can act for the owner within the policy of the target RPC.