Fundamentals
The Fundamentals chapter introduces the essential concepts and components that form the backbone of Oracle Backend with Supabase APIs. It provides developers with a clear understanding of the platform’s architecture, supported services, and tools, ensuring a solid foundation before diving into advanced usage.
Key Terms and Definitions
This section provides a quick reference to important concepts used throughout Oracle Backend with Supabase APIs. To make it easier for developers, the terms are divided into two categories: Generic Terms, which are common across backend development, and Oracle‐Specific Terms, which are unique to Oracle and Oracle Backend with Supabase APIs.
Generic Terms
- Client: An object created with
createClient()that provides access to the configured relational, authentication, App Trust, and storage APIs. - Relation: A table, view, or other relational object in the active schema. Pass its name to
from(relation)to start an operation. - Row: A set of column values that you can select, insert, update, delete, or upsert through the relational API.
- Projection: The columns and expressions passed to
select(). A projection can include aliases, related rows, and aggregate expressions. - Filter: A chainable condition that limits rows. Multiple filters use logical
ANDunless you group them withor()orand(). - RPC: A call to a stored database function or procedure through
rpc(fn, args, options). - Bucket: A storage scope selected with
client.storage.from(bucketId). - Object path: The path that identifies an object within a selected bucket. Storage operations use object paths to upload, download, list, replace, or delete objects.
Oracle-Specific Terms
- IAM: An external identity system that manages applications, users, and their role assignments.
- End user: An application user who does not own database schemas or objects.
- Application identity: A database object representing an application or AI agent and its common privileges, typically registered over IAM.
- Data role: A role that provides fine-grained data access privileges on tables and views. You can grant it only to application identities, end users, and other data roles.
- End user security context: A runtime session context containing the active user’s identity, data roles, and attributes.
- End user context: A database object that defines attributes populated into a secure end-user session and accessible through
ORA_END_USER_CONTEXT. - Data grant: A fine-grained policy that controls access to rows, columns, or individual cells.
Architecture Overview
Requests follow this flow:
- Client request: The client calls a Supabase-style API with the project API key and, for authenticated access, a user JWT.
- Request validation: The service and ORDS validate the request, resolve the target project and schema, and verify any supplied user JWT. Invalid or expired credentials cause the request to fail before database SQL runs.
- Database application authentication: ORDS uses IAM client credentials stored in the ORDS wallet to obtain a database access token. The database identifies ORDS as the configured application identity.
- End user security context creation: The service creates or refreshes the context with server-verified identity, project, service, operation, and data-role values.
- DDS authorization and execution: DDS evaluates data grants against the active data roles and context attributes. A matching grant permits the operation; otherwise, DDS denies it. Authorized SQL or PL/SQL runs under the request-specific security context.
- Connection reuse: Before reusing a pooled connection, the service replaces or clears the context to prevent identity or role information from affecting another request.
Backend Overview
The service exposes Supabase-compatible APIs through ORDS for authentication, relational database access, and object storage. Deep Data Security enforces authorization on the target schema based on the authenticated application user, project schema, and applicable data grants.
Deep Data Security Overview
Oracle Deep Data Security (DDS) is a database-enforced data authorization framework. It enables application developers and security architects to define and enforce application-level security requirements directly at the database layer.
For Supabase-compatible APIs, DDS bases schema authorization on the authenticated application user, target project schema, and applicable data grants.
Supported Platforms
Oracle Backend with Supabase APIs currently supports web applications through the modular JavaScript SDK.
JavaScript SDK Overview
The JavaScript SDK provides APIs for relational tables and views. It supports CRUD operations, filters, JSON paths, ordering, pagination, joins, aggregates, RPC, request controls, and structured errors.
The SDK also provides these service APIs:
- Authentication:
client.authprovides authentication APIs. Unless otherwise stated, its methods return{ data, error }. - Multi-factor authentication:
client.auth.mfaprovides MFA APIs that return{ data, error }. - App Trust:
client.appTrustprovides App Trust APIs. Initialize App Trust before requesting or observing tokens. - Storage:
client.storage.from(bucketId)returns an API scoped to a bucket. Storage methods return{ data, error }, with aRelationalStorageErrorwhen an operation fails.
Console Overview
The Oracle Backend with Supabase APIs Console provides a web interface for managing projects, applications, and backend services. Use it to configure authentication, work with relational data and files, and manage data access with DDS.
Key Capabilities
- Project Management: View and configure projects, register web applications, and manage application settings.
- Authentication Setup: Configure authentication and manage application users. Configure SMTP and password policies where supported by the authentication type.
- Data Management: Create relational tables, view and modify rows, and manage indexes.
- Data Access Control: Create and manage DDS data roles and data grants for database and storage access.
- Object Storage: Configure storage and upload, download, move, and delete files.
- App Trust: Configure App Trust for web applications.
- Project Settings: Manage authorized domains, rate limits, and service accounts.
CLI Overview
The fusabase command-line interface (CLI) provides scriptable workflows for Oracle Backend with Supabase APIs. Use it to manage projects and services from a terminal or automate repetitive tasks.
Key Capabilities
- Project Management: Create relational projects, list and delete projects, and manage registered applications.
- Authentication: Configure Basic, LDAP, IDCS, or External IDCS authentication and manage application users. Available user-management operations depend on the authentication type.
- Database Operations: Query relational data and insert, upsert, update, or delete rows. Call database functions or procedures with RPC.
- Data Access Control: Manage data roles and user assignments. Create, list, and delete data grants using a configured SQL client and database connection.
- Object Storage: Configure BASE or OCI storage. Upload, download, list, inspect, move, and delete files in OCI Object Storage.
- Initialization and Configuration: Authenticate to ORDS, select the active project, and configure services using configuration files or prompts.