oficina / equipo Public

oficina-id/native-exchange

Equipo's native apps can exchange an Oficina ID assertion for a seven-day session, then register their device from that session. Implementer: Codex GPT-6-Astra.

Tip: 925bc74dee421a2862a637b435f03d70d313740a. CI PASSED, confirmed with amadan ci status oficina/equipo -branch oficina-id/native-exchange on 2026-11-20.

Scope clarification approved 2026-11-20: only an Oficina ID already explicitly linked to an active Equipo member is admitted. Every unlinked subject, including choice:"new", gets byte-identical 403 {"state":"unknown"}. There is no 409 choose or allocation path. Trusted Home roster integration for unlinked members is follow-up work, recorded in the approved spec's Order section.

POST /native/oficina-id takes JSON {assertion,verifier,choice?}, refuses Origin and Sec-Fetch-Site, and sets no cookies. Success is {name,value,expires_at}, with Unix-second expiry. Failures are {state}: 400 invalid, 401 failed, 403 unknown, 503 unavailable. Keys, issuer, audience, native nonce and replay are checked; replay reservation commits before session minting.

POST /api/v1/auth/devices/native takes JSON {publickey,label}, the native session Cookie and same-origin request evidence (send the instance Origin). Idempotency-Key is not required; each success creates a new device. Success is pairing's existing {id,token,audience,instanceid,expires_at}, with RFC3339 expiry at the source session's original seven-day deadline. Existing API error envelope: 401, 403, 422 or 503. Bearers, web/local sessions and submitted person fields cannot register a device. Paired devices retain thirty days.

Registration checks the source session and current roster inside its write transaction. Session deletion and unlink revoke derived credentials and remove their push tokens and pending pushes. Audit person_device.native contains only the verified actor and device ID. App migration 0098 adds the source-session hash; framework lifecycle triggers remain only in BootSchema. Rastrillo stays v0.30.3.

Validation: initial failing tests preceded implementation; all 28 intentional guard mutations failed their test assertions and were restored. Touched-package tests, all TestPersonAPI tests, both OpenAPI contracts, vet, reference scan after commit, lanes, formatting, size budgets, migration checks and copy-release-check pass locally. A real loopback HTTP/TLS test uses a fake Home signer, exchanges the assertion, registers the device and reads the engine snapshot using its bearer.

Each mutation command and result, exact contracts, and read-only Home findings: docs/superpowers/plans/2026-11-20-native-id-server-evidence.md. Home needs Equipo in the native directory filter, integrated app registry and canonical adoption mapping, plus live directory records. nativeAssert already accepts exact active consumer origins; deployed Equipo registration must be verified. No Home files changed. No merge or deployment.

Commits 0
Discussions 0 0 open
Tasks 0/0 done

Discussions

  • No discussions on this branch yet.

Tasks

  • No tasks yet.

Activity

  • No activity yet.