Release: authenticated API docs + route discovery, secret-key diagnostics #13
Reference in New Issue
Block a user
Delete Branch "development"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Two changes since #12.
API docs are no longer public
The OpenAPI spec and Swagger UI were served without authentication. They now require the same auth as the rest of the API, and gained route discovery so clients don't need dev tools to find endpoints.
/api/openapi.jsonand/api/routesrequire a bearer token orX-API-Key(401 anonymous)./api/docsadditionally accepts a session cookie set at login, so a signed-in operator can open it in a new tab. Anonymous browsers are redirected to/login?redirect=...and returned afterwards./api/docs, so it is never sent to/api/v1/*and cannot authenticate an API call — no CSRF surface. Verified: cookie-only request to/api/v1/rulesreturns 401.Discovery — both the spec and
GET /api/routesaccept?method=get,postand?path=<substring>(comma-separated, case-insensitive). The route list returns method, path, summary, tag,public, andallowed(false when a read-scoped key can't invoke it)./api/docspasses the same query through to the spec it loads.UI — a
</>icon in the header (both layouts) and an Administration → API Docs menu entry, opened in a new tab via a newexternalnav-item flag.Secret-key decryption failures now diagnose themselves
A changed
ORCHESTRAD_SECRET_KEYleft stored credentials intact but unreadable, surfacing only as an opaquedecryption failedinside an unrelated operation.ORCHESTRAD_SECRET_KEY, and names the affected credential.services.CheckSecretKeyverifies every stored secret against the current key at startup and inorchestrad doctor— the latter previously only checked the key's length, which a correctly-sized but wrong key passed while still breaking every bind. Non-fatal; the server still starts.ORCHESTRAD_SECRET_KEY_FILE.Verification
Full backend suite green. Both changes verified live against the demo instance and the lab DC: anonymous/cookie/API-key access paths, all filter combinations, and reproducing the decryption failure with a wrong key (clear startup error naming the credential) then confirming recovery (connection test passes, rule preview returns 4 matched / 1 planned).
Merging this cuts a release (binaries, container image, MSI).