Introduction to App Trust
Learn how App Trust uses third-party attestation and server-issued tokens to help protect requests to selected back-end services.
Overview
App Trust helps protect Oracle Backend with Supabase APIs services from abuse. It uses third-party attestation providers to evaluate client requests before issuing an App Trust token.
The provider returns attestation proof to the SDK. The SDK exchanges that proof with the back end for a short-lived App Trust token. The SDK then attaches the token to matching requests for the configured application and back end.
Web attestation helps reduce unwanted traffic, but does not establish that a device is untampered or guarantee that every bot or modified client is blocked. App Trust complements user authentication and access control.
Request Flow After App Trust Activation
After you configure App Trust for an application, select the services to protect, and initialize the client SDK, requests use this flow:
-
The SDK asks the configured attestation provider for proof.
-
The provider returns proof, which the SDK sends to the back end. The back end validates it using the application’s provider configuration.
-
The back end issues a short-lived App Trust token, which the SDK caches.
-
The SDK attaches the token to matching authentication, database, and storage requests for the application.
-
For services with App Trust enforcement enabled, the back end validates the token. Requests must also satisfy the service’s authentication and access-control requirements.
The SDK obtains tokens on demand and can reuse a cached token. Calling getToken(true) requests a fresh token. When a service response identifies an App Trust failure with HTTP 401, the SDK can refresh the token and retry the request once.
Positive Case
When verification succeeds:
-
The app obtains an App Trust token from the back end after the provider proof is validated.
-
The SDK attaches the token to matching service requests.
-
The protected service validates the token and applies its other access checks.
Negative Case
For requests that require App Trust validation:
-
A missing, expired, tampered, or otherwise invalid token results in HTTP
401. -
A token with a mismatched project or application identity, or a missing required service scope, results in HTTP
403.
Provider verification can also fail before an App Trust token is issued. Handle token-acquisition errors in the application.
Supported Platforms and Providers
App Trust supports JavaScript web applications, including progressive web apps (PWAs). You can select these services for protection:
-
Authentication
-
Database
-
Storage
The following attestation providers are supported:
-
hCaptcha
-
reCAPTCHA v3
-
Cloudflare Turnstile
-
reCAPTCHA Enterprise
Select the provider when you configure App Trust, and initialize the SDK with the matching provider. The verification experience depends on the provider and its configuration.