Skip to content

Latest commit

 

History

History
709 lines (550 loc) · 51.8 KB

ENTERPRISE_DEMO.md

File metadata and controls

709 lines (550 loc) · 51.8 KB

Proxima Engine Enterprise Demo

A reproducible, provider-by-provider demonstration of Proxima Engine tenant security, provider-native authorization, emergency access controls and measured workload behavior.

This is the primary guide for recording and sharing an engineering demonstration with CTOs, platform teams, security engineers and database developers.

1. What the demonstration is designed to prove

The demonstration follows an application request through Proxima Engine to the selected database provider. It uses disposable test data and provider-specific security controls. The intended viewer should be able to inspect the commands, observe the requests, see the authorization outcomes and reproduce the run from a clean clone.

The demonstration covers:

  • The complete supported database catalog.
  • Tenant A and Tenant B identity and data separation.
  • Provider-native authorization and Proxima gateway enforcement where implemented.
  • Cross-tenant read and write attempts.
  • Invalid identity and privilege-escalation attempts covered by each provider suite.
  • Shared Engine break-glass token and audit tests.
  • An independent live workload profile for every supported provider, with provider-native request latency, throughput, achieved concurrency and request counts.
  • A consolidated report containing provider results and run metadata.

2. Supported database catalog

Provider Test implementation Main boundary exercised
PostgreSQL Disposable PostgreSQL, PgBouncer and Proxima Engine integration Signed tenant identity, PostgreSQL roles and RLS
MySQL 8 Disposable MySQL and Proxima MySQL gateway integration Tenant identity mapping and least-privilege upstream accounts
MariaDB Disposable MariaDB and Proxima MySQL-compatible gateway integration Tenant identity mapping and MariaDB permissions
CockroachDB Disposable secure CockroachDB cluster and Proxima Engine Tenant roles and row-level policies
MongoDB Disposable MongoDB and Proxima MongoDB gateway integration SCRAM identity and tenant database mapping
Redis Disposable Redis TLS/ACL service and Proxima Redis gateway Tenant key namespace, TLS and ACL identity
Microsoft SQL Server Disposable SQL Server 2022 Database/login separation and least privilege
SQLite Local Rust provider tests Tenant file, path and symlink boundaries
Oracle Database Disposable Oracle Free 23 Schema ownership and least-privilege grants
Amazon DynamoDB Real AWS IAM principals and disposable table IAM LeadingKeys partition isolation
Apache Cassandra Disposable Cassandra 5 Keyspace-per-tenant roles and grants
Elasticsearch Secured HTTPS Elasticsearch cluster Native roles, document-level and field-level security
OpenSearch Secured HTTPS OpenSearch cluster Security plugin roles, document-level and field-level security

Each provider keeps its native security model. A PostgreSQL RLS result is not reused as a MongoDB, Redis, DynamoDB or search-cluster result.

3. Clone and run

Linux, Ubuntu and WSL 2

Install Git, Python 3, Rust stable with Cargo, Docker Engine or Docker Desktop with Compose v2, and the native client tools required by the provider acceptance suites.

git clone https://github.com/Proxima-Engine/proxima-engine.git
cd proxima-engine
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install -r scripts/requirements-provider-bench.txt
bash scripts/proxima-enterprise-demo.sh

The default selection is all 13 providers. The runner builds the workspace, runs each provider's acceptance suite, then runs a provider-native live workload for every selected database. Each provider has its own report under provider-workloads/; the consolidated HTML, Markdown and JSON reports present the same measurement fields for every provider.

Windows 11

Use WSL 2 with Ubuntu and Docker Desktop WSL integration enabled. Install the Python benchmark dependencies inside Ubuntu, not only in Windows:

git clone https://github.com/Proxima-Engine/proxima-engine.git
cd proxima-engine
.\scripts\proxima-enterprise-demo.ps1

The PowerShell entry point delegates to the same Bash/Python runner through WSL when available. It passes provider selection, tenant count, concurrency, worker cap, warm-up, measurement duration and ramp-up settings to the shared runner.

Select one provider

bash scripts/proxima-enterprise-demo.sh --database postgres
bash scripts/proxima-enterprise-demo.sh --database mysql
bash scripts/proxima-enterprise-demo.sh --database mariadb
bash scripts/proxima-enterprise-demo.sh --database cockroach
bash scripts/proxima-enterprise-demo.sh --database mongodb
bash scripts/proxima-enterprise-demo.sh --database redis
bash scripts/proxima-enterprise-demo.sh --database sqlserver
bash scripts/proxima-enterprise-demo.sh --database sqlite
bash scripts/proxima-enterprise-demo.sh --database oracle
bash scripts/proxima-enterprise-demo.sh --database dynamodb
bash scripts/proxima-enterprise-demo.sh --database cassandra
bash scripts/proxima-enterprise-demo.sh --database elasticsearch
bash scripts/proxima-enterprise-demo.sh --database opensearch

Supported selectors: all, postgres, mysql, mariadb, cockroach, mongodb, redis, sqlserver, sqlite, oracle, dynamodb, cassandra, elasticsearch, opensearch.

Workload controls

Every selected provider receives the same tenant-identity target, concurrency target, warm-up, measurement duration and ramp-up interval. Provider workloads execute sequentially so that one local host does not have to run all database clusters at once.

bash scripts/proxima-enterprise-demo.sh \
  --database all \
  --config "$HOME/.config/proxima/provider-bench-config.json" \
  --tenants 2 \
  --concurrency 64 \
  --max-workers 64 \
  --duration-seconds 60 \
  --warmup-seconds 10 \
  --ramp-interval-ms 5000

For a larger test, prepare the requested number of real tenant connection profiles for every provider selected, then run:

bash scripts/proxima-enterprise-demo.sh \
  --database all \
  --config "$HOME/.config/proxima/provider-bench-config.json" \
  --tenants 50000 \
  --concurrency 50000 \
  --max-workers 50000 \
  --duration-seconds 60 \
  --warmup-seconds 10 \
  --ramp-interval-ms 5000

The 50,000-tenant run requires at least 50,000 distinct tenant connection entries for each provider selected. The 50,000 concurrency target requests 50,000 simultaneous workers per provider. Set max-workers to the concurrency target when the host can sustain that many live database client workers. A lower worker cap is recorded and the provider result becomes INCOMPLETE if the requested concurrency is not achieved. The report always records requested and observed active-worker concurrency separately from peak simultaneous in-flight operations.

Option Default Meaning
--database all Run all 13 providers or one named provider
--config scripts/provider-bench-config.example.json Provider-specific tenant connection profile JSON
--tenants 2 Number of real tenant identities to exercise independently for each provider
--concurrency 64 Target simultaneous live query workers for each provider
--max-workers 512 Maximum worker threads allowed on the local host
--duration-seconds 30 Measured workload window for each provider
--warmup-seconds 5 Per-worker warm-up before measurement
--ramp-interval-ms 1,000 Total worker ramp-up interval for each provider; 0 starts all workers together
--no-build off Reuse existing build artifacts
--output-dir verification-results Evidence parent directory

The workload flags are not tied to a single database. The same values are passed to every selected provider. Each provider uses its own native connection profiles and credentials from the configuration file.

4. Provider prerequisites and configuration

The runner checks local tools, credentials and ports before executing each profile. Install the clients required by the selected providers. The benchmark dependency file installs the Python drivers. On Ubuntu, install the native build and ODBC headers needed by those drivers with the system packages listed in the bootstrap section.

Provider Local tools / services Configuration
PostgreSQL Docker Compose v2, curl, Python 3, Cargo Uses disposable local PostgreSQL/PgBouncer fixture
MySQL 8 Docker, mysql, mysqladmin, OpenSSL, Cargo, Python 3 Disposable MySQL 8 fixture and MySQL gateway tenant suite
MariaDB Docker, mysql, mysqladmin, OpenSSL, Cargo, Python 3 Disposable MariaDB 11.4 fixture and MariaDB gateway tenant suite
CockroachDB Docker, psql, timeout, OpenSSL, Python 3, Cargo Disposable CockroachDB 25.2 secure cluster
MongoDB Docker, OpenSSL, nc, Cargo, Python 3 Disposable MongoDB 8 fixture
Redis Docker, OpenSSL, redis-cli, Cargo, Python 3 Disposable Redis TLS/ACL fixture
SQL Server Docker, OpenSSL, Python 3, sqlcmd 18 Set MSSQL_SA_PASSWORD to a strong disposable test password
SQLite Cargo Runs the SQLite tenant file/path/symlink test suite
Oracle Docker, OpenSSL, Python 3 Set ORACLE_PASSWORD to a strong disposable test password
DynamoDB AWS CLI v2, jq Set AWS_REGION, AWS_PROFILE_TENANT_A, AWS_PROFILE_TENANT_B, DYNAMODB_TEST_TABLE, and DYNAMODB_SORT_KEY; optionally set DYNAMODB_PARTITION_KEY (default tenant_id)
Cassandra Docker, OpenSSL, Python 3 Disposable Cassandra 5 fixture
Elasticsearch curl, jq, secured HTTPS cluster Set ELASTICSEARCH_URL, ELASTICSEARCH_ADMIN_USER, ELASTICSEARCH_ADMIN_PASSWORD
OpenSearch curl, jq, OpenSSL, secured HTTPS cluster with Security plugin Set OPENSEARCH_URL, OPENSEARCH_ADMIN_USER, OPENSEARCH_ADMIN_PASSWORD

DynamoDB IAM setup

DynamoDB verification uses AWS IAM authorization, not DynamoDB Local. Configure two distinct least-privilege IAM principals in the same dedicated test account. Their policies must constrain the table's partition key through dynamodb:LeadingKeys. The selected disposable table must use the configured partition key and a sort key. The test checks each principal's identity, own-partition access, cross-partition GetItem/Query denial and Scan denial. The script creates run-scoped canary records and removes them on exit.

Elasticsearch and OpenSearch setup

Use disposable HTTPS clusters with authentication and their provider security features enabled. The scripts create run-scoped test indices, users or API keys, tenant roles, document-level filters and field-level restrictions. Administrator credentials are used only for fixture setup and cleanup. Do not point these tests at production clusters.

Prepare a clean Ubuntu / WSL 2 machine

For Ubuntu running directly on Linux, install the operating-system tools used by the local provider fixtures:

sudo apt-get update
sudo apt-get install -y \
  git curl jq openssl ca-certificates gnupg lsb-release \
  python3 python3-venv python3-pip \
  build-essential pkg-config libssl-dev \
  netcat-openbsd postgresql-client default-mysql-client unixodbc-dev python3-dev libev-dev

Install stable Rust and Cargo using rustup:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
. "$HOME/.cargo/env"
rustup toolchain install stable
rustup default stable

Install Docker Engine with the Docker Compose v2 plugin using Docker's official Ubuntu installation instructions, or use Docker Desktop with WSL integration. Start the Docker service where applicable, then verify that the current user can access the daemon:

docker --version
docker compose version
docker info
cargo --version
rustc --version
python3 --version
git --version

For Windows 11 with Docker Desktop:

  1. Install WSL 2 and an Ubuntu distribution.
  2. In Docker Desktop, enable the WSL 2 engine and integration for that Ubuntu distribution.
  3. Open Ubuntu and run docker info. It must show the Docker server, not only the client.
  4. Install Rust, Python 3 and the provider command-line tools inside Ubuntu.
  5. Clone the repository inside the Ubuntu filesystem and run the Bash entry point there.

Run preflight checks before the full demonstration

git status --short
docker info
docker compose version
cargo --version
python3 --version
openssl version
curl --version
python3 scripts/test_provider_live_workload.py
bash scripts/proxima-enterprise-demo.sh --help

Install the client for each selected provider in the same environment that runs the command. A client installed in Windows is not automatically available inside WSL Ubuntu.

Provider port allocation

The local fixtures bind to loopback interfaces. Check the full provider port matrix before starting acceptance fixtures or persistent Engine listeners:

for port in 6432 15432 16432 19090 19080 9080 9090 3306 3307 3308 3309 26257 16433 19091 27017 27018 6380 6389 1433 1521 19042; do
  if timeout 1 bash -c "</dev/tcp/127.0.0.1/$port" 2>/dev/null; then
    printf 'IN USE  %s\n' "$port"
  else
    printf 'FREE    %s\n' "$port"
  fi
done
Provider / service Host port Purpose
PostgreSQL Engine listener 6432 PostgreSQL wire-protocol entry point
PostgreSQL service 15432 Disposable database service
PgBouncer upstream 16432 Transaction-pooling upstream
PostgreSQL metrics 19090 Local metrics and health endpoint
PostgreSQL dashboard 19080 Local dashboard endpoint
PostgreSQL acceptance metrics 9090 Acceptance Compose metrics mapping
PostgreSQL acceptance dashboard 9080 Acceptance Compose dashboard mapping
MySQL 8 upstream 3306 Disposable MySQL service
MySQL gateway 3307 Proxima MySQL protocol listener
MariaDB upstream 3308 Disposable MariaDB service
MariaDB gateway 3309 Proxima MySQL-compatible listener
CockroachDB service 26257 Secure SQL endpoint
CockroachDB Engine listener 16433 PostgreSQL-compatible Proxima listener
CockroachDB metrics 19091 Local metrics endpoint
MongoDB service 27017 Disposable MongoDB service
MongoDB gateway 27018 Proxima OP_MSG listener
Redis gateway 6380 Proxima Redis TLS listener
Redis upstream 6389 Redis TLS/ACL service
Microsoft SQL Server 1433 SQL Server service
Oracle Database 1521 Oracle service
Apache Cassandra 19042 Cassandra native transport

SQLite uses local files. DynamoDB uses the configured AWS endpoint and region. Elasticsearch and OpenSearch use their secured HTTPS cluster endpoints.

The acceptance fixtures create and remove temporary database services. The live workload phase connects to the persistent provider services and gateway listeners configured in the private tenant connection profile. The workload runner does not change ports or reconfigure a provider.

Provider environment configuration

Create a private shell environment file outside the repository, then source it before running the demo. Do not commit the file:

mkdir -p "$HOME/.config/proxima"
chmod 700 "$HOME/.config/proxima"
nano "$HOME/.config/proxima/enterprise-demo.env"
chmod 600 "$HOME/.config/proxima/enterprise-demo.env"
source "$HOME/.config/proxima/enterprise-demo.env"

Add only the credentials for the provider profiles you intend to run. Example variable names:

MSSQL_SA_PASSWORD='use-a-disposable-strong-password'
ORACLE_PASSWORD='use-a-disposable-strong-password'

AWS_REGION='us-east-1'
AWS_PROFILE_TENANT_A='proxima-tenant-a-test'
AWS_PROFILE_TENANT_B='proxima-tenant-b-test'
DYNAMODB_TEST_TABLE='proxima-tenant-acceptance'
DYNAMODB_PARTITION_KEY='tenant_id'
DYNAMODB_SORT_KEY='record_id'

ELASTICSEARCH_URL='https://your-disposable-elasticsearch-endpoint'
ELASTICSEARCH_ADMIN_USER='your-test-admin'
ELASTICSEARCH_ADMIN_PASSWORD='your-test-password'

OPENSEARCH_URL='https://your-disposable-opensearch-endpoint'
OPENSEARCH_ADMIN_USER='your-test-admin'
OPENSEARCH_ADMIN_PASSWORD='your-test-password'

Use your actual dedicated test endpoints and secrets. The endpoint strings above are examples of variable placement, not live services. The MySQL and MariaDB fixtures create disposable local root passwords when the corresponding variables are absent.

4A. Configure live workload identities for every provider

The acceptance suites and live workload profiles have separate responsibilities. The acceptance suite runs the provider's tenant-security assertions. The live workload opens real native client sessions using the tenant identities in your benchmark configuration and measures provider read round trips under the selected concurrency.

Create a private configuration file from the checked-in template:

mkdir -p "$HOME/.config/proxima"
chmod 700 "$HOME/.config/proxima"
cp scripts/provider-bench-config.example.json "$HOME/.config/proxima/provider-bench-config.json"
chmod 600 "$HOME/.config/proxima/provider-bench-config.json"

The template contains two tenant entries per provider and uses environment-variable references for credentials. The runner expands those references from the current process environment. Keep the actual credentials in a private environment file or secret manager; do not commit the populated JSON or environment file.

Install the native client libraries in the same Python environment that runs the demo:

python3 -m pip install -r scripts/requirements-provider-bench.txt

The provider profile object is an array of tenant connections. Each entry must contain a unique tenant_id and the credentials or connection details for that tenant. The acceptance scripts create and remove their own disposable test fixtures. The live workload phase runs after acceptance and connects to the persistent service and Engine listener endpoints in this configuration; it does not reuse the temporary acceptance containers or create replacement database services. Start the configured provider services and gateway/native runtime paths before the workload phase. The number of entries must be at least the --tenants value for every selected provider. A tenant entry must use that tenant's own database identity, database, schema, keyspace, Redis ACL identity, IAM principal, API key or search role. Do not duplicate one administrator credential under multiple tenant IDs.

Connect each profile through its Proxima provider path

For protocol-gateway providers, tenant connection entries must point to the corresponding Proxima Engine listener, not directly to the upstream database. The listener must be running with the same tenant identity registry and TLS settings that the application will use.

Provider Benchmark connection target Path
PostgreSQL Proxima PostgreSQL listener, normally 127.0.0.1:6432 PostgreSQL wire gateway and signed tenant context
CockroachDB Proxima PostgreSQL-compatible listener, normally 127.0.0.1:16433 in the local acceptance fixture PostgreSQL wire compatibility and CockroachDB tenant roles/RLS
MySQL 8 Proxima MySQL gateway, normally 127.0.0.1:3307 MySQL protocol gateway
MariaDB Proxima MySQL-compatible gateway, normally 127.0.0.1:3309 MySQL-compatible protocol gateway
MongoDB Proxima MongoDB gateway, normally 127.0.0.1:27018 OP_MSG gateway
Redis Proxima Redis TLS gateway, normally 127.0.0.1:6380 RESP2 gateway and tenant key namespace
Microsoft SQL Server Address configured by the SQL Server TDS gateway registry TDS 7.4 gateway and LOGIN7 tenant/database binding
SQLite Tenant-specific file path managed by the local Engine runtime Embedded provider and filesystem boundary
Oracle Database Tenant-specific Oracle schema identity on the configured Oracle service Native provider authorization
Amazon DynamoDB AWS regional endpoint using the tenant IAM profile Native IAM and LeadingKeys partition authorization
Apache Cassandra Tenant-specific Cassandra role and keyspace on the configured cluster Native keyspace and role authorization
Elasticsearch Secured HTTPS endpoint using the tenant API key/role Native role, DLS and FLS authorization
OpenSearch Secured HTTPS endpoint using the tenant role credentials Security plugin role, DLS and FLS authorization

The gateway ports above are local defaults, not universal fixed ports. Use the listener address configured on the Engine node. Native provider profiles use their own tenant-scoped provider principals and namespaces as provisioned by the corresponding runtime. Do not replace a gateway address with an upstream database address for a provider whose runtime is configured to enforce access through a gateway.

Connection profile fields

Provider Required fields per tenant entry Live operation
PostgreSQL dsn Configured read-only SQL query; defaults to SELECT 1
CockroachDB dsn Configured read-only SQL query; defaults to SELECT 1
MySQL 8 host, username, password, optional port and database Configured read-only SQL query; defaults to SELECT 1
MariaDB host, username, password, optional port and database Configured read-only SQL query; defaults to SELECT 1
MongoDB uri, database, collection Tenant-filtered find_one against the required tenant collection
Redis url GET for the required tenant-scoped probe_key
Microsoft SQL Server connection_string Configured read-only SQL query; defaults to SELECT 1
SQLite path Configured read-only SQL query; defaults to SELECT 1
Oracle Database username, password, dsn Configured read-only SQL query; defaults to SELECT 1 FROM DUAL
Amazon DynamoDB profile, region, table, key GetItem using the tenant IAM profile
Apache Cassandra username, password, keyspace and optional hosts / port Required read-only probe_query in the tenant keyspace
Elasticsearch url, api_key or username / password, and tenant index Search request against the tenant's configured index
OpenSearch url, username, password, optional CA file and required tenant index Search request against the tenant's configured index

The example file at scripts/provider-bench-config.example.json shows the exact JSON shape and environment variable names for all 13 providers. It includes tenant A and tenant B connection entries for each provider. Add the remaining tenant objects when increasing the tenant target. For PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite and Oracle, each tenant entry must include a read-only query whose first selected column is that tenant's tenant_id. For MongoDB, configure the tenant's collection and optional tenant filter. For Redis, configure a tenant-scoped probe_key. For Cassandra, configure a read-only probe_query. For Elasticsearch and OpenSearch, configure the tenant index and a tenant-scoped search query.

Environment variables used by the template

Provider Environment variables
PostgreSQL PROXIMA_BENCH_POSTGRES_DSN_A, PROXIMA_BENCH_POSTGRES_DSN_B
CockroachDB PROXIMA_BENCH_COCKROACH_DSN_A, PROXIMA_BENCH_COCKROACH_DSN_B
MySQL PROXIMA_BENCH_MYSQL_HOST, PROXIMA_BENCH_MYSQL_PORT, PROXIMA_BENCH_MYSQL_USER_A/B, PROXIMA_BENCH_MYSQL_PASSWORD_A/B, PROXIMA_BENCH_MYSQL_DATABASE_A/B
MariaDB PROXIMA_BENCH_MARIADB_HOST, PROXIMA_BENCH_MARIADB_PORT, PROXIMA_BENCH_MARIADB_USER_A/B, PROXIMA_BENCH_MARIADB_PASSWORD_A/B, PROXIMA_BENCH_MARIADB_DATABASE_A/B
MongoDB PROXIMA_BENCH_MONGODB_URI_A/B, PROXIMA_BENCH_MONGODB_DATABASE_A/B
Redis PROXIMA_BENCH_REDIS_URL_A/B
Microsoft SQL Server PROXIMA_BENCH_SQLSERVER_CONNECTION_A/B
SQLite PROXIMA_BENCH_SQLITE_PATH_A/B
Oracle Database PROXIMA_BENCH_ORACLE_USER_A/B, PROXIMA_BENCH_ORACLE_PASSWORD_A/B, PROXIMA_BENCH_ORACLE_DSN
Amazon DynamoDB PROXIMA_BENCH_DYNAMODB_PROFILE_A/B, PROXIMA_BENCH_DYNAMODB_TABLE, AWS_REGION
Apache Cassandra PROXIMA_BENCH_CASSANDRA_HOST, PROXIMA_BENCH_CASSANDRA_USER_A/B, PROXIMA_BENCH_CASSANDRA_PASSWORD_A/B, PROXIMA_BENCH_CASSANDRA_KEYSPACE_A/B
Elasticsearch PROXIMA_BENCH_ELASTICSEARCH_URL, PROXIMA_BENCH_ELASTICSEARCH_API_KEY_A/B
OpenSearch PROXIMA_BENCH_OPENSEARCH_URL, PROXIMA_BENCH_OPENSEARCH_USER_A/B, PROXIMA_BENCH_OPENSEARCH_PASSWORD_A/B, PROXIMA_BENCH_OPENSEARCH_CA_FILE

Example private environment setup:

nano "$HOME/.config/proxima/enterprise-demo.env"
chmod 600 "$HOME/.config/proxima/enterprise-demo.env"
source "$HOME/.config/proxima/enterprise-demo.env"

Set the A and B variables to separate tenant-specific principals. For a multi-tenant scale run, create and provision the full tenant identity set on the provider first, then add one matching connection entry for each tenant. The benchmark deliberately fails when the selected tenant count exceeds the number of configured identities.

Generate large tenant connection profiles

For a large tenant population, do not hand-edit thousands of JSON objects. Export the already-provisioned tenant connection details into a private CSV file with three columns: provider, tenant_id and connection_json. The connection_json column contains one provider-specific JSON object with that tenant's connection settings and credentials. Keep the CSV outside the repository and set its permissions to owner-only.

Example CSV shape:

provider,tenant_id,connection_json
postgres,tenant-00001,"{""dsn"":""postgresql://tenant-00001:REDACTED@127.0.0.1:6432/appdb"",""query"":""SELECT tenant_id FROM proxima_bench_probe LIMIT 1""}"
mysql,tenant-00001,"{""host"":""127.0.0.1"",""port"":3307,""username"":""tenant_00001"",""password"":""REDACTED"",""database"":""tenant_00001"",""query"":""SELECT tenant_id FROM proxima_bench_probe LIMIT 1""}"
mongodb,tenant-00001,"{""uri"":""mongodb://tenant_00001:REDACTED@127.0.0.1:27018/tenant_00001"",""database"":""tenant_00001"",""collection"":""records""}"
redis,tenant-00001,"{""url"":""rediss://tenant_00001:REDACTED@127.0.0.1:6380/0"",""probe_key"":""proxima:{tenant-00001}:benchmark""}"

Generate the private benchmark JSON after exporting the full tenant set:

python3 scripts/build-provider-bench-config.py \
  --input "$HOME/.config/proxima/tenant-connections.csv" \
  --output "$HOME/.config/proxima/provider-bench-config.json" \
  --minimum-tenants 50000 \
  --require-all-providers
chmod 600 "$HOME/.config/proxima/provider-bench-config.json"

The generator validates provider names, unique tenant IDs per provider, unique provider credentials/identities, required connection fields (including tenant-scoped SQL/search queries where applicable) and the minimum tenant count. With --require-all-providers, it requires at least the selected minimum count for every one of the 13 providers. It writes the resulting JSON with owner-only file permissions and does not print connection values or credentials.

The required connection fields for each provider are listed in the connection profile table above. Optional fields such as read-only SQL statements, MongoDB filters, timeout values, TLS settings and search query bodies can be included inside connection_json. The tenant_id is supplied in its own CSV column and must not be repeated inside connection_json.

Once the JSON is generated, run the same workload command for the full provider catalog:

bash scripts/proxima-enterprise-demo.sh \
  --database all \
  --config "$HOME/.config/proxima/provider-bench-config.json" \
  --tenants 50000 \
  --concurrency 50000 \
  --max-workers 50000 \
  --duration-seconds 60 \
  --warmup-seconds 10 \
  --ramp-interval-ms 5000

This config generator assembles profiles for provisioned tenant identities. It does not create provider users, IAM principals, databases, keyspaces, indices or gateway registry entries. Those must already exist and be scoped to the matching tenant before a live workload is started.

Provider-specific read probes

Every live profile reads a tenant-owned canary record through the configured provider path and verifies that the returned tenant identifier matches the connection profile's tenant_id before accepting the sample. SQL queries must return tenant_id as their first selected column. MongoDB find_one projects and verifies the document's tenant_id. Redis GET verifies that the stored value equals the tenant ID. DynamoDB GetItem verifies Item.tenant_id.S. Cassandra verifies the returned row's tenant_id. Elasticsearch and OpenSearch verify hits.hits[0]._source.tenant_id. A successful connection is not counted as a successful tenant probe unless the returned tenant value matches.

Create a proxima_bench_probe table in each tenant's database, schema or SQLite file with a tenant_id column and insert exactly that tenant's identifier. Use these provider-specific read-only queries:

-- PostgreSQL, CockroachDB, MySQL 8, MariaDB and SQLite
SELECT tenant_id FROM proxima_bench_probe LIMIT 1;

-- Microsoft SQL Server
SELECT TOP 1 tenant_id FROM dbo.proxima_bench_probe;

-- Oracle Database
SELECT tenant_id FROM proxima_bench_probe FETCH FIRST 1 ROWS ONLY;

For Cassandra, create proxima_bench_probe in each tenant keyspace with a tenant_id column and use SELECT tenant_id FROM proxima_bench_probe LIMIT 1. For MongoDB, insert a document containing the matching tenant_id into the configured collection. For Redis, set the configured tenant-specific probe_key value to that tenant ID. For DynamoDB, create the configured key item with a string attribute named tenant_id equal to the tenant ID. For Elasticsearch and OpenSearch, create a document in each configured tenant index with _source.tenant_id matching the profile and configure a term query on that field.

The checked-in example JSON uses tenant-returning probes. The live runner rejects a missing canary, a mismatched tenant value, a missing read-only query or a provider response that cannot be tied to the configured tenant. Do not replace these probes with SELECT 1, an unfiltered search or a shared administrator connection.

The acceptance scripts continue to run their own isolation assertions. Configure the live workload's connection profiles with the same tenant boundary that the acceptance suite verifies. Use only disposable test records and read-only benchmark statements; do not put destructive SQL, update, delete, index, or administrative commands in a query field.

5. Security scenarios shown

The provider acceptance scripts exercise provider-appropriate combinations of:

  • Tenant A and Tenant B provisioning and own-tenant data access.
  • Cross-tenant read and write denial.
  • Unauthorized database, schema, keyspace, index or key-namespace access.
  • Invalid authentication and privilege-escalation attempts.
  • Tenant identity mapping through supported Proxima gateway paths.
  • Database-native grants, roles, policies and namespace boundaries.

Shared Engine tests exercise signed emergency token binding, expiry, assignment and replay protections, together with break-glass audit outbox persistence and acknowledgement.

Each provider's live workload then uses its own configured tenant identities and provider-native client to exercise its read path under the requested concurrency. The workload measurements are reported beside that provider's acceptance results.

Provider scenario coverage

The provider suites use the following concrete checks in the current repository:

Provider Own-tenant operation Cross-tenant boundary Additional checks
PostgreSQL Signed tenant sessions and own-row reads Cross-tenant read filtering and write/update/delete rejection Missing, invalid, expired and tampered identity cases; live concurrency and durable break-glass audit
MySQL 8 Own-database reads and prepared writes through the gateway Cross-database read/write and database-switch rejection Invalid password and post-denial tenant binding
MariaDB Own-database reads and prepared writes through the gateway Cross-database read/write and database-switch rejection Invalid password and post-denial tenant binding
CockroachDB Tenant-role reads through Proxima RLS-filtered reads and denied cross-tenant writes Signed tenant tokens and provider role policies
MongoDB Own database reads through the gateway Cross-database reads/writes and cross-database lookup rejection Database enumeration, transaction admission and topology-field checks
Redis Own-namespace reads and writes through TLS gateway Tenant key namespace separation Unsupported administrative command denial and invalid credential rejection
Microsoft SQL Server Separate tenant database read/write Cross-database access and tenant database switching Elevated-role, impersonation and invalid-password checks
SQLite Tenant file access under native provider tests File path and symlink boundary checks Local embedded-provider path handling
Oracle Database Separate schema owner access Cross-schema data visibility checks Privilege and role inspection, including elevated privilege checks
Amazon DynamoDB Own-partition GetItem access Cross-partition GetItem and Query denial Scan denial and distinct AWS IAM principal verification
Apache Cassandra Own-keyspace reads and writes Cross-keyspace read denial Role grants and unauthorized schema operation denial
Elasticsearch Tenant document search DLS filtering and cross-index denial FLS field restriction and cluster privilege denial
OpenSearch Tenant document search DLS filtering and cross-index denial FLS field restriction and cluster privilege denial

The shared Engine test group separately exercises emergency token validation and durable audit outbox persistence/acknowledgement. Each provider's acceptance suite retains its provider-specific security checks, and each provider's live workload produces an independent latency and throughput report.

6. Performance and workload evidence

Every supported provider receives its own live workload profile. PostgreSQL, MySQL, MariaDB, CockroachDB, MongoDB, Redis, Microsoft SQL Server, SQLite, Oracle Database, Amazon DynamoDB, Apache Cassandra, Elasticsearch and OpenSearch each produce an independent measurement report.

The runner executes provider acceptance suites first. It then starts the live profile for each selected provider in catalog order. Each profile connects using that provider's own configured tenant identities and native client library. The profiles use the same requested tenant count, concurrency target, warm-up period, measurement duration and ramp-up interval.

Workload lifecycle

For each provider, the profile:

  1. Loads that provider's tenant connection entries from the private JSON configuration.
  2. Verifies that the configured tenant identity count meets the requested tenant target.
  3. Assigns each tenant profile to its provider workload worker.
  4. Opens native database clients and successfully reads the tenant-owned canary for every assigned identity, checking that the returned tenant_id matches the profile.
  5. Executes warm-up requests before recording latency samples.
  6. Ramps workers to readiness over the configured ramp interval; the common measurement window begins after every worker is ready.
  7. Measures provider-native tenant-data read round trips during the common measurement window.
  8. Records completed requests, failed requests, active worker concurrency, peak simultaneous in-flight operations, throughput and latency distribution.
  9. Writes a provider-specific JSON report and process log.
  10. Closes the native clients opened by the workload workers.

The measured operation is a native provider request. SQL providers use a read-only SQL query. MongoDB, Redis, DynamoDB, Cassandra, Elasticsearch and OpenSearch use their provider-native request path as configured in the tenant profile. The operation name is included in each report so results can be interpreted with the correct provider context.

Metrics emitted by every provider

Metric Meaning
Tenant population Number of real tenant connection identities selected from the provider configuration
Tenant identities exercised Number of identities whose canary returned the matching tenant_id
Configured concurrency Requested simultaneous live worker count for this provider
Effective worker limit Maximum worker count allowed by the local host safety cap
Peak observed concurrency Highest number of live workload workers active in the measured window
Peak in-flight operations Highest number of provider requests executing simultaneously
Completed requests Successful provider round trips recorded during the measurement window
Failed requests Provider operations that returned an error
Requests per second Completed requests divided by the measured elapsed window
Minimum latency Fastest recorded request
Mean latency Arithmetic mean of recorded request latency
p50 latency Median request latency
p90 latency 90th percentile request latency
p95 latency 95th percentile request latency
p99 latency 99th percentile request latency
Maximum latency Slowest recorded request

Latency values are in milliseconds. The provider report also includes the run ID, provider name, start and finish timestamps, host platform and logical CPU count. The consolidated report presents the same metrics in the same provider matrix for all selected databases.

Tenant population and concurrency

The --tenants option selects the number of distinct tenant connection entries used for each provider. The configuration must contain at least that many real tenant identities under every selected provider. For example, --tenants 50000 requires 50,000 provisioned tenant entries for PostgreSQL, 50,000 for MySQL, 50,000 for MariaDB, and the same 50,000 identities for each other selected provider. The runner verifies each assigned identity against that provider's tenant-owned canary before the measured window.

The --concurrency option sets the simultaneous live worker target independently for each provider. The --max-workers option controls the host-side thread cap. Set the worker cap equal to the requested concurrency when the machine can sustain it. Each worker verifies its assigned tenant canaries and completes its ramp delay before all ready workers enter the common measurement window. The report records active worker concurrency separately from peak simultaneous in-flight database operations; fast responses therefore do not make a fully active worker population appear to have missed its concurrency target. If the worker cap is lower, the profile records the actual worker limit and reports INCOMPLETE instead of presenting the lower achieved value as the requested target.

The providers are measured sequentially. This gives every provider the same host allocation during its own measurement window and avoids starting 13 database clusters and their workloads simultaneously. The report keeps the selected provider, configured target and observed result together.

Interpreting the results

Use the provider's own workload report and acceptance log when reviewing its result. Native request types differ by database, so interpret the numbers with the recorded operation, provider version, TLS configuration, client settings, host CPU and memory, tenant count, worker target, achieved concurrency, warm-up period and measurement duration visible. Use the same read query or operation and equivalent data shape when preparing a controlled cross-provider comparison.

A provider can have a passing acceptance suite and a failed or incomplete live workload. The report shows those outcomes separately. The overall run is PASS only when every selected provider's acceptance suite and live workload pass and the shared Engine checks pass. Missing credentials, missing client libraries, missing tenant entries or a worker cap below the requested concurrency prevent a PASS result.

Provider-by-provider measurement artifacts

Each provider writes provider-workloads/.json and provider-workloads/.log. The JSON contains its latency distribution, throughput, request counts, configured and exercised tenant identities, configured concurrency, effective worker limit, active worker concurrency and peak in-flight operations. The acceptance suite logs remain under provider-acceptance/. The consolidated HTML, Markdown and JSON reports combine these provider-specific artifacts without substituting one provider's metrics for another's.

7. Evidence and report structure

Each run creates a private directory similar to:

verification-results/
└── enterprise-demo-<run-id>/
    ├── report.html
    ├── report.md
    ├── report.json
    ├── events.jsonl
    ├── provider-acceptance.log
    ├── provider-acceptance/
    │   └── tenant-security-<run-id>/
    │       ├── report.json
    │       └── provider-specific logs
    └── provider-workloads/
        ├── postgres.json and postgres.log
        ├── mysql.json and mysql.log
        ├── mariadb.json and mariadb.log
        ├── cockroach.json and cockroach.log
        ├── mongodb.json and mongodb.log
        ├── redis.json and redis.log
        ├── sqlserver.json and sqlserver.log
        ├── sqlite.json and sqlite.log
        ├── oracle.json and oracle.log
        ├── dynamodb.json and dynamodb.log
        ├── cassandra.json and cassandra.log
        ├── elasticsearch.json and elasticsearch.log
        └── opensearch.json and opensearch.log
  • report.html: shareable all-provider overview with acceptance status, workload status, exercised tenant identities, active worker concurrency, peak in-flight operations, completed/failed request counts, throughput and min/mean/p50/p90/p95/p99/max latency.
  • report.md: engineering summary and full provider comparison table, including completed/failed requests, throughput, min/mean/p50/p90/p95/p99 and maximum latency.
  • report.json: machine-readable run manifest, provider-specific acceptance outcomes, workload metrics, shared Engine checks, host metadata and workload configuration.
  • events.jsonl: timestamped observed process output from acceptance and workload commands.
  • provider-acceptance/: provider-specific tenant security assertions and their logs.
  • provider-workloads/.json: native workload metrics for that individual provider.
  • provider-workloads/.log: native client output and errors for that individual provider.

The provider matrix uses PASS, FAIL, INCOMPLETE and BLOCKED states. PASS requires both the provider acceptance suite and its live workload to pass. INCOMPLETE identifies a missing live profile or a concurrency target that was not achieved. FAIL identifies a failed acceptance or workload operation. The runner exits with a non-zero status when the selected provider set is incomplete or a test fails.

Keep the full local evidence directory for engineering review. The runner redacts recognized environment credential values from captured process output, but inspect every artifact before publishing it. Do not publish private connection configuration files, AWS profile data, API keys, passwords, tenant secrets or customer data.

8. Recommended recording outline

A clear 12–20 minute recording can follow this sequence:

  1. Show the public repository and supported database catalog.
  2. Clone the repository into a clean working directory.
  3. Show the exact one-command entry point and environment checks.
  4. Run the full provider selection and show the provider result matrix.
  5. Open the relevant provider logs and demonstrate Tenant A/B isolation.
  6. Show representative invalid identity and unauthorized access attempts.
  7. Show the shared break-glass token and audit test results.
  8. Open each provider's live workload report and compare its latency distributions, throughput, tenant population and observed concurrency under the same requested settings.
  9. Open the consolidated HTML and JSON reports and show the run ID, commit and all-provider metric table.
  10. Explain the provider-specific connection profiles, prerequisites and how another engineer can reproduce each workload.

Keep the terminal output and report visible. Show the exact provider selected for each test and the actual outcome emitted by that test.

9. Ports and local services

The provider acceptance fixtures bind to loopback interfaces where they create local services. The live workload profiles connect to the endpoints configured in the tenant connection profile JSON. Networked provider ports are listed below; SQLite uses local files, DynamoDB uses the AWS endpoint and Elasticsearch/OpenSearch use their configured HTTPS endpoints.

Provider / service Host port Purpose
PostgreSQL acceptance fixture — Proxima Engine 6432 PostgreSQL wire-protocol entry point
PostgreSQL acceptance fixture — PostgreSQL 15432 Disposable database service
PostgreSQL acceptance fixture — PgBouncer 16432 Transaction-pooling upstream
PostgreSQL acceptance fixture — metrics 19090 Metrics and health endpoint
PostgreSQL acceptance fixture — dashboard 19080 Local dashboard endpoint
PostgreSQL acceptance Compose dashboard 9080 Acceptance Compose dashboard mapping
PostgreSQL acceptance Compose metrics 9090 Acceptance Compose metrics mapping
MySQL 8 upstream 3306 Disposable MySQL service
MySQL gateway 3307 Proxima MySQL protocol listener used by the benchmark configuration
MariaDB 11.4 upstream 3308 Disposable MariaDB service
MariaDB gateway 3309 Proxima MySQL-compatible listener used by the benchmark configuration
CockroachDB 26257 Secure SQL endpoint
CockroachDB Proxima listener 16433 PostgreSQL-compatible Engine listener
CockroachDB metrics 19091 Local metrics endpoint
MongoDB upstream 27017 Disposable MongoDB service
MongoDB gateway 27018 Proxima OP_MSG gateway endpoint
Redis gateway 6380 Proxima Redis TLS gateway
Redis upstream 6389 Redis TLS/ACL service
Microsoft SQL Server 1433 SQL Server service; use the configured TDS gateway address for Engine-path tests
Oracle Database 1521 Oracle Free listener
Apache Cassandra 19042 Cassandra native transport

Check ports before running local acceptance fixtures or starting persistent gateway listeners:

for port in 6432 15432 16432 19090 19080 9080 9090 3306 3307 3308 3309 26257 16433 19091 27017 27018 6380 6389 1433 1521 19042; do
  if timeout 1 bash -c "</dev/tcp/127.0.0.1/$port" 2>/dev/null; then
    printf 'IN USE  %s\n' "$port"
  else
    printf 'FREE    %s\n' "$port"
  fi
done

The acceptance scripts check the ports they need before launching disposable fixtures. Stop only the conflicting test service or use the provider's supported endpoint override. The live workload configuration does not change database ports; it connects to the host and port in each tenant's provider-specific DSN, URI, URL or connection string.

For networked gateway providers, point the tenant connection profile at the Proxima listener configured on the Engine node. The default local profile ports are PostgreSQL 6432, CockroachDB 16433, MySQL 3307, MariaDB 3309, MongoDB 27018 and Redis 6380. MySQL and MariaDB use separate gateway listener ports in the benchmark configuration so both can remain available during the sequential provider workload run.

SQLite has no listening port. DynamoDB uses the configured AWS region and optional endpoint URL. Elasticsearch and OpenSearch use the HTTPS endpoints supplied through their connection profiles. Their ports are controlled by the cluster deployment and are not changed by this runner.

The acceptance fixtures and persistent workload endpoints are separate. The acceptance scripts remove the temporary services they create. The workload phase uses the persistent service and gateway endpoints configured in the private benchmark file.

10. Cleanup and safe operation

Provider acceptance fixture scripts own and remove the disposable containers, temporary certificates, users, roles, indices, API keys and canary data they create. The live workload runner does not create, migrate, delete or reconfigure provider resources. It connects with the tenant identities and read probes supplied in the private configuration file, runs its measured workload and closes the clients it opened.

The workload configuration must point to dedicated test resources. Use separate tenant identities with least-privilege read access. The query fields in the JSON configuration must contain read-only statements or provider-native read operations. For DynamoDB, prepare one benchmark item under each tenant's authorized partition. For Cassandra, prepare the configured probe table and rows in each tenant keyspace. For Elasticsearch and OpenSearch, prepare the tenant index and canary document before starting the profile. For Redis, prepare the tenant-scoped key. For MongoDB, prepare the configured collection and tenant-filtered record.

Never run acceptance cleanup scripts against production. Never point a destructive acceptance fixture at a production endpoint. Keep environment files, connection profile JSON, signing keys and private certificates outside Git. The runner redacts recognized credential values from captured process output; inspect all artifacts before sharing them.

The --max-workers value is a host resource control. Increase it only after confirming the machine's file-descriptor limit, available memory, CPU capacity and database connection limits. The achieved concurrency is included in each provider report.

11. Troubleshooting

  • Docker unavailable: start Docker Desktop or Docker Engine and verify docker info and docker compose version.
  • Rust build failure: install stable Rust and Cargo, then run cargo --version.
  • Python client import error: activate the demo virtual environment and install scripts/requirements-provider-bench.txt; install the operating-system driver required by pyodbc or other native modules.
  • Benchmark configuration not found: pass the private JSON file through --config or set PROXIMA_PROVIDER_BENCH_CONFIG.
  • Tenant profile count too small: --tenants must not exceed the number of configured tenant entries under every selected provider. Provision the additional tenant identities and add their connection entries.
  • Missing environment variable: source the private environment file before launching the demo. The JSON template uses variable references that are expanded from the process environment.
  • Provider authentication failure: verify that each tenant entry uses that tenant's own principal, endpoint, database, schema, keyspace, IAM profile, API key or search role.
  • Provider data probe fails: verify the configured read query, collection, Redis key, DynamoDB key, Cassandra query or search index exists and is readable by the selected tenant principal.
  • Workload INCOMPLETE: the configured worker safety cap is below the requested concurrency or the provider did not reach the requested in-flight worker count. Increase --max-workers only if host and database limits allow it.
  • Connection limit or file descriptor errors: lower concurrency, raise the operating-system file-descriptor limit where appropriate, and confirm the provider's configured connection/session limits.
  • SQL Server cannot start: verify MSSQL_SA_PASSWORD meets SQL Server password requirements and that port 1433 is free.
  • Oracle cannot start: verify Docker memory allocation and ORACLE_PASSWORD; the initial image startup can take several minutes.
  • DynamoDB authorization fails: verify distinct IAM principals, table key schema, tenant partition keys and the dynamodb:LeadingKeys policy.
  • Search cluster returns 401/403: verify the administrator account, HTTPS endpoint, tenant API key or role mapping, and provider security feature configuration.
  • A provider acceptance suite passes but its workload fails: inspect that provider's provider-workloads/.log and its tenant connection entries. The two outcomes are intentionally reported separately.

12. Related engineering references