On-prem data stays on-prem: the Gateway architecture, explained
For the technically curious, here's exactly how a query from the cloud reaches an on-prem database — and how the response comes back — without ever opening an inbound port.
The pieces
- Cloud control plane — hosted at aiinsights365.net. Stores datasource metadata, dispatches jobs, renders charts.
- Gateway agent — a small Windows desktop app installed inside the customer's network. Holds the local connection strings, opens local DB connections, executes SQL.
- Job queue table in the cloud DB — backed by a SQL table called
GatewayJobs. Each job is a tuple of(jobId, gatewayGuid, jobType, querySql, connectionString?, resultJson?).
The protocol
- The user clicks Test & Load Fields in the wizard.
- The cloud inserts a row into
GatewayJobswithstatus=Pending. - The gateway agent — which is already long-polling
GET /api/gateway/pollover HTTPS — picks up the job. - The agent runs the SQL locally, captures the rows, and
POSTs the result to/api/gateway/resultsover HTTPS. - Meanwhile, the cloud has been polling the same
GatewayJobsrow forstatus=Completed. When it sees the result, it returns the rows to the original web request.
What never crosses the WAN
- The on-prem database's IP / hostname (it's in the connection string that lives in the gateway's local config, encrypted at rest)
- The on-prem service account credentials
- Any data the agent didn't explicitly include in the result rows
What does cross the WAN
- The SQL the agent will run (visible to your gateway admins in the local log)
- The result rows after the agent has executed and chosen to send them back
Auditing
Every job that crosses the gateway is logged in:
- The cloud's
GatewayJobstable (per-org) - The gateway agent's local
transactions.log(per-machine)
You can correlate by jobId across both.