Changeset dd568e7 in Klonkt for CHANGELOG.nl.md


Ignore:
Timestamp:
07/19/2026 03:15:18 AM (7 weeks ago)
Author:
Robin <roboburr@…>
Branches:
main
Children:
bf72108
Parents:
d49b60b
git-author:
Robin <roboburr@…> (07/19/2026 03:14:01 AM)
git-committer:
Robin <roboburr@…> (07/19/2026 03:15:18 AM)
Message:

Feature: OAuth C2S outbox POST — apps can drive the account (phase 1 done)

Second half of AP Client-to-Server: a bearer-authenticated POST to
/ap/users/:slug/outbox accepts activities and translates them onto the existing
delivery machinery (deliverReply / sendInteraction / followActor /
deliverCreate) rather than reimplementing federation.

  • ingestOutboxActivity(site, user, activity) dispatches Create(Note) (reply -> resolveRemoteNote + deliverReply; top-level -> a sanitized microblog post + deliverCreate), Like, Announce (+upsertBoostedNote), Follow, and Undo of Like/Announce/Follow. A bare Note is wrapped in a Create per AP section 6. Client "source" (plain) is preferred over "content" (HTML) for replies; top-level content is HtmlSanitizerService.sanitize()d. Unhandled verbs return a clear 400 rather than a silent no-op.
  • Route: bearer via OAuthService.verifyBearer; the token is scoped to one site, so a slug mismatch is 403 and a readonly account is 403; no token is 401 with WWW-Authenticate. 201+Location for created objects, 202 for side-effect verbs. Declared after apJson (shared with the inbox handler) to avoid a TDZ on the const.

Verified live end to end against a running server with a real OAuth token:
top-level Note -> 201 + Location, stored published + sanitized (script stripped)
+ served as a valid Note at /ap/notes/<id>; Like/Follow -> 202; unresolvable
reply -> honest 502; no-token 401, wrong-site 403, unsupported type 400. 7 new
unit tests for the deterministic dispatch paths (80 green).

Ivory and other Mastodon-API clients are NOT supported by this: they speak
Mastodon's REST API (/api/v1/apps, /api/v1/instance, secret-based OAuth), not AP
C2S. That's a separate track (klonkt-demo-mastapi). Delete/Update of arbitrary
objects deferred (klonkt-demo-c2sdel). Beads: klonkt-demo-1w4.

Co-Authored-By: Claude Opus 4.8 <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG.nl.md

    rd49b60b rdd568e7  
    1515  uploadMedia-endpoints en `/.well-known/oauth-authorization-server` (RFC 8414)
    1616  geeft de metadata, dus apps ontdekken alles in plaats van paden vast te
    17   spijkeren. Alleen publieke clients + PKCE, geen client-secrets. De outbox die
    18   de tokens accepteert (POST) is de volgende fase.
     17  spijkeren. Alleen publieke clients + PKCE, geen client-secrets.
     18- **De outbox accepteert posts van apps (C2S, fase 1 compleet).** Een
     19  `POST` met bearer-token naar `/ap/users/:slug/outbox` bestuurt nu je account
     20  vanuit een app: een bericht plaatsen, reageren, liken, boosten, volgen en dat
     21  allemaal ongedaan maken. Activities gaan via dezelfde bezorg-machinerie als de
     22  web-UI; een kale Note wordt in een Create verpakt (spec); content wordt
     23  gesanitized; het token is aan één site gebonden dus kan niet namens een andere
     24  posten. Let op: dit is ActivityPub C2S, wat de Shaer-apps spreken.
     25  Mastodon-clients (Ivory e.d.) gebruiken Mastodons eigen API en worden hier niet
     26  ondersteund.
    1927
    2028### Opgelost
Note: See TracChangeset for help on using the changeset viewer.