Authentication

All RSA Platform APIs require authentication. Three tracks are available depending on your use case.

Authentication Tracks

TrackWhoMechanismHeader
PKCEHuman users (admins, developers)OAuth 2.0 browser redirectAuthorization: Bearer {JWT}
Client CredentialsBackend services, ETLgrant_type=client_credentialsAuthorization: Bearer {JWT}
API KeyPOS terminals, integrationsPre-issued secret keyX-Api-Key: rsa_live_{key}

All three tracks produce the same JWT claim structure when inspected server-side. The Identity server issues JWT Bearer tokens signed with RS256.

JWT Claims

Every JWT Bearer token contains:

ClaimTypeExampleDescription
substring3fa85f64-...User / member identifier
rolestring[]["TenantAdmin"]Roles assigned to this user
scopestringadmin.read admin.writeAuthorized OAuth scopes
tenant_idstringc1d2e3f4-...Tenant UUID
tenant_slugstringcardenasRoutes requests to correct retailer DB
retailer_idstringa1b2c3d4-...Retailer UUID (empty for platform users)
emailstringadmin@cardenas.comUser email
given_namestringJaneFirst name
family_namestringSmithLast name

Token Lifetime

  • JWT Bearer tokens expire in 1 hour by default. Use grant_type=refresh_token to renew.
  • API keys do not expire but can be rotated via POST /admin/api/v1/clients/{id}/rotate-secret.

Required Scopes by API

APIRead scopeWrite scope
Platform APIplatform.readplatform.write
Admin APIadmin.readadmin.write
Shopper APIshopper.readshopper.write
POS APIpos.readpos.write

See Scopes for the full scope reference including granular aliases.

MFA (TOTP)

Admin portal and platform portal logins require TOTP-based MFA (RFC 6238). The setup flow:

  1. POST /api/mfa/setup — returns a TOTP secret and QR code URI
  2. User scans QR code with an authenticator app (Google Authenticator, 1Password, etc.)
  3. POST /api/mfa/verify — verify first code to activate MFA

In local development, set REQUIRE_TOTP=false in the Identity API environment to bypass MFA.