Aventura, Florida · serving clients across the United States (305) 404-9404Toll-free (800) 767-8566Emergency? Get a call within 1 hour
Software as a service Illustrative engagement

A SaaS company's tenant isolation and secrets rotation program: row-level security, per-tenant keys and automated rotation

A software-as-a-service company of about 80 people running a multi-tenant application on PostgreSQL in AWS.

Scale
1 shared PostgreSQL cluster, 1 key per tenant, ~2 secret stores, 1 CI pipeline
Engagement
10 weeks to design and roll out, with a tenant-isolation retest at the end

The challenge

Every customer's rows lived in the same tables, and isolation depended on each developer remembering a tenant filter in each query. Database passwords and API keys were long-lived, copied between environments and rarely changed, and enterprise prospects had started asking how one tenant is kept from reading another's data.

A software-as-a-service company wanted to prove that one customer can never read another customer's data, and to stop treating passwords and keys as things that never change. The client is not named on this page, and this is an illustrative engagement that describes the kind of work our team does; details are composite. Work started with a written scope covering the application, the database and the build pipeline.

The design review began with a simple question: where does a tenant identifier get checked? In the existing code the answer was "in each query, if the developer remembers." That is how cross-tenant leaks happen, and the OWASP API Security Top 10 lists the pattern as broken object level authorization. The team moved the check into the database with row-level security in PostgreSQL. Each connection sets the current tenant, a policy on every tenant table compares it to the row, and the application's own database role is not allowed to bypass the policy. A query that forgets its filter now returns no rows.

Isolation of data at rest was the second layer. Each tenant got its own data key, wrapped by a master key in AWS KMS, with key policies that name only the services that must use them. Disabling one tenant's key makes that tenant's encrypted data unreadable, which gives the company a clean answer for offboarding and for a suspected exposure. Encryption does not replace the access checks, and the page does not claim it does: the two controls cover different failures.

Secrets were the third layer. Database credentials and third-party API keys moved into AWS Secrets Manager or Google Secret Manager, depending on where each workload ran, and the application fetches them at runtime instead of reading files or environment variables baked into images. Rotation runs on a schedule and can be triggered at once if a key is exposed. A secrets scanner in the build pipeline checks every commit and pull request, and a one-time scan of repository history found old credentials that were revoked the same day. Revocation, not history rewriting, is what protects the account.

The program ended with proof. Automated tests log in as two test tenants and try to read, update and delete each other's objects through every endpoint and background job, and they run on every build. The retest and the design document went into an evidence pack for prospects' security teams. This is the kind of work our team offers under cybersecurity and cloud management; it is a technical program, not a certification, and it does not replace an independent assessment.

What our team delivered

  • A tenant-isolation design review that traced every path from a request to a database row, including background jobs, reports and admin tools
  • Row-level security policies in PostgreSQL, so the database itself refuses rows that belong to another tenant, with the tenant identifier set per connection by the application and a database role for the application that cannot bypass the policies
  • Per-tenant data keys wrapped by master keys in AWS KMS, with key policies limited to the services that need them and a documented procedure to disable one tenant's key
  • Secret rotation with AWS Secrets Manager or Google Secret Manager: database credentials and API keys fetched at runtime, rotated on a schedule and on any suspected exposure, with no secrets in images or environment files
  • CI secret scanning on every commit and pull request, plus a one-time scan of the repository history, and automated tests that attempt cross-tenant reads on every endpoint
  • A short design document and evidence pack the company can hand to a prospect's security team

Result

Isolation no longer rests on every query being written correctly: a missing filter returns nothing instead of another customer's data. Secrets rotate without downtime, and the company answers questionnaires with a design and test evidence. This is an illustrative engagement, a modeled outcome and not a guarantee.

Get this for your company

Related services with fixed prices and a written scope.

Initial assessment of public endpoints

What an attacker can see and reach from the internet: your domains, mail, websites, remote access and cloud exposure.

Report within 5 business days of kickoff

$1,000 per assessment

Details

Cloud security review

A review of one Microsoft 365, Azure, AWS or Google Cloud tenant against recognized benchmarks.

Report within 7 business days of read-only access

$2,800 per tenant

Details

Show 3 more

Cloud management

We run your Microsoft 365, Azure, AWS or Google Cloud environment: access, cost, patching, backup and security settings. Priced per month for one tenant.

Onboarding within 15 business days

$1,900 per tenant, per month

Details

Scanning of software codebase

Static analysis and secret detection across one codebase, reviewed by an engineer so you get findings, not noise.

Report within 3 business days of read-only access

$500 per codebase

Details

Discovery and requirements workshop

Workshops with your team to map every system, process, user group and integration, and to agree what the new platform must do.

Written requirements and a system inventory in 2 to 3 weeks

$6,500 fixed fee

Details

After you purchase, we contact you within 1 hour, any time of day or night, to start onboarding.

No payment is taken online. When we call you within the hour we confirm the scope and send an invoice (ACH, card or crypto).

Super Intelligence data flow

Every request is classified by sensitivity, so confidential data stays on models inside your walls while routine work can use the best frontier AI.

Super Intelligence data flowEmail, documents, phone calls, ERP and CRM records and sensor data enter a secure gateway that classifies each request by sensitivity. Sensitive requests are answered by local models inside the firewall, internal ones by a private cloud, and general ones by frontier models from leading US AI labs. Results flow back into ERP, CRM, dashboards and to people.SOURCESGATEWAYMODEL TIERSYOUR SYSTEMSEmailDocumentsPhone callsERP / CRMSensorsSecuregatewaysorts bysensitivityLocal modelsIn your firewallPrivate cloudYour own tenantFrontier modelsleading US AI labsERPCRMDashboardsPeopleSensitive: stays localInternal: private cloudGeneral: frontier model

Every sign-in, verified

Staff sign in once, but behind the scenes the device, the identity, a phone approval and your access policy are all checked before any app opens, and strangers are turned away.

Every sign-in, verifiedDiagram of user authentication. A user signs in; the device is checked for MDM and Intune compliance; the identity provider, Active Directory or Entra ID, verifies the account; an MFA push is approved on the user's phone; conditional access evaluates the policy; and access is granted to email, ERP and files. On a second pass, a sign-in from an unknown device in a new location is blocked by the conditional access policy. VERIFIED SIGN-INUserSigns inDevice checkMDM · IntuneIdentityAD · Entra IDMFA pushPhone approvalConditionalaccessPolicy checkEmailERPFilesUnknown deviceNew locationApprove?Blocked

The evidence pack and who asks for what

Twelve artefacts a firm can show about its AI use, and the party that most often asks for each: an insurer at renewal, an auditor or client questionnaire, or a regulator. A typical pattern only; the exact list depends on the policy, framework and sector.

The evidence pack and who asks for whatTable of twelve evidence artefacts against three audiences: insurer, auditor or client questionnaire, and regulator. Inventory, human approval points, a named owner and an incident plan are usually asked by all three. Payment procedure and drill records are mainly an insurer topic. Action and prompt logs and test records matter most to auditors and regulators.Twelve artefacts, three audiencesUsuallySometimesRarelyInsurerat renewalAuditoror client questionnaireRegulatoror supervisor1. AI inventory: every tool and agent2. Agent permission matrix3. Action and prompt logs4. Human approval points5. Test and evaluation records6. Payment verification procedure7. Payment drill record8. Named accountable owner9. Supplier and model list10. Data-use and retention rules11. Incident and rollback plan12. Staff training recordQualitative pattern, not a checklist from any one insurer or regulator.

Do you know if your company is safe?

Speak with a security engineer today. The first assessment call is free and confidential.

CallFree assessment