Skip to content

Latest commit

 

History

History
180 lines (128 loc) · 9.77 KB

QUICKSTART-ORACLE.md

File metadata and controls

180 lines (128 loc) · 9.77 KB

Oracle Database quickstart

The Oracle profile provisions one least-privilege schema owner per tenant. Application connections use tenant credentials, never the provisioning identity.

1. Clone and build

git clone https://github.com/Proxima-Engine/proxima-engine.git
cd proxima-engine
cargo build --locked --release -p proxima-engine

2. Generate tenant provisioning SQL

use proxima_engine::oracle_tenant::OracleTenant;

let tenant = OracleTenant::new("customer_01", &generated_secret)?;
for statement in tenant.provisioning_sql() {
    // Execute only with a separate Oracle administration connection.
    println!("{statement}");
}
let tenant_database_user = tenant.connect_user();

Execute the generated DDL using a separately authenticated Oracle administration connection. Store tenant passwords in a secret manager.

3. Verify against Oracle Free

export ORACLE_PASSWORD='disposable-test-secret'
bash scripts/test-oracle-tenant-isolation-ci.sh

The script provisions two schema owners and verifies tenant-local access, cross-schema data isolation and effective grants. It removes its disposable test container on exit.

Next: Complete Oracle guide · Security

2A. Prepare Oracle Free

Use a disposable Oracle Free 23 instance for acceptance. Keep the Oracle administration connection separate from tenant application connections. Confirm the USERS tablespace and the privileges available to the provisioning account before executing generated DDL.

2B. Apply the tenant schema

The generated statements create one schema owner per tenant with a bounded quota and only the schema object-creation privileges described in the full guide. Review the statements and execute them through the separately authenticated Oracle administration connection. Do not execute provisioning DDL as a tenant user. Store generated tenant passwords in a secret manager.

2C. Configure application pools

Create a separate connection pool for each tenant using that tenant's Oracle username and password. Resolve tenant membership on the trusted backend before selecting the pool. Do not share the provisioning identity with application processes, and do not use a single privileged account with a mutable CURRENT_SCHEMA as a tenant boundary.

2D. Acceptance checklist

  • Each tenant can create and access objects in its own schema.
  • A tenant cannot read another tenant's marker data.
  • Tenant users have no DBA role, ANY privileges or unintended cross-schema object grants.
  • Tenant credentials are stored and rotated securely.
  • Backup, recovery and the required PDB/database isolation level are documented.

This profile is schema-per-tenant within one Oracle database/PDB; it is not database-per-tenant. See Oracle Database tenant isolation for the exact grants and verification assertions.

Windows PowerShell: clone and build

Open PowerShell in the folder where you keep source repositories. Install Git, the stable Rust toolchain and Cargo first. For gateway providers, Docker Desktop is also required for the disposable database service used by the acceptance test.

git clone https://github.com/Proxima-Engine/proxima-engine.git
Set-Location .\proxima-engine
cargo build --locked --release -p proxima-engine
if ($LASTEXITCODE -ne 0) { throw "Proxima build failed" }

Run the command from the repository root. If you already cloned the repository, use Set-Location to enter the extracted proxima-engine directory instead of cloning a second copy. Keep generated credentials, certificates and local environment files outside Git.

Configuration review before starting

Before launching this provider, verify all of the following against the full provider guide:

  1. The provider endpoint, port and distribution/version identify the intended disposable or customer database.
  2. Tenant IDs are resolved by the trusted application backend and are not accepted as authorization claims from a browser.
  3. Each tenant has its own database/schema/keyspace/index namespace or IAM identity, as applicable to this provider.
  4. Provisioning credentials are separate from tenant application credentials and are not stored in the client registry as plaintext.
  5. Certificate authorities, server names and client certificates are configured for every network TLS leg.
  6. Listener exposure is limited to the application network. Keep local tests on loopback.
  7. Registry files and private keys have restrictive permissions and are excluded from source control.

Runtime diagnostics

Start the provider process in a dedicated terminal and keep its logs visible while connecting a test client. Confirm the process is listening on the configured address before running application queries. If the client cannot connect, check the process output, port binding, upstream reachability and the database service's readiness before changing tenant policy.

If authentication fails, compare the client principal and tenant mapping with the registry or native provider identity. If a certificate error occurs, validate the configured CA and server name; do not disable certificate verification to make the connection succeed. If a cross-tenant test succeeds unexpectedly, stop the test and review the provider-native grants, namespace mapping and trusted tenant-resolution path before continuing.

Production handover checklist

  • Repeat the acceptance suite against a disposable instance matching the intended provider version.
  • Record the exact provider version, Engine release, configuration revision and test result.
  • Test allowed tenant operations and denied cross-tenant reads and writes.
  • Verify backup/restore and credential rotation for the provider's isolation model.
  • Move secrets into the deployment secret manager and enable verified TLS.
  • Restrict network access to the Engine and database endpoints.
  • Monitor Engine health, provider errors, rejected sessions and credential lifecycle.
  • Use the linked complete provider guide for deployment-specific settings and operational procedures.

Use the shared Agata Proxima SDK and CLI

The SDK and agata CLI are shared across all twelve database providers. You do not install a separate SDK or CLI for oracle. Download the integration starter kit from the public developer downloads page and extract it.

Linux/macOS:

curl -fL https://agataproxima.com/downloads/agata-proxima-integration-starter-kit.zip -o agata-proxima-integration-starter-kit.zip
unzip agata-proxima-integration-starter-kit.zip -d agata-proxima-integration-starter-kit
cd agata-proxima-integration-starter-kit
npm ci
npm run check
npm link
agata --help

Windows PowerShell:

Invoke-WebRequest "https://agataproxima.com/downloads/agata-proxima-integration-starter-kit.zip" -OutFile ".\agata-proxima-integration-starter-kit.zip"
Expand-Archive ".\agata-proxima-integration-starter-kit.zip" -DestinationPath ".\agata-proxima-integration-starter-kit" -Force
Set-Location ".\agata-proxima-integration-starter-kit"
npm ci
npm run check
npm link
agata --help

Set the Cloud API origin and organization-scoped API key in the trusted backend environment or secret manager. Do not put the key in a browser bundle, source control, command-line argument or application log.

export AGATA_API_BASE_URL=https://api.agataproxima.com
export AGATA_API_KEY=aga_your_organization_key
agata health
agata whoami
agata databases providers
agata databases targets
agata nodes list
agata deployments list
agata verification list

For PowerShell, use $env:AGATA_API_BASE_URL and $env:AGATA_API_KEY instead of Bash export. Create a provider target using a reviewed private target.json, then use agata databases targets create target.json. Assign the target with agata databases targets assign TARGET_ID NODE_ID, create a tenant binding with agata databases bindings create binding.json, and inspect the resulting deployment and verification records. The full provider guide defines the exact target and runtime configuration fields for this database.

The same JavaScript SDK can be used from a trusted Node.js service:

import { AgataClient, createProviderRuntimeConfig } from "./node/agata-client.mjs";

const agata = new AgataClient();
const [health, providers, targets] = await Promise.all([
  agata.health(),
  agata.listDatabaseProviders(),
  agata.listDatabaseTargets(),
]);

const runtimeConfig = createProviderRuntimeConfig("oracle", {
  host: "replace-with-your-provider-host",
});
console.log({ health, providers, targets, runtimeConfig });

Replace the host and add any provider-specific fields required by the complete guide (for example a DynamoDB table ARN, Cassandra datacenter, Elasticsearch distribution, or local SQLite storage settings). The SDK prepares the provider runtime configuration; the Engine and provider-side checks remain responsible for applying and verifying it.

End-to-end Cloud workflow

  1. Register the existing database as a target under Dashboard → Databases or with the shared SDK/CLI.
  2. Enroll the customer-hosted Proxima Engine node and confirm its heartbeat.
  3. Assign the database target to a node that advertises the matching provider runtime.
  4. Create one tenant/database binding for each tenant and retain the one-time application credentials in your secret manager.
  5. Deploy the desired configuration and wait for the Engine's applied revision and provider evidence.
  6. Connect the application using its existing native database driver or client and the tenant-specific connection identity.
  7. Run the positive and cross-tenant negative checks in this quickstart before routing production traffic.

Useful links: Shared SDK and CLI downloads · Cloud API reference · Engine provider runtime reference.