API v1: foundation and read endpoints #122
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jfro/rm-analyzer#122
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Part of the Ink Lantern rename & API project. Follows the design in the API design issue.
/api/v1scope in the router on the:apipipeline, with a Bearer-auth plug that usesRmAnalyzer.ApiKeys.authorize/1and builds the sameScopeas MCP (item limits apply)./me).mix precommitpasses.Posted by Haystack for Nye (attack checklist for the #122 review; Nye's token cannot comment).
#122 read endpoints: attack checklist (Nye, from main @
68d5022+ docs/api.md draft)Keys to make in tests (all via RmAnalyzer.ApiKeys):
Expected for every endpoint: NONE/REVOKED/GONE USER/chat token -> 401 + WWW-Authenticate: Bearer realm="rm-analyzer", error.code "unauthorized", no body data.
pathAlso:
MCP checks that live outside the shared Scope (REST would miss these)
name in allowedin the transport, lib/rm_analyzer_web/notes_mcp.ex:249 (allowed = ApiKeys.tools/1 at :93). Scope carries no tools. -> #122 adds ApiKeys.allowed?/2 and both call it (Rule 2).F1 proof: test/rm_analyzer_web/notes_mcp_tool_limit_nye_test.exs (fails on main)