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
[Epic] First-class application-to-application service access #873
Explicit Alia machine-principal SDK and consumer adoption shipped (Oxy #1577, Alia #666). This is the Alia-specific app-only contract, not the generic service-grant model below.
The unchecked child issues and generic cross-resource acceptance remain pending. In particular, no accepted evidence here establishes a Mercaria→Moovo resource audience/grant plus generic incoming/outgoing Console administration. The original specification below is retained; prior dated status is historical.
Status 2026-09-30 (audited against main f345d27) #877 (EdDSA service tokens + JWKS, HS256 removed) is DONE (ADR 0012, #1374). Nothing else has landed. Related, not part of this epic: ADR 0026 workload identities (first-party services authenticate as their infra role; tokens still aud: oxy-api) — the Mercaria/Moovo canary credentials should now be workload identities. Per project rules (no real users, clean cut, no config switches): drop the "migration path", compatibility routes and rollout flags from criteria and children.
Outcome
Oxy Console and Oxy Auth become the single control plane for service-to-service access across the Oxy ecosystem.
A registered Oxy Application is the canonical identity of a product such as Mercaria or Moovo. Applications can call another application's API with short-lived, audience-bound service tokens and explicit grants, without creating duplicate application records, sharing ad hoc secrets, or adding one-off authorization systems to each repository.
Non-negotiable identity rules
One real product has one canonical Oxy Application identity.
Mercaria, Moovo, Oxy Pay and other products may have several credentials by environment or workload, but those credentials all belong to the existing application.
A service grant is a relationship between two applications, not another identity.
The caller application id is derived from a verified token, never accepted from a request body, query parameter or arbitrary header.
ApplicationCredential.publicKey is a client id for one credential; it is not the application id.
credentialId is retained for audit, rotation and revocation; it does not replace application ownership.
Backend-to-backend service permission is separate from user OAuth consent and must not be placed indiscriminately in user-facing Application.scopes.
Service access is environment-bound. Development or staging credentials cannot call production resources.
Resource servers verify the intended audience and exact granted scopes.
No shared SERVICE_SECRET, synthetic appId: internal, or application-name allowlist may be introduced as a shortcut.
Target model
Application: Mercaria
-> ApplicationCredential: production API
-> ApplicationServiceGrant
resource: Moovo
environment: production
scopes: transport quotes/create/read/returns
Application: Moovo
-> exposes versioned service API capabilities
-> accepts an audience-bound token whose caller is Mercaria
The token identity remains:
caller application = Mercaria Application id
audience/resource = Moovo Application id
credential = exact Mercaria service credential
environment = production
effective scopes = requested scopes constrained by resource API, grant and credential
Mercaria acts as its application principal for both authenticated and guest orders. It does not impersonate the buyer merely because the buyer is the shipment recipient.
Completion criteria
An existing Mercaria application credential can mint a short-lived token specifically for the existing Moovo application.
Moovo can verify the token, audience, environment and scopes through the shared SDK without consulting a local application allowlist.
Revoking the grant or credential prevents new usable tokens and is visible in Console and audit history.
No duplicate Mercaria or Moovo application is created.
User OAuth permissions and backend service permissions remain distinct.
Oxy Console is the only administrative control plane for application identity, credentials and service grants.
Existing service-token consumers have a documented, tested migration path.
Shared-secret and synthetic-principal paths can be removed from consumer repositories without replacing them with another local auth framework.
The Oxy work in #874 through #880 must remain generic. Mercaria and Moovo are the canary proving the model, not names to hardcode into token issuance, SDK middleware or Console authorization logic.
Reconciliation — 2026-10-05
The generic Mercaria → Moovo resource-grant epic remains open. The accepted #1519/#1571 work provides these reusable milestones:
The unchecked child issues and generic cross-resource acceptance remain pending. In particular, no accepted evidence here establishes a Mercaria→Moovo resource audience/grant plus generic incoming/outgoing Console administration. The original specification below is retained; prior dated status is historical.
Outcome
Oxy Console and Oxy Auth become the single control plane for service-to-service access across the Oxy ecosystem.
A registered Oxy
Applicationis the canonical identity of a product such as Mercaria or Moovo. Applications can call another application's API with short-lived, audience-bound service tokens and explicit grants, without creating duplicate application records, sharing ad hoc secrets, or adding one-off authorization systems to each repository.Non-negotiable identity rules
Applicationidentity.ApplicationCredential.publicKeyis a client id for one credential; it is not the application id.credentialIdis retained for audit, rotation and revocation; it does not replace application ownership.Application.scopes.SERVICE_SECRET, syntheticappId: internal, or application-name allowlist may be introduced as a shortcut.Target model
The token identity remains:
Child issues
Architecture and authority
Token issuance and verification
Shared SDK and control plane
Migration and cleanup
Recommended execution order
Cross-repository canary
The first complete canary is:
Mercaria acts as its application principal for both authenticated and guest orders. It does not impersonate the buyer merely because the buyer is the shipment recipient.
Completion criteria