P0 init: minimum trusted-plugin hook surface for hosted auth (slice of #58) #73

Open
opened 2026-09-06 18:32:15 +00:00 by nsaspy · 0 comments
Owner

Problem

init.lisp (#58) is the intended trusted extension layer for hosted deployments (billing, quotas, auth policy), but today it can only set two autodig variables. The first hosted consumer is interim CouchDB-backed per-user auth implemented OUTSIDE quasar (starintel-biz plugin), and it needs a minimal, supported hook surface instead of redefining core functions from init.

Required minimum hooks (auth slice)

  • session-created / session-registered notification (principal, workspaces, capabilities) so plugins can observe issuance.
  • http-request middleware hook at the CLOG boot path: a plugin can inspect request headers/cookies and supply the session token to inject (this is the per-request injection point also needed by #71).
  • A documented, stable package API (nickname like quasar.plugin) so plugins do not reach into uninterned internals.

Non-goals (remain in #58)

  • Actor spawn/quota hooks, billing/entitlement hooks, MCP/tool-call hooks.

Acceptance

  • A plugin loaded from init.lisp can: intercept the boot request, authenticate against an external store, and have the per-principal token injected — without symbol-function redefinition of quasar internals.
  • Quasar's own single-user default still works with no plugin present.
## Problem `init.lisp` (#58) is the intended trusted extension layer for hosted deployments (billing, quotas, auth policy), but today it can only set two autodig variables. The first hosted consumer is interim CouchDB-backed per-user auth implemented OUTSIDE quasar (starintel-biz plugin), and it needs a minimal, supported hook surface instead of redefining core functions from init. ## Required minimum hooks (auth slice) - `session-created` / `session-registered` notification (principal, workspaces, capabilities) so plugins can observe issuance. - `http-request` middleware hook at the CLOG boot path: a plugin can inspect request headers/cookies and supply the session token to inject (this is the per-request injection point also needed by #71). - A documented, stable package API (nickname like `quasar.plugin`) so plugins do not reach into uninterned internals. ## Non-goals (remain in #58) - Actor spawn/quota hooks, billing/entitlement hooks, MCP/tool-call hooks. ## Acceptance - A plugin loaded from init.lisp can: intercept the boot request, authenticate against an external store, and have the per-principal token injected — without `symbol-function` redefinition of quasar internals. - Quasar's own single-user default still works with no plugin present.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/quasar#73
No description provided.