Skip to content

loobric-server 0.6.0 — API key scopes enforced (BREAKING)

Choose a tag to compare

@sliptonic sliptonic released this 27 Jul 18:56
· 28 commits to master since this release

⚠️ BREAKING: API key scopes are now enforced — legacy keys become READ-ONLY

Scopes existed since v1 but no v2 endpoint ever checked them. 0.6.0 makes scopes real, aligned with the doors (SCOPES_PLAN, grilled 2026-07-27):

  • The seven scopes ARE the doors: read, sync, observe, assert, bind, delete, admin. Every public endpoint checks the calling key; the 403 names the missing scope.
  • The canonical AI-agent key is read sync assert — an agent's credential physically cannot observe, bind, or delete, even through a raw client that bypasses the MCP surface. "Agents assert, never observe" is now a credential property.
  • Legacy keys degrade to read-only with a message telling you to create a new key. Rotate your keys after upgrading (controller push keys, MCP keys, importer keys).
  • Creating a key requires explicit door scopes (400 otherwise); the Web UI gains presets (AI agent / Controller / CAM client / Full) and a "legacy · read-only" badge.
  • Keys cannot manage keys — key creation/revocation and password change require a session (or solo mode); a key can never create itself a stronger key.
  • Composite rule: qa on create-instance (writes observed:manufacturer@…) additionally requires observe. Tool-table-entry create/push requires observe — an agent key cannot fabricate machine state.
  • Sessions and solo mode are unscoped — a signed-in human may use every door; admin surface still requires the admin role.

Added

  • Audit rows record the acting credential: channel (session / api-key / solo) + api_key_id (migration 0002). The declared actor is client-supplied; these are server truth — a spoofed actor is detectable with one query.
  • GET /auth/me returns the calling key's effective scopes (API-key auth), so clients like loobric-mcp can introspect their own credential.
  • Glossary Scope (API key) entry; docs/AUTHENTICATION.md rewritten for the door model.