You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Migrate existing service-token consumers to the generic application service-access model #880
Alia's duplicated authorization/catalog/ticket transports were replaced by the shared SDK (Alia #664, Alia #665); the bounded compatibility inventory is accepted in #1571.
The generic resource/grant cutover remains pending. Fresh source review of Moovo main cc617 auth still finds SERVICE_SECRET creating a synthetic system user / internal application in authenticateTokenOrApiKey. This is retained active source, not evidence that it ran in production. Do not infer its removal, generic Console grants or a Mercaria→Moovo resource-audience canary from shared SDK adoption. The original criteria remain open; old dated headers below are historical.
Status 2026-09-30 (audited against main f345d27)
Blocked on #875-#879. Already done: HMAC removal (#877/ADR 0012), so the HMAC/shared-signing-secret inventory is moot; legacy #195/#213/#215 are closed. Still live: Moovo middleware/auth.ts:101-107 (SERVICE_SECRET, system user, appId: 'internal') and Mercaria waiting on #878. Drop "environment-aware flags" and "dual authority/rollback": clean cut, no config switches.
Part of #873. Depends on #875 through #879. This issue owns compatibility, seeding, documentation reconciliation and removal of Oxy-side special cases; consumer-repository shared secrets are removed in their own linked issues.
Goal
Move current Oxy service-token behavior and official application integrations onto the generic resource/grant/audience model without creating duplicate Applications, silently widening authority or keeping permanent parallel authorization systems.
Inventory
Create a verified inventory of:
Applications with service credentials.
Credential environments and requested scopes.
Routes using service-token middleware.
Tokens currently minted for aud: oxy-api.
Oxy Pay's hardcoded service-credential and Console scope behavior.
Shared signing secrets distributed to consumers.
Consumer-local SERVICE_SECRET, API key or synthetic-principal paths.
Documentation and examples that describe obsolete token claims, rotation grace, signing or delegation behavior.
Official application seed records for Mercaria, Moovo and other products.
Runtime metrics needed to know when compatibility can be removed.
Do not infer active use only from code references. Use credential last-use and safe request metrics where available.
Canonical application seeding
Preserve the existing Mercaria, Moovo, Oxy Pay and other Application ids.
Extend the official seed/reconcile system with resource API definitions and grants, not duplicate app rows.
Seed development/staging/production separately and only where explicitly approved.
Add the Moovo resource API definition idempotently.
Add the Mercaria to Moovo grant only after the exact scope set and environments are approved.
Add the Moovo to Mercaria event-delivery grant only if the final event architecture requires direct callback access.
Re-running the seed must not revoke unrelated valid grants or credential bindings.
Renames use the existing legacy-name reconciliation rather than generating another identity.
Keep a tested rollback that does not recreate indefinite dual authority.
Preserve audit and historical credential records.
Legacy issue reconciliation
Review existing broad application/credential issues such as #213, #215 and #195 against the current Postgres implementation. Close, narrow or cross-link them based on verified remaining work rather than duplicating completed requirements into this epic.
Acceptance criteria
Existing official Application ids survive unchanged.
Oxy Pay and Moovo use the same generic resource/grant model.
The Mercaria to Moovo production relationship is represented by grants and credentials visible in Console.
No current consumer loses access silently during migration.
Legacy and new effective permissions are reconciled before each cutover.
Canonical docs match the actual token, key, grant and rotation implementation.
Old token issuance, hardcoded Console permission UI and Oxy-side shared-signing-secret assumptions have dated removal points.
Use these linked implementations as the first migration cohort and compatibility proof:
OxyHQ/Moovo#27/#28 adopt the shared resource-server auth and expose the Moovo API.
OxyHQ/Mercaria#156 adopts the shared audience-aware outbound client.
OxyHQ/Moovo#32 and OxyHQ/Mercaria#164 remove their copied SERVICE_SECRET, synthetic system user and appId: internal paths.
OxyHQ/Moovo#29 and OxyHQ/Mercaria#158 prove application-scoped durable event delivery.
Do not remove compatibility in Oxy until the canary traffic, credential rotation, grant revocation, wrong-audience refusal and rollback paths are measured end to end.
The referenced foundations #195, #213 and #215 are already closed as completed. Treat their implemented Application, ApplicationCredential and service-auth error guarantees as the migration baseline.
Do not reopen or recreate those models. This issue should audit current production behavior, preserve existing ids/credential lifecycle and add only the resource API, grant, audience, JWKS, generic Console and consumer-migration layers defined by #873 through #879.
Reconciliation — 2026-10-05
The generic resource/grant cutover remains pending. Fresh source review of Moovo main cc617 auth still finds
SERVICE_SECRETcreating a syntheticsystemuser /internalapplication inauthenticateTokenOrApiKey. This is retained active source, not evidence that it ran in production. Do not infer its removal, generic Console grants or a Mercaria→Moovo resource-audience canary from shared SDK adoption. The original criteria remain open; old dated headers below are historical.Part of #873. Depends on #875 through #879. This issue owns compatibility, seeding, documentation reconciliation and removal of Oxy-side special cases; consumer-repository shared secrets are removed in their own linked issues.
Goal
Move current Oxy service-token behavior and official application integrations onto the generic resource/grant/audience model without creating duplicate Applications, silently widening authority or keeping permanent parallel authorization systems.
Inventory
Create a verified inventory of:
aud: oxy-api.SERVICE_SECRET, API key or synthetic-principal paths.Do not infer active use only from code references. Use credential last-use and safe request metrics where available.
Canonical application seeding
Oxy Pay migration
Documentation reconciliation
Create one canonical service-auth guide and update/remove conflicting copies.
It must accurately document:
Generated/package docs must point to the same contract and tests must catch contradictory security claims where practical.
Compatibility rollout
Legacy issue reconciliation
Review existing broad application/credential issues such as #213, #215 and #195 against the current Postgres implementation. Close, narrow or cross-link them based on verified remaining work rather than duplicating completed requirements into this epic.
Acceptance criteria
SERVICE_SECRETprincipals after adopting Add audience-aware service clients and resource-server auth to @oxy.so/core #878.