Skip to content
IOmergent

AI Security Reference ArchitecturesTrack C: AI you ship

C2 AI Features in Your Product

C2 is the architecture for AI features your customers use inside your product: chat, search, summaries and agents. You can build it today, mostly from GA parts. It's buy + glue: you buy the vector database, gateway, guardrails and eval tools, and you write and test the tenant isolation yourself.

Buy + glue Owner: Product eng + security Control: High Stand up: 4 to 12 wks

Who it fits: SaaS companies shipping chat, search, summaries or agents to customers. One customer's data must never reach another, and anything a customer uploads is untrusted input.

Frameworks: AWS GenAI scope 3 and 4AWS agentic scope No agency to prescribedOWASP LLM01 Prompt Injection, LLM02 Sensitive Information Disclosure, LLM09 Vector and Embedding Weaknesses

Last reviewed October 2026. Vendor tiers and features change often. Spot something out of date? Tell us.

FlowsPrompt / responseTool callIdentity / credentialTelemetryUnsafe pathBlocked
BoundariesYour boundaryThird party

How AI Features in Your Product works

Your product123456789ACTORCustomer userssigned in, per tenantCONTROLRed team & evalscross-tenant testsSIMPLIFYIDENTITYCustomer identitytenant ID on every callKEEPWORKLOADYour productAI feature + retrievalWORKLOADTenant data / vectorsfiltered by tenant IDKEEPCONTROLTenant AI settingsopt-out, retentionKEEPCONTROLGateway + guardrailsinjection, PII, outputKEEPMODELModel (A3 or A4)no training, ZDR or BAATOOLSActionsvia the toolshed (B3)TELEMETRYPer-tenant AI logsaudit, abuse detectionSIMPLIFY

Data flow

  1. 1A signed-in customer user calls an AI feature. Every request carries the user's tenant ID.
  2. 2Customer identity is checked on every call, never inferred from the prompt.
  3. 3Per-tenant settings check opt-outs and retention before retrieval, so an opted-out customer's data is never fetched or sent.
  4. 4Retrieval filters by tenant before ranking, and your own caches are keyed by tenant, so one customer's documents never reach another's answer.
  5. 5Prompts and retrieved context go through the gateway, where guardrails flag likely injection, PII and unsafe output. Least-privilege actions are the real control.
  6. 6Model calls use a Track A model with no training on customer data, and ZDR or a BAA where needed.
  7. 7Any action the feature takes goes through the toolshed with the customer's own permissions.
  8. 8Logs are kept per tenant for audit and abuse detection.
  9. 9Every release is red-teamed for prompt injection, cross-tenant leaks and unsafe output.

Build or buy

Buy + glue

What you can buy for each box in the diagram, the open source option, and the part you still build yourself.

ComponentBuyOpen sourceYou buildMaturity
Customer identityYour existing app auth: Auth0, WorkOS, Clerk or Amazon CognitoKeycloak, OryTake the tenant ID from the session or token and pass it through every service, including async jobs. Never take it from the prompt.GA
Tenant data and vectorsPinecone (namespace per tenant, Standard or Enterprise), Weaviate Cloud (multi-tenancy), Amazon OpenSearch Serverlesspgvector with Postgres row-level security, Weaviate, Qdrant, OpenSearchOne retrieval layer that can't run without a tenant ID. Ban direct vector DB calls in code review or lint.GA
Tenant AI settingsNo dedicated product. Feature flag tools like LaunchDarkly or Statsig can hold per-tenant toggles.OpenFeatureOpt-out checked before retrieval and the model call. Retention jobs that delete across logs, vectors, caches and the provider.No product
Gateway and guardrailsAmazon Bedrock Guardrails, Azure AI Content Safety Prompt Shields, Check Point AI Guardrails (formerly Lakera), Portkey, Cloudflare AI GatewayLiteLLM, NeMo Guardrails, Microsoft Presidio, LLM Guard, Llama GuardTenant ID in gateway metadata. Thresholds tuned per feature. A block, redact or flag policy.GA
ModelAnthropic, OpenAI, Amazon Bedrock, Azure OpenAI, Google Vertex AI, with no-training terms plus zero data retention or a BAA·Confirm in the contract and config that each feature you use is covered by zero data retention.GA
Actions via the toolshedMCP gateways and identity providers that support on-behalf-of token exchange, such as Auth0MCP SDKs, agentgatewayTools called with the end user's own token, scoped to their tenant. Writes need user confirmation.Preview
Per-tenant AI logsDatadog LLM Observability, Langfuse CloudLangfuse, OpenTelemetry GenAI conventionsTenant tag on every span. Access control by tenant, per-tenant export and delete, abuse rules.GA
Red team and evalsPromptfoo Enterprise (now owned by OpenAI), Check Point AI red teamingPromptfoo, Garak, PyRITTwo-tenant canary tests in CI. Tenant A plants markers that tenant B must never see.GA

Rollout steps

#StepWhoEffort
1Get no-training terms in writing, request zero data retention and sign a BAA if you need oneFounder or legal, with security lead1-2 weeks elapsed
2Build one tenant-scoped retrieval layer using namespaces or row-level securityBackend engineer2-4 weeks
3Key every cache you run by tenant, or turn shared caches offBackend engineer0.5-1 week
4Check opt-out and retention settings before retrieval and before any model callBackend engineer2-4 weeks
5Put a gateway in front of all model calls with prompt-attack and PII filtersPlatform engineer2-3 weeks
6Tag every log and trace with tenant ID and restrict who can read themPlatform engineer1-3 weeks
7Add cross-tenant canary tests and an injection suite to CISecurity engineer2-3 weeks
8Run an outside AI pentest before launchOutside consultant1-3 weeks
9Tune output classifiers once real traffic existsSecurity engineer1-2 weeks

What you still build

  • A retrieval wrapper that won't run without a tenant ID
  • Tenant-keyed semantic, response and embedding caches
  • Opt-out enforcement that runs before retrieval, not after
  • Retention deletes that reach the vector DB, gateway logs, observability tool and caches
  • Tenant-tagged logs with per-tenant access, export and delete
  • Two-tenant canary tests that run in CI before each release

Gotchas

  • Provider prompt caches can't be keyed per tenant. Anthropic isolates by workspace on its own API, and Bedrock and Google Cloud isolate only by organization. Key your own caches by tenant.
  • Injection classifiers catch direct jailbreaks but miss much of the injection hidden in uploaded files. Limit what actions can do and confirm writes.
  • Zero data retention needs provider approval and may not cover every feature. Check each one.
  • Logs hold prompts, so a shared log view is a cross-tenant leak.
  • Generic jailbreak suites won't find your tenancy bugs. You need your own canary tests.
  • Guardrail cost grows with traffic, input and output length, and the number of policies you turn on.

Common use cases

  • In-product chat, search and summaries
  • Customer support bots
  • AI agents inside your app
  • Document and data analysis for customers

Key risks

  • One customer's data in another customer's answer
  • Prompt injection from customer-uploaded content
  • Customer data used for training without consent
  • Shared caches or logs visible across tenants

Fast path

  • KEEPTenant ID enforced on every retrieval and on your own caches
  • KEEPNo training on customer data, in contract and config
  • SIMPLIFYPer-tenant opt-out before per-feature controls
  • DEFEROutput classifiers. Keep regex PII and citation checks from day one
  • KEEPCross-tenant tests in CI before each release

Sources

Vendor documentation and announcements we checked for this page. Products are examples of a category, not endorsements.

Not sure which pieces to buy and which to build?

Bring the AI tools your teams use today and the data they touch. In a 30-minute call we map you to these models and name the controls to add first. No sales pitch.

Talk to a CISO