Installing and Configuring Oracle Backend with Supabase APIs
Prepare the database and ORDS, configure Deep Data Security (DDS), create a project in the Console, and connect the fusabase CLI.
What You Will Do
In this chapter, you will:
-
Verify the database prerequisites required by Oracle Backend with Supabase APIs.
-
Enable Oracle Backend with Supabase APIs in ORDS.
-
Configure the IAM applications, TCPS connection, and DDS.
-
Create and enable a schema that can own a project.
-
Open the Console and create your first project.
-
Configure the
fusabaseCLI and confirm that it can reach your service.
Prerequisites
Before you start, make sure you have:
-
An Oracle Cloud Infrastructure Identity and Access Management (OCI IAM) identity domain. For Oracle Identity Cloud Service (IDCS) application-user authentication, use a non-Free identity domain that supports end-user self-registration.
-
Oracle AI Database release
23.26.3.0.0or later. For database information, see Oracle AI Database. -
ORDS
26.3or later installed in the target pluggable database (PDB), with a configured database pool. Downloading the ORDS software does not complete the database installation. For installation instructions, see Installing and Configuring Oracle REST Data Services. -
Credentials for the ORDS installation account in the target PDB. Use
SYS AS SYSDBAor a dedicated installer account prepared with the required ORDS installer privileges. -
A dedicated database account with the
DBArole in the target PDB, such asSETUP_ADMINprepared in this section. -
Permission to create and activate the IAM applications, assign their resource scopes, and configure public signing-certificate access.
-
The ORDS configuration directory containing the target PDB’s pool configuration.
-
The ORDS host name, port, and target PDB service name.
To prepare a dedicated administrative account, connect to the target PDB as SYS AS SYSDBA and run:
CREATE USER setup_admin IDENTIFIED BY "ADMIN_PASSWORD";
GRANT CREATE SESSION, DBA TO setup_admin;
Replace ADMIN_PASSWORD with a strong password for this administrative account. Use SETUP_ADMIN for DDS and schema enablement. The project-owning schema is a separate account created later in this chapter.
The schema enablement package must be permitted to inherit the caller’s privileges. Some administrative accounts, including an account created with a PDB’s ADMIN USER clause, can lack that permission despite having DBA. For those accounts, see Troubleshooting.
Before continuing, confirm that you can connect to the database and run show parameter compatible.
Prepare the Database
Oracle Backend with Supabase APIs requires a compatible database, extended string support, and Transparent Data Encryption (TDE).
Check the Database Version and Compatibility Setting
Connect as SYS AS SYSDBA or another privileged user and run:
show parameter compatible;
SELECT banner_full FROM v$version;
If COMPATIBLE is lower than 23.9.0, connect to CDB$ROOT, update the parameter, and restart the instance according to your environment’s restart procedure:
ALTER SYSTEM SET COMPATIBLE='23.9.0' SCOPE=SPFILE;
Enable Extended String Support
Connect to the target PDB as SYS AS SYSDBA and check the string-size setting:
SHOW PARAMETER max_string_size;
If the value is EXTENDED, continue to the TDE configuration. Otherwise, connect to CDB$ROOT as SYS AS SYSDBA and run the following sequence:
ALTER PLUGGABLE DATABASE PDB_NAME CLOSE;
ALTER PLUGGABLE DATABASE PDB_NAME OPEN UPGRADE;
ALTER SESSION SET CONTAINER=PDB_NAME;
ALTER SYSTEM SET max_string_size = extended;
@?/rdbms/admin/utl32k.sql
ALTER SESSION SET CONTAINER=CDB$ROOT;
ALTER PLUGGABLE DATABASE PDB_NAME CLOSE;
ALTER PLUGGABLE DATABASE PDB_NAME OPEN;
ALTER SESSION SET CONTAINER=PDB_NAME;
@?/rdbms/admin/utlrp.sql
SHOW PARAMETER max_string_size;
Replace PDB_NAME with the target PDB name. The utlrp.sql script recompiles invalid objects after the PDB reopens in normal mode. Confirm that MAX_STRING_SIZE is EXTENDED.
Configure the TDE Wallet and Master Key
The following procedure configures a password-protected file keystore in united mode, where the CDB and its PDBs share a keystore. If your keystore is already configured, open it if needed and verify the target PDB’s wallet and master key in step 5.
-
On the database host, create the wallet directory with an operating system account that can set its ownership and permissions:
mkdir -p /opt/oracle/oradata/FREE/tde chown oracle:oinstall /opt/oracle/oradata/FREE/tde chmod 700 /opt/oracle/oradata/FREE/tdeThese example paths use
/opt/oracle/oradata/FREEasWALLET_ROOTand itstdesubdirectory for the wallet. Use paths that meet your organization’s storage, backup, and access requirements. Replaceoracle:oinstallwith your database software owner and group. -
Connect to
CDB$ROOTasSYS AS SYSDBAand set the wallet root:ALTER SYSTEM SET wallet_root='/opt/oracle/oradata/FREE' SCOPE=SPFILE;Replace the example path with your selected wallet root, excluding the
tdesubdirectory. -
Restart the database according to your environment’s procedure. Reconnect to
CDB$ROOTasSYS AS SYSDBA, verify the wallet root, and set the keystore type:SHOW PARAMETER wallet_root; ALTER SYSTEM SET tde_configuration='KEYSTORE_CONFIGURATION=FILE' SCOPE=BOTH; -
Connect to
CDB$ROOTas a common user with theADMINISTER KEY MANAGEMENTorSYSKMprivilege. Ensure that the target PDB is open in read-write mode. Create and open the keystore, then set the master keys:ADMINISTER KEY MANAGEMENT CREATE KEYSTORE IDENTIFIED BY "KEYSTORE_PASSWORD"; ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY "KEYSTORE_PASSWORD" CONTAINER=ALL; ADMINISTER KEY MANAGEMENT SET KEY IDENTIFIED BY "KEYSTORE_PASSWORD" WITH BACKUP CONTAINER=ALL;Replace
KEYSTORE_PASSWORDwith a strong keystore password that you manage securely. -
Connect to the target PDB as
SYS AS SYSDBAand verify its wallet and master key:SELECT WRL_TYPE, WRL_PARAMETER, STATUS FROM V$ENCRYPTION_WALLET; SELECT MASTERKEY_ACTIVATED FROM V$DATABASE_KEY_INFO;Continue only when the target PDB’s wallet status is
OPENandMASTERKEY_ACTIVATEDisYES.
After restarting a CDB or PDB, check the target PDB’s wallet status. If it is CLOSED, reopen the password-protected keystore before using TDE.
Enable Oracle Backend with Supabase APIs in ORDS
The installation procedures in this chapter target a PDB. Use that PDB’s service name when configuring the ORDS pool and running the installation commands.
The examples in this section use a standalone ORDS deployment:
-
ORDS software directory:
/opt/ords -
ORDS configuration directory:
/opt/ords-config -
ORDS URL:
http://localhost:8080/ords
For the full ORDS installation and configuration workflow, see Installing and Configuring Oracle REST Data Services.
Oracle recommends adding the ORDS bin directory to your PATH, so the examples in this chapter use the ords command directly. If you want to avoid repeating --config, you can also set the ORDS_CONFIG environment variable to your configuration directory.
Replace these example paths and URLs with the values for your environment. Keep the ORDS configuration directory outside the ORDS product directory.
Verify the ORDS Version
Run:
ords --version
Continue only if the reported version is 26.3 or later.
Run the Oracle Backend with Supabase APIs Installer
If you have installed ORDS in standalone mode, a basic layout looks like the following after configuration:
/opt/ords
bin/ords
/opt/ords-config
global/
settings.xml
standalone/
databases/
default/
pool.xml
Enable the backend feature in the installed ORDS database repository. Run the installer with the ORDS command-line interface and point it to your standalone configuration directory. Use the pool configured for the target PDB’s service.
ords --config /opt/ords-config fusabase install
During the prompts, select the existing pool configured for the target PDB. Then provide the feature, passphrase, and administrator values:
-
Set
[1] Enable Feature fusabasetoYes. -
Set
[2] Encryption passphraseto a value you manage yourself or let ORDS generate one. -
Select
[A] Accept and Continue. -
At the administrator username prompt, enter
SYSor the username of a dedicated account prepared with the required ORDS installer privileges. ForSYS, the installer connects asSYS AS SYSDBAto the PDB specified by the selected pool.
If you specify a database connection instead of selecting an existing pool, select the Basic connection type and enter the database host name, listener port, and PDB service name. The TCP listener port is usually 1521.
When the installer finishes, confirm that ORDS reports that the Oracle Backend with Supabase APIs feature is enabled.
For simplicity, this chapter continues with an HTTP localhost example. For shared or production standalone deployments, configure HTTPS rather than HTTP.
If you want to avoid using SYS AS SYSDBA for a PDB installation, Oracle provides the scripts/installer/ords_installer_privileges.sql script to grant a designated database user the privileges needed to install, upgrade, repair, and uninstall ORDS. Use that same designated user for the ORDS installation.
The ORDS installation account is only for the installation step. Schema enablement is a separate action later in this chapter and is performed with a user that has the DBA role.
Configure Deep Data Security
Configure the IAM applications, a secure database connection, and DDS for the ORDS pool before creating a Supabase-style project.
This chapter uses the default ORDS pool for installation, DDS, and Console and CLI access. Use the same pool throughout these procedures. For a named pool, also use its matching pool mapping in the Console and schema URLs.
Configure the IAM Identity Domain
Register the database and ORDS in the same OCI IAM identity domain. The example applications are OracleDB, which represents the database resource, and fusabase, which represents ORDS.
-
In the OCI Console, open Identity & Security > Domains and select your domain. Copy its Domain URL for the DDS enablement command.
-
In Integrated applications, select Add application > Confidential Application > Launch workflow.
Figure 3-1 Add a Confidential Application

Description of the illustration dds-iam-add-confidential.png
-
For Name, enter
OracleDB. You can add a description and leave the optional Application URL empty. Select Submit. -
Open OAuth configuration > Edit OAuth configuration. Under Resource server configuration, select Configure this application as a resource server now and enter
OracleDBfor Primary audience. -
Enable Add scopes and select Add. Enter the following values, leave Requires user consent off, and add the scope:
Field Example value Scope DB_ACCESS_SCOPEDisplay name DB AccessDescription Access the databaseFigure 3-2 Add the Database Access Scope

-
Under Client configuration, select Configure this application as a client now and enable Client credentials. Select Specific for authorized resources.
For this example, select Anywhere for the client IP policy. For a deployment with a configured network perimeter, use the policy that permits the database’s requests to IAM.
Figure 3-3 Database Resource Server Configuration

Description of the illustration dds-iam-database-resource.png
-
Select Submit, then select Actions > Activate. In the confirmation dialog, select Activate application.
Figure 3-4 Activate an Application

Description of the illustration dds-iam-activate-application.png
-
On the database application’s Details page, record its Application ID. The DDS command needs this identifier, which differs from the database application’s OAuth Client ID.
-
Create another confidential application named
fusabaseby repeating steps 2 and 3 with that name. To use an application that already represents your ORDS deployment, open that application instead. -
Open the
fusabaseapplication’s OAuth configuration > Edit OAuth configuration. Under Client configuration, select Configure this application as a client now and enable Client credentials.Use Anywhere for this example, or a configured network perimeter that permits ORDS to contact IAM. Select Specific under Authorized resources.
Figure 3-5 ORDS Client Credentials Configuration

Description of the illustration dds-iam-ords-client-credentials.png
-
Enable Add resources and select Add scope. Expand
OracleDB, selectOracleDBDB_ACCESS_SCOPE, and select Add.Figure 3-6 Select the Database Scope for ORDS

Description of the illustration dds-iam-ords-allowed-scope.png
The fully qualified scope combines the audience and scope name:
OracleDB+DB_ACCESS_SCOPE=OracleDBDB_ACCESS_SCOPE. Do not insert a/between these example values. -
Select Submit, then select Actions > Activate for the
fusabaseapplication. Confirm by selecting Activate application. -
On the
fusabaseapplication’s OAuth configuration page, securely record its Client ID and Client secret. These are the ORDS credentials supplied to the DDS command.Figure 3-7 ORDS OAuth Credentials

Description of the illustration dds-iam-ords-credentials.png
-
Return to Integrated applications and confirm that both applications are Active.
Figure 3-8 Active Database and ORDS Applications

Description of the illustration dds-iam-applications-active.png
-
In the domain’s Settings tab, select Edit domain settings. Under Access signing certificate, enable Configure client access.
Figure 3-9 Allow Public Access to the Signing Certificate

Description of the illustration dds-iam-public-signing-certificate.png
-
Select Save changes. In the separate Save domain settings confirmation, select Save changes again.
Figure 3-10 Confirm the Domain Settings Change

Description of the illustration dds-iam-confirm-domain-settings.png
-
In Bash on the ORDS host, verify that the signing keys are accessible without authentication:
DOMAIN_URL='IAM_DOMAIN_URL' curl --fail --silent --show-error \ "${DOMAIN_URL}/admin/v1/SigningCert/jwk"Replace
IAM_DOMAIN_URLwith the complete domain URL copied in step 1. Continue when the request returns a JSON Web Key Set. An HTTP401 Unauthorizedstatus code indicates that public access is not enabled. -
To verify the ORDS client’s access to the database scope, set
ORDS_CLIENT_IDandORDS_CLIENT_SECRETto the values saved in step 13, then request a token:umask 077 read -r -p 'ORDS client ID: ' ORDS_CLIENT_ID read -r -s -p 'ORDS client secret: ' ORDS_CLIENT_SECRET printf '\n' curl --fail --silent --show-error --request POST \ "${DOMAIN_URL}/oauth2/v1/token" \ --user "${ORDS_CLIENT_ID}:${ORDS_CLIENT_SECRET}" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "grant_type=client_credentials" \ --data-urlencode "scope=OracleDBDB_ACCESS_SCOPE" \ --output db-token-response.json \ --write-out 'HTTP %{http_code}\n'Continue when the request returns HTTP
200and the protected response file contains anaccess_token. Keep the response file and client secret secure. For a different audience or scope name, use the fully qualified scope configured for your database resource.
For more information, see Register the Database in OCI IAM.
Configure the TCPS Connection
DDS requires Transport Layer Security (TLS) on the connection from ORDS to the database to transmit the end-user security context. TCPS is a Transmission Control Protocol (TCP) connection secured with TLS. HTTPS connections to ORDS or IAM and TDE do not secure this database connection.
The fusabase enable-dds command configures DDS identities and OAuth settings; configure the secure database connection separately. For the TLS requirement, see Configure the Database for IAM Integration.
If the project’s ORDS pool already connects to the target PDB over TCPS and validates its server certificate, verify the connection with ords --config /opt/ords-config config verify. Then continue to Enable DDS in ORDS. Otherwise, configure the target PDB’s TCPS service and the ORDS runtime pool as described in this example.
For a named pool, use ords --config /opt/ords-config config --db-pool POOL_NAME verify, replacing POOL_NAME with your pool’s name.
The following Linux example creates a test certificate authority (CA) and a server certificate valid for 30 days. For production, use certificates issued by your approved CA. For certificate alternatives, see Configuring Transport Layer Security Encryption.
The TDE wallet and TLS wallet have separate purposes and locations. This example keeps the TDE wallet in WALLET_ROOT/tde and places the PDB’s TLS wallet in WALLET_ROOT/PDB_GUID/tls.
-
Connect to
CDB$ROOTasSYS AS SYSDBAand identify the wallet root and target PDB’s GUID:SHOW PARAMETER wallet_root; SELECT name, RAWTOHEX(guid) AS pdb_guid FROM v$pdbs WHERE name='PDB_NAME';Replace
PDB_NAMEwith the target PDB name. Use the wallet root configured during TDE setup. The target PDB must be open in read-write mode. -
On the database host, use Bash as the database software owner and prepare the wallet locations and certificate names:
WALLET_ROOT='WALLET_ROOT_PATH' PDB_GUID='PDB_GUID_VALUE' CA_WALLET='CA_WALLET_PATH' CLIENT_WALLET='CLIENT_WALLET_PATH' SERVER_DN='CN=DB_HOST,O=Example' CA_DN='CN=Example Test CA,O=Example' SERVER_WALLET="${WALLET_ROOT}/${PDB_GUID}/tls" umask 077 mkdir -p "$CA_WALLET" "$SERVER_WALLET" "$CLIENT_WALLET" chmod 700 "$CA_WALLET" "$SERVER_WALLET" "$CLIENT_WALLET" read -r -s -p 'CA wallet password: ' CA_PASSWORD printf '\n' read -r -s -p 'TLS wallet password: ' TLS_PASSWORD printf '\n'Replace the following values:
WALLET_ROOT_PATH: the wallet root returned in step 1.PDB_GUID_VALUE: the target PDB’s GUID returned in step 1.CA_WALLET_PATH: a protected directory for the test CA wallet.CLIENT_WALLET_PATH: a separate directory for the ORDS trust wallet.DB_HOST: the database host name that ORDS uses to connect.
Enter strong wallet passwords at the prompts. Keep the same Bash session for the wallet commands that follow.
-
Create the test CA wallet and export its root certificate:
orapki wallet create -wallet "$CA_WALLET" \ -pwd "$CA_PASSWORD" -auto_login orapki wallet add -wallet "$CA_WALLET" -dn "$CA_DN" \ -keysize 2048 -sign_alg sha256 -self_signed -validity 30 \ -pwd "$CA_PASSWORD" orapki wallet export -wallet "$CA_WALLET" -dn "$CA_DN" \ -cert "$CA_WALLET/rootCA.crt" -pwd "$CA_PASSWORD" -
Create the server wallet, generate a certificate request, sign it with the test CA, and import the signed certificate:
orapki wallet create -wallet "$SERVER_WALLET" \ -pwd "$TLS_PASSWORD" -auto_login orapki wallet add -wallet "$SERVER_WALLET" -trusted_cert \ -cert "$CA_WALLET/rootCA.crt" -pwd "$TLS_PASSWORD" orapki wallet add -wallet "$SERVER_WALLET" -keysize 2048 \ -dn "$SERVER_DN" -pwd "$TLS_PASSWORD" orapki wallet export -wallet "$SERVER_WALLET" -dn "$SERVER_DN" \ -request "$SERVER_WALLET/server.csr" -pwd "$TLS_PASSWORD" orapki cert create -wallet "$CA_WALLET" \ -request "$SERVER_WALLET/server.csr" \ -cert "$SERVER_WALLET/server.crt" -validity 30 \ -sign_alg sha256 -pwd "$CA_PASSWORD" orapki wallet add -wallet "$SERVER_WALLET" -user_cert \ -cert "$SERVER_WALLET/server.crt" -pwd "$TLS_PASSWORD" orapki wallet display -wallet "$SERVER_WALLET"Confirm that the server certificate appears under
User Certificatesand the CA certificate appears underTrusted Certificates. -
Create a separate auto-login wallet containing only the CA trust certificate for ORDS:
orapki wallet create -wallet "$CLIENT_WALLET" \ -pwd "$TLS_PASSWORD" -auto_login orapki wallet add -wallet "$CLIENT_WALLET" -trusted_cert \ -cert "$CA_WALLET/rootCA.crt" -pwd "$TLS_PASSWORD" orapki wallet display -wallet "$CLIENT_WALLET" unset CA_PASSWORD TLS_PASSWORDConfirm that this wallet has the CA under
Trusted Certificatesand noUser Certificates. -
Locate the database network configuration files in
TNS_ADMIN, or$ORACLE_HOME/network/adminwhenTNS_ADMINis unset. Insqlnet.ora, add the following setting while retaining the other network settings:TLS_CLIENT_AUTHENTICATION=FALSEThis example uses one-way TLS: the client verifies the server certificate, and the server does not require a client certificate.
-
In
listener.ora, add a TCPS address and the listener’s wallet location. For example, retain TCP administration access while adding TCPS on port2484:LISTENER= (DESCRIPTION_LIST= (DESCRIPTION= (ADDRESS=(PROTOCOL=TCP)(HOST=DB_HOST)(PORT=1521)) (ADDRESS=(PROTOCOL=TCPS)(HOST=DB_HOST)(PORT=2484)))) WALLET_LOCATION= (SOURCE=(METHOD=FILE) (METHOD_DATA=(DIRECTORY=WALLET_ROOT_PATH/PDB_GUID_VALUE/tls))) TLS_CLIENT_AUTHENTICATION=FALSEUse the same server wallet for the listener and the target PDB. Replace
DB_HOST,WALLET_ROOT_PATH, andPDB_GUID_VALUEwith the values used in step 2. Retain other listener entries required by your environment. -
Restart the listener:
lsnrctl stop lsnrctl startReconnect to
CDB$ROOTasSYS AS SYSDBAand register the services:ALTER SYSTEM REGISTER; -
On the ORDS host, create
ORDS_WALLET_PATHas the ORDS software owner and restrict the directory to that owner:mkdir -p ORDS_WALLET_PATH chmod 700 ORDS_WALLET_PATHReplace
ORDS_WALLET_PATHwith the path selected for the ORDS trust wallet. Securely copyewallet.p12andcwallet.ssofrom the database host’sCLIENT_WALLETdirectory into this directory. As the ORDS software owner, restrict the copied files:chmod 600 ORDS_WALLET_PATH/ewallet.p12 ORDS_WALLET_PATH/cwallet.sso -
On the ORDS host, configure the
defaultpool to use the PDB’s TCPS service and require a full certificate distinguished name (DN) match:ords --config /opt/ords-config config set db.connectionType customurl ords --config /opt/ords-config config set db.customURL 'jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCPS)(HOST=DB_HOST)(PORT=2484))(CONNECT_DATA=(SERVICE_NAME=PDB_SERVICE))(SECURITY=(SSL_SERVER_DN_MATCH=YES)(SSL_SERVER_CERT_DN="CN=DB_HOST,O=Example")(WALLET_LOCATION=ORDS_WALLET_PATH)))' ords --config /opt/ords-config config verifyReplace the following values:
DB_HOST: the database host name used in the server certificate and reachable from ORDS.PDB_SERVICE: the target PDB’s service name.ORDS_WALLET_PATH: the ORDS trust wallet directory from step 9.
Match
SSL_SERVER_CERT_DNto the complete server certificate DN. Continue whenconfig verifyreports that the database pool connection is valid.These commands configure the
defaultpool. For a named pool, insert--db-pool POOL_NAMEimmediately afterconfigin each command, includingconfig verify. ReplacePOOL_NAMEwith your pool’s name. Use that same pool for DDS enablement and project access.The connection descriptor uses the Oracle wallet for database certificate trust. Other HTTPS connections, including IAM requests, retain the JVM’s default CA trust configuration.
Enable DDS in ORDS
Enable DDS for the same ORDS configuration directory and TCPS pool used by your project:
-
Run the DDS enablement command:
ords --config /opt/ords-config fusabase enable-dds -
Supply the following values at the prompts:
Prompt Value Database pool The defaultpool configured for TCPS, or your matching named poolEnter the administrator username An account created with CREATE USERand granted theDBArole in the target PDBEnter the database password for the administrator That database account’s password Enter the IDCS domain URL The domain URL copied from the IAM domain’s Details page Enter the OAuth client id The fusabaseapplication’s OAuth Client IDEnter the OAuth client secret The fusabaseapplication’s OAuth Client secretEnter the OCI IAM application id The OracleDBapplication’s Application ID from its Details pageEnter the OAuth scope OracleDBDB_ACCESS_SCOPE, or your database resource’s fully qualified scopeKeep the database application’s Application ID separate from its OAuth Client ID. The OAuth client ID and secret entered here belong to the ORDS application.
-
Restart the ORDS server to load the pool configuration. For a standalone deployment that is not running, start it with:
ords --config /opt/ords-config serve -
Connect to the target PDB as
SYS AS SYSDBAand verify the identity provider, application mapping, and common data role:SHOW PARAMETER identity_provider_type; SELECT application_name, mapped_to FROM dba_application_identities WHERE application_name='BAAS_EUSC_APP'; SELECT data_role, grantee FROM dba_data_role_grants WHERE grantee='BAAS_EUSC_APP' AND data_role='BAAS$COMMON';Confirm that the provider is
OCI_IAM, the application identity maps to the ORDS OAuth Client ID, andBAAS$COMMONis granted toBAAS_EUSC_APP.
Continue with Prepare and Enable the Project Schema, then Open the Console and Create Your First Project.
Prepare and Enable the Project Schema
Each Oracle Backend with Supabase APIs project is owned by one schema. That schema becomes the project owner and receives BAAS_ROLE when the enablement procedure succeeds.
Create the Schema
The following is an example of creating a dedicated tablespace and schema for your project:
CREATE TABLESPACE fusabase_tbs
DATAFILE 'fusabase_tbs01.dbf' SIZE 50M AUTOEXTEND ON
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
CREATE USER fusabase_user IDENTIFIED BY "SCHEMA_PASSWORD"
DEFAULT TABLESPACE fusabase_tbs
QUOTA UNLIMITED ON fusabase_tbs;
Replace SCHEMA_PASSWORD with a strong password for the project-owning schema.
Grant the Required Database Privileges
Grant the privileges used for this example before enabling the schema:
GRANT CREATE SESSION TO fusabase_user;
GRANT RESOURCE TO fusabase_user;
The schema enablement procedure assigns BAAS_ROLE and grants the DDS privileges described in Enable DDS for the Project Schema.
For service-specific storage prerequisites, see Storage Setup and Configuration.
Enable the Schema for Oracle Backend with Supabase APIs
Connect to the target PDB as SETUP_ADMIN, or another DBA account whose privileges the schema enablement package can inherit. Do not invoke this procedure as SYS or SYSTEM. Run:
BEGIN
OBAAS_ADMIN.OBAAS_ENABLE_SCHEMA(
'FUSABASE_USER',
'BASE_PATH',
'fusabase_user',
FALSE
);
END;
/
COMMIT;
In this example, BASE_PATH is the ORDS URL mapping type, and fusabase_user is the ORDS path mapping pattern exposed in the schema URL. These parameters follow the same behavior as p_url_mapping_type and p_url_mapping_pattern in ORDS.ENABLE_SCHEMA.
The procedure enables the schema for Oracle Backend with Supabase APIs and assigns BAAS_ROLE.
Enable DDS for the Project Schema
Complete the schema enablement procedure after enabling DDS in ORDS. Schema enablement grants the following DDS privileges automatically:
-
CREATE END USER SECURITY CONTEXT -
CREATE DATA GRANT -
ADMINISTER ANY DATA GRANTon the project-owning schema
You do not need to grant these privileges separately.
Open the Console
If ORDS is stopped, start it:
ords --config /opt/ords-config serve
For a standalone deployment, keep the server terminal open while continuing in the browser. If you started ORDS during DDS enablement, use that running server.
Open http://localhost:8080/ords/_/landing in your browser. Replace the host and port if ORDS is running elsewhere. Select Go on the Oracle Backend for Fusabase tile and sign in with the fusabase_user credentials.
Figure 3-11 ORDS Landing Page

Description of the illustration dds-ords-landing.png
Create Your First Project
Create a relational project for the schema you enabled:
-
In the Console, on the Oracle Backend with Supabase APIs card, select Create project.
-
After completing the DDS configuration, select Yes, Deep Data Security is enabled.
Figure 3-12 Confirm DDS Configuration

Description of the illustration dds-console-confirm-enabled.png
-
Select Continue.
-
In Project name, enter a name for your project.
-
For this example, select Set up using quickstart and leave Set up authentication for me and Set up storage for me selected.
Figure 3-13 Create a Project Using Quickstart

Description of the illustration dds-console-project-quickstart.png
-
Select Create Project.
The Console lists the new project. This project uses the RELATIONAL project type. Quickstart configures Basic authentication and BASE storage for this example.
Open the project to view its Overview page:
Figure 3-14 Project Overview

Description of the illustration dds-console-project-overview.png
For more information, see Creating a Project.
Configure the CLI
The CLI needs an ORDS OAuth client for schema administration. This client is created in Database Actions and is separate from the OCI IAM client used by ORDS for DDS. Install the CLI from npm, then configure its administrative OAuth client.
Install the CLI from npm
Before you begin, install Node.js 18 or later and npm.
Install the CLI globally from npm:
npm install -g fusabase-cli
Verify that your shell can find the installed command:
fusabase --help
Create an OAuth Client for the CLI
-
Open Database Actions for the schema you enabled for Oracle Backend with Supabase APIs. Dismiss any welcome tour before continuing.
Figure 3-15 Database Actions Launchpad

Description of the illustration dds-cli-database-actions.png
-
Open REST, then open Security and select OAuth Clients.
Figure 3-16 REST Security Options

-
Select Create OAuth Client.
-
Confirm that Owner is the enabled schema. Enter the following values for the example client:
-
Grant type:
CLIENT_CRED -
Name:
fusabase-cli -
Description: a description such as
OAuth client for the fusabase CLI -
Support Email and Support URI: contact values appropriate for your environment
Figure 3-17 Define the CLI OAuth Client

Description of the illustration dds-cli-oauth-definition.png
-
-
On the Roles tab, select SQL Developer and move it into the selected roles list using the right-arrow control. This role enables the CLI’s administrative API calls.
Figure 3-18 Grant the SQL Developer Role

Description of the illustration dds-cli-sql-developer-role.png
-
Select Create. The client secret dialog appears.
-
Copy the client secret and store it securely before closing the dialog. The secret is shown only once; if you lose it, rotate the secret to generate another.
Figure 3-19 Save the Client Secret

-
Select OK. On the OAuth client card, show or copy the Client ID and save it with the secret. You can return to this card to copy the Client ID again.
Figure 3-20 CLI OAuth Client Card

Create the CLI Configuration File
Create a fusabase.config.js file in the same directory where you will run the CLI:
module.exports = {
host: 'http://localhost:8080/ords/fusabase_user/'
}
Replace the example URL with your actual ORDS host, port, and schema base path. Keep the trailing /.
Sign In to the CLI
From that same directory, run:
fusabase init
Enter the OAuth client ID and client secret for the client you created in Database Actions. The CLI requests an access token and reports a successful login.
It then lists the available projects and prompts you to select one. Select the relational project you created in the Console.
The CLI saves the token and selected project in .fusabase.conf in the working directory. Exclude this session file from version control.
Confirm the CLI Can Reach Your Schema
After you sign in, run:
fusabase list-projects
Confirm that the output includes the relational project you created in the Console. If the project is absent, verify the schema URL in fusabase.config.js and the project selected during fusabase init.
Verify the Installation
The installation and administrative setup are complete when all of the following are true:
-
The database release is
23.26.3.0.0or later,COMPATIBLEis at least23.9.0, andMAX_STRING_SIZE=EXTENDED. -
The target PDB’s TDE wallet is open and its master key is activated.
-
ORDS
26.3or later has Oracle Backend with Supabase APIs enabled. -
The project’s ORDS pool uses TCPS, and DDS enablement in ORDS has completed for that pool.
-
The IAM signing keys are public, and the ORDS IAM client can obtain a database-scoped token.
-
The schema was enabled successfully through
OBAAS_ADMIN.OBAAS_ENABLE_SCHEMA. -
The Console opens and lets you sign in as
fusabase_user. -
The Console shows your relational project.
-
fusabase --helpruns successfully. -
fusabase initauthenticates with your OAuth client credentials and saves your project selection. -
fusabase list-projectsconnects without configuration or authentication errors.
These checks verify administrative access. After adding a web app, complete the following check to verify application data access through DDS.
Verify Application Data Access
Use the Console to create a table, add rows, and configure a DDS data grant. Then use your registered web app to verify that DDS returns only the permitted row.
Use the relational project created in this chapter and sign in to the Console as its schema owner. For the SDK check, use the app’s generated configuration and an application session without a signed-in user.
-
In the Console, open your project and select Database > Table Editor. Select Tables.
-
Select Create table. For Table name, enter
DDS_SETUP_CHECK. Use an unused name if that table already exists, and use that name throughout this check.Add the following columns:
- Select Add Columns. For Column name, enter
ID; for Data type, selectINT. Select Make primary key, then select Add. - Select Add Columns again. For Column name, enter
PROBE_VALUE; for Data type, selectVARCHAR2. Select Add.
Figure 3-21 Create the Verification Table

Description of the illustration dds-console-check-create-table.png
Select Save. Confirm that
DDS_SETUP_CHECKappears in the table list. - Select Add Columns. For Column name, enter
-
Select
DDS_SETUP_CHECK, then select Insert > Row. Enter1for ID andallowed-rowfor PROBE_VALUE.Figure 3-22 Add a Verification Row

Description of the illustration dds-console-check-add-row.png
Select Save. Repeat Insert > Row to add a second row with ID
2and PROBE_VALUEhidden-row, then select Save. -
Confirm that the Table Editor displays both rows. This verifies that the schema owner can create and manage the table through the Console.
Figure 3-23 Verify Both Rows in the Console

Description of the illustration dds-console-check-two-rows.png
-
In Table Editor, select Grants > Create grant. Configure the grant:
- Grant name:
DDS_SETUP_READ, or another unused grant name. - Object type:
Table. - Target object:
DDS_SETUP_CHECK. - Roles: the schema’s NoAuth role, such as
FUSABASE_USER$noauth_role. The screenshots use the test schema’sTESTUSER$noauth_role.
Figure 3-24 Configure the Verification Grant

Description of the illustration dds-console-check-grant.png
Under Actions, select only SELECT. Leave INSERT, UPDATE, and DELETE cleared.
For Column scope, select Selected columns and choose
IDandPROBE_VALUEin Columns.For Row scope, select Matching rows. Set Column name to
ID, leave Operator set to=, and enter1for Value.Confirm that the SQL preview grants
SELECTon those two columns, withWHERE ID = 1, to the NoAuth role. Select Create grant. - Grant name:
-
Confirm that
DDS_SETUP_READappears in the grants list. To inspect the saved rule, open its Actions menu and select Edit. Review the SQL preview, then select Cancel to close the dialog without changing the grant.Figure 3-25 Inspect the Saved Verification Grant

Description of the illustration dds-console-check-grant-scope.png
The saved predicate can appear as Custom condition when you reopen the grant. Confirm that the SQL preview still contains
WHERE ID = 1. -
In your web app, initialize the relational SDK client with the app configuration copied from the Console. Follow Adding Oracle Backend with Supabase APIs to Your Apps. In a browser session where you have not signed in to the application, run this code after initializing
client:const { data, error } = await client .from('DDS_SETUP_CHECK') .select('ID,PROBE_VALUE') .order('ID', { ascending: true }); if (error) { throw error; } if (data?.length !== 1 || data[0].ID !== 1 || data[0].PROBE_VALUE !== 'allowed-row') { throw new Error('DDS verification failed: unexpected rows.'); } console.log('DDS verification passed:', data);Confirm that the browser console reports
DDS verification passedand shows only theallowed-rowrow. The second row must remain hidden from the application even though the Console displays it to the schema owner. This verifies application access through DDS as well as table management in the Console. -
After verification, remove the test objects in the Console:
- In Table Editor > Grants, open the
DDS_SETUP_READActions menu, select Delete, and confirm Delete. - In Table Editor > Tables, select
DDS_SETUP_CHECK. Open the menu next to the table name, select Delete table, and confirm Delete.
If you changed the test names, select those objects for cleanup.
- In Table Editor > Grants, open the
Troubleshooting
-
Database compatibility warnings: Run
show parameter compatibleagain, updateCOMPATIBLEinCDB$ROOT, and restart the database. -
MAX_STRING_SIZE is still STANDARD: Repeat the PDB upgrade-mode sequence and make sure
@?/rdbms/admin/utl32k.sqlcompletes without errors. -
Wallet or TDE errors: Verify
wallet_rootandtde_configuration, reopen the keystore, and confirmV$ENCRYPTION_WALLETshowsOPEN. -
ORDS does not expose Oracle Backend with Supabase APIs: Rerun
ords --config /opt/ords-config fusabase installand confirm that[1] Enable Feature fusabaseis set toYes. -
The Console opens, but the schema cannot create a project: Reconnect as a
DBAuser, rerunOBAAS_ADMIN.OBAAS_ENABLE_SCHEMA, and confirm that the schema receivedBAAS_ROLE. -
ORA-06598 during OBAAS_ADMIN.OBAAS_ENABLE_SCHEMA: The schema enablement package cannot inherit the caller’s privileges. The
DBArole alone does not establish that permission. Use the dedicated administrative account prepared in Prerequisites, or an account permitted by your database’s inheritance policy. -
fusabaseis not found after installation: Verify that the global npm installation completed and that npm’s global executable directory is on yourPATH. Then runfusabase --help. -
CLI authentication fails: Verify that you copied the correct OAuth client ID and client secret, and confirm that the OAuth client has the SQL Developer role.
-
fusabase initfails to fetch a token: Check thehostvalue infusabase.config.js, make sure the URL ends with/, verify that ORDS is reachable from your machine, and confirm that you entered the correct OAuth client ID and client secret. -
fusabase list-projectsfails after login: Confirm that the schema URL infusabase.config.jsis correct and that you are connecting to the same schema where Oracle Backend with Supabase APIs is enabled. -
ORDS reports an OCI IAM database-access-token request failure with HTTP 401: Verify the ORDS IAM application’s client ID, client secret, activation, and authorized database scope. Use the
fusabaseIAM application’s credentials, not the Database Actions client created for the CLI. Repeat the token check in Configure the IAM Identity Domain, correct the values supplied tofusabase enable-dds, and restart ORDS after changing its settings. -
ORA-18718 during an application query: Verify that the application’s runtime pool uses TCPS and validates the database server certificate. Follow Configure the TCPS Connection and restart ORDS after changing its configuration. This error can occur during a
SELECT; it is not limited to writes. -
ORDS connects to the wrong database service: Correct the affected pool’s connection settings to use the target PDB service. For a custom URL, update
db.customURL; for a Basic connection, updatedb.servicename. Verify the connection withconfig verifyand restart ORDS. For a named pool, include--db-pool POOL_NAMEimmediately afterconfig, replacingPOOL_NAMEwith that pool’s name.