QueryStream v3.7.8
Architecture and Privacy
Back to App
Satrang Technologies - QueryStream

How QueryStream Works

A complete, honest explanation of how QueryStream handles your Salesforce credentials, executes SOQL queries, and processes your data. No black boxes. If you are evaluating QueryStream for an enterprise org or want to understand what touches your data, this page is for you.

No token storage No query logging No database Stateless proxy Token lives only in your browser tab Open to audit
1
Authentication - How Login Works

QueryStream uses the standard Salesforce OAuth 2.0 web server flow. We never ask for your password directly. The entire credential exchange happens between your browser, Salesforce's own login servers, and our server acting as the authorized OAuth client.

Step 1
You click Login with Salesforce
QueryStream redirects your browser to login.salesforce.com (or your custom My Domain), identifying itself as our registered Connected App and including a one-time cryptographic challenge (PKCE) that binds the login to your browser alone. We never see your credentials at this point.
Salesforce OAuth 2.0 with PKCE (S256)
Step 2
You log in on Salesforce's own page
Salesforce authenticates you directly. Your username and password are entered on Salesforce's domain and never transmitted to us. Salesforce then issues a one-time authorization code and redirects back to our callback URL.
login.salesforce.com - Salesforce controlled
Step 3
Server exchanges the code for a token
Our server receives the one-time code from Salesforce and exchanges it for an access token and a refresh token, presenting proof that the exchange comes from the same browser that started the login (PKCE). This server-side step is required by the OAuth spec to keep the client secret secure. The tokens are immediately handed to your browser and exist on our server only for the milliseconds the exchange takes. They are never written to any file, database, or log.
Server-side exchange - tokens handed to your browser, never stored
Step 4
Token lives only in your browser tab
Once your browser receives the access token, it is held in JavaScript memory only. It is never placed in a URL, written to localStorage, or sent anywhere except directly to our proxy when you run a query. Closing the tab destroys it permanently. There is no session on our server to invalidate.
JS memory only - tab-scoped, no persistence
Why a popup window? If we redirected the main tab to Salesforce for login, your query, editor state, and results would be wiped on return. Using a popup lets you authenticate in a child window while your main tab retains all state. The popup hands the token back to the main tab over a browser channel that only accepts messages from our own site - nothing from any other window or domain is trusted.
2
Query Execution - How Queries Run

Every SOQL query you run goes through a short, stateless chain. Your browser sends the query and token to our proxy, the proxy relays to Salesforce, Salesforce responds, and the proxy passes results back. Nothing is stored at any point in this chain.

Step 1
You run a SOQL query
QueryStream detects the query mode (streaming, aggregate, or single-shot LIMIT), then sends the query text and your access token to our relay over HTTPS. The token travels in the request body, never in a URL where it could end up in a log or browser history.
Browser to relay - HTTPS only, token never in a URL
Step 2
Proxy forwards to Salesforce REST API
The relay forwards your query straight to your own Salesforce instance's REST API and streams the response directly back to your browser. It holds your token only for the milliseconds the relayed call takes, keeps nothing afterward, and will only ever talk to Salesforce - it cannot be pointed anywhere else.
Stateless relay - locked to our site and to Salesforce domains
Step 3
Results stream to your browser
For large result sets, Salesforce paginates via QueryMore cursors. Your browser fetches each batch sequentially (up to 2,000 rows per batch) and renders results live as they arrive. All data processing (sorting, filtering, aggregation) happens entirely in your browser. Our server never sees the actual result data - it only passes each JSON batch through.
Browser-side processing - no server sees your data
Why a proxy at all? Browsers block direct JavaScript requests to external domains (CORS). Without a server-side relay, your browser cannot call the Salesforce API directly. Our proxy exists solely to satisfy this browser security requirement. It performs zero business logic, zero analytics, and zero data inspection beyond relaying the request and response.
3
Session Refresh - Staying Connected

Salesforce access tokens expire. When a query returns a 401 Unauthorized response, QueryStream automatically renews your session in the background using a refresh token, without interrupting your work.

How refresh works

When your session expires mid-query, QueryStream asks our server to renew it with Salesforce using your refresh token, which travels only in a request body over HTTPS. The new access token replaces the old one in your browser's memory and the query retries automatically. If Salesforce rotates the refresh token during renewal (a security feature some orgs enforce), QueryStream adopts the new one immediately, so renewal keeps working indefinitely.

Refresh token handling

The refresh token is held in your browser's memory alongside the access token. Like the access token, it is never written to persistent storage, a URL, or any server-side store. Our server sees it only for the duration of each renewal call and keeps nothing afterward. Closing the tab destroys the refresh token permanently, and if it ever expires or is revoked by your admin, QueryStream tells you plainly and asks you to log in again.

4
Query Strategies - How Results Are Fetched

QueryStream automatically detects the best fetch strategy for each query. You never need to think about this - it just works.

QueryMore Streaming

For queries with no LIMIT or LIMIT above 2,000: fetches in batches of up to 2,000 rows. Results appear live as each batch arrives. Works on result sets of any size.

Aggregate Rewrite

For GROUP BY and aggregate functions: Salesforce natively supports these. If native fails, QueryStream rewrites the query to stream raw rows and performs aggregation entirely in your browser using JavaScript. HAVING clauses are applied client-side after grouping.

Single-Shot LIMIT

For queries with LIMIT 2,000 or below: fetches in one request. Fastest path for targeted lookups. LIMIT above 2,000 automatically switches to streaming to return all requested rows.

5
Data Storage - What We Store and Where
Data Type Stored Where Persists After Tab Close Visible to Our Server
Access token JS memory (tab only) Never Only during proxy relay (milliseconds)
Refresh token JS memory (tab only) Never Only during token refresh call (milliseconds)
Your SOQL queries JS memory while running; History in memory only History cleared on close Relayed through proxy, not stored or logged
Saved queries (name + SOQL text) Your browser's localStorage Yes - on your device only Never transmitted to our server
Query results (rows returned) JS memory (tab only) Never Relayed through proxy as raw JSON, not stored
Your Salesforce instance URL JS memory (tab only) Never Used only to construct API URLs in proxy
Theme preference Your browser's localStorage Yes - on your device only Never
No database, no logs, no analytics. Our server side is a small set of stateless endpoints - login, query relay, and session renewal. None of them write to any database. None of them log requests, queries, tokens, or results. Our web server may keep standard HTTP access logs (IP address, timestamp, HTTP status code) as is normal for any web server, but these contain no query text or token data.
6
Multi-Org Isolation - Switching Between Orgs

QueryStream supports connecting multiple Salesforce orgs in the same browser session using tabs. Each org has a fully isolated slot with its own token, query history, results, and cursor state.

Slot isolation

Each org gets its own fully separate slot in memory holding: the access token, refresh token, instance URL, query history, saved state (scroll position, current page), and active column sort. Switching orgs restores the previous slot's state instantly, and nothing ever crosses between slots.

Dead query guard

Every query batch checks two guards before processing: which org tab is active and whether a newer query or an abort has superseded it. If either has changed, the batch is silently discarded. This prevents stale batches from a cancelled query, or from another org, from mixing into new results.

7
Security Summary

CORS locked

Our server endpoints only accept requests from the satrangtech.com origin. Cross-site requests from other domains are rejected outright.

POST only

All endpoints accept POST method only. GET requests are rejected. Tokens are always in the POST body, never in URL parameters which could appear in server logs.

Salesforce domain validation

The relay validates that the target instance is a Salesforce-owned domain before making any outbound request. It cannot be misused to send requests, or your token, anywhere other than Salesforce.

XSS prevention

Every value rendered into the results table is HTML-escaped first, and all Salesforce responses are treated as untrusted input. No field value can inject script or markup into the page.

Cross-window message validation

When the OAuth popup hands the token back to the main window, the main window verifies the sender is our own site before accepting it. Forged messages from any other window or domain are discarded.

URL-free token handoff

After login, the token is handed to your browser tab through tab-scoped browser storage, never a URL - so it cannot land in browser history, bookmarks, or web server logs. That storage is not shared with other tabs and is cleared the moment the tab closes.