Key Takeaways
- SOC 2 and ISO 27001 certify your organization's controls, not a tool β never claim "Ollama is SOC 2 compliant" or "vLLM is ISO 27001 certified." Frame everything as readiness for the controls an auditor will check.
- SOC 2 evaluates against five Trust Services Criteria (security, availability, confidentiality, processing integrity, privacy); ISO 27001 evaluates against Annex A controls inside a documented ISMS (Information Security Management System).
- The inference endpoint needs access control and structured request logging β most self-hosted engines (Ollama, vLLM, TGI) ship none of this by default and need a gateway in front of them.
- Encrypt model weights and prompt/response logs at rest (disk-level encryption) and in transit (TLS) β the same controls you already apply to any other production data store.
- Even open-weight models need a documented vendor risk assessment: publisher identity, checksum verification, licence terms, and known CVEs in the serving stack.
- Compliance-automation platforms (Vanta, Drata, Secureframe) can pull evidence from cloud infrastructure automatically, but a self-hosted inference server usually needs a custom integration or manual evidence upload.
- This article is not legal or compliance advice β your auditor or QSA makes the final scoping and control decisions.
Is This Legal or Compliance Advice?
No β this guide is not legal or compliance advice. It explains, at a technical level, the categories of controls a SOC 2 or ISO 27001 auditor typically checks and how they map onto a self-hosted LLM deployment. Whether a specific control satisfies your audit depends on your auditor's judgment, your organization's risk assessment, and the exact scope statement you file. Consult a qualified auditor, QSA, or your compliance counsel before you schedule an audit or make claims about your compliance status.
What Do SOC 2 Trust Services Criteria Require?
SOC 2 evaluates an organization against five Trust Services Criteria (TSC), and every one of them applies to a self-hosted LLM system the moment it touches production data. An auditor does not test the model β they test whether your organization can demonstrate the control existed and worked over the review period.
Use security if your report only needs to cover the baseline criterion (mandatory in every SOC 2 report). Add availability if the LLM serves a production workflow with an uptime commitment. Add confidentiality if prompts or outputs contain contractually protected data. Add processing integrity if the model's output feeds a downstream decision. Add privacy if prompts contain personal data about identifiable individuals.
π In One Sentence
SOC 2 Type II requires 6β12 months of evidence that a control operated effectively, not just that it exists on the day of the audit.
| Criteria | What Auditors Check | Self-Hosted LLM Control |
|---|---|---|
| Security | Access control, logging, vuln management | RBAC + MFA on the inference gateway |
| Availability | Uptime, redundancy, DR planning | Multi-node serving + tested backups |
| Confidentiality | Data classification, need-to-know | Weights + logs encrypted at rest |
| Processing Integrity | Accuracy, completeness, timeliness | Version-pinned models + output logs |
| Privacy | Notice, consent, data minimization | Documented prompt-log retention policy |
What Does ISO 27001 Annex A Require?
ISO 27001 certifies an organization's Information Security Management System (ISMS), and Annex A is the reference list of controls the ISMS draws from β not a checklist applied directly to any one system. A self-hosted LLM deployment sits inside the ISMS scope like any other asset: it needs a risk assessment, a Statement of Applicability entry, and evidence the relevant controls operate.
Use the organizational controls (A.5) first β they cover vendor risk for the model publisher, not just the software vendor. Add the technological controls (A.8) next β they cover encryption, logging, and endpoint hardening directly.
| Annex A Area | Maps to LLM Stack As |
|---|---|
| A.5 Organizational | Vendor risk review for model publishers |
| A.5.19β22 Supplier relationships | Model provenance & licence checks |
| A.8 Technological | Endpoint hardening, encryption, logging |
| A.8.16 Monitoring activities | Inference request/response audit logs |
| A.8.24 Cryptography | TLS in transit, disk encryption at rest |
| A.5.29 Continuity | Incident response runbook for model serving |
What Access Control and Logging Does the Inference Endpoint Need?
An auditor expects to see who called the model, with what credential, and when β a requirement none of the common self-hosted engines satisfy without a gateway in front of them. Ollama binds to `127.0.0.1:11434` by default and has no user accounts; vLLM and Hugging Face TGI expose an OpenAI-compatible HTTP API with no built-in authentication.
Use an API gateway (Kong, Envoy, or a cloud provider's API management layer) in front of the inference engine to add per-caller API keys or OAuth2, then log every request with caller identity, timestamp, model version, and token counts to a system your SIEM can ingest. Avoid logging full prompt/response bodies in the access log itself β keep that in the separately governed prompt-log store covered under data retention below.
- Authentication: API keys or OAuth2 at the gateway, never a shared bearer token used by every caller
- Authorization: role-based access β who can call which model, who can see admin/metrics endpoints
- Audit log fields: caller identity, timestamp, model + version, endpoint called, response status β exported to a log store with restricted write access
- Admin access: MFA required for anyone with shell or config access to the inference host
How Do You Encrypt Model Weights and Prompt Logs?
Model weights, prompt logs, and response logs need the same at-rest and in-transit encryption an auditor already expects for any other production data store. Weights themselves are not typically secret, but the inference server's disk usually also holds cached prompts, fine-tuned adapters, and logs that are.
Use full-disk encryption (LUKS on Linux, BitLocker on Windows, FileVault on macOS) on the inference host as the baseline. Add TLS termination at the gateway for every inbound API call β never expose the raw inference port over plaintext HTTP, even inside a VPC. Use a managed KMS (AWS KMS, Azure Key Vault, HashiCorp Vault) for the keys protecting the prompt-log store rather than a static key baked into a config file.
- At rest: full-disk encryption on the host, encrypted volume for the prompt-log database
- In transit: TLS between caller β gateway β inference engine, no internal plaintext hop
- Key management: keys stored in a KMS/vault, rotated on a documented schedule, never hardcoded
What Does Change Management Look Like for Model Updates?
Every model version swap, quantization change, or system-prompt edit is a production change and needs the same approval trail as a code deployment. Auditors specifically look for evidence that changes were reviewed and approved before going live, not just that a changelog exists after the fact.
Use a version-pinned deployment (tag the exact model checksum, not a mutable "latest" pointer) so a rollback is possible and auditable. Use a documented approval step β even a lightweight one, like a pull-request review β before any production model swap, and log the approver, the date, and the reason for the change.
- Pin the exact model artifact (checksum, not a mutable tag) in the deployment config
- Require a documented approval before any production model or system-prompt change
- Log every change with who approved it, when, and why
- Keep a rollback path to the previous version-pinned artifact
How Do You Assess Vendor Risk for Open-Weight Models?
"Open-weight" does not mean "no vendor" β the model publisher is a supply-chain party the same way a SaaS vendor is, and an auditor expects a documented risk assessment for it. This is one of the most commonly missed controls: teams treat a downloaded GGUF or safetensors file as internal, not third-party, even though it originated outside the organization.
Use the publisher's identity and track record as the first check β a model from Meta, Mistral AI, Alibaba/Qwen, or a similarly identifiable organization is a different risk profile than an anonymous upload. Verify the file checksum against the publisher's published hash before deployment. Check the licence terms for commercial-use restrictions. Track known CVEs not in the model itself but in the serving stack (llama.cpp, vLLM, TGI) that loads it.
- Publisher identity: known organization (Meta, Mistral AI, Alibaba/Qwen, Microsoft) vs. anonymous source
- Checksum verification: SHA-256 match against the publisher's published hash before deployment
- Licence review: commercial-use terms, redistribution restrictions, any field-of-use exclusions
- Serving-stack CVEs: track known vulnerabilities in llama.cpp, vLLM, or TGI β not just the model file
What Does Incident Response Look Like for a Model-Serving System?
A model-serving system has incident categories a standard web app runbook does not cover β model exfiltration, prompt injection that leaks data through the model's own output, and inference-endpoint compromise β and each needs a named response path. An auditor checks whether the plan exists and has been tested, not whether an incident has actually occurred.
Use your existing incident-response plan as the base and add model-specific triggers: unexpected model weight file changes, an unusual spike in requests from one credential, or output logs showing a prompt-injection pattern. Define who is notified, what evidence gets preserved (logs, not just a summary), and how quickly the endpoint can be isolated.
- Trigger examples: unauthorized weight file change, credential-level request spike, suspected prompt injection in logs
- Containment step: ability to isolate or take the inference endpoint offline without a full system outage
- Evidence preservation: retain raw request/response logs for the incident window, do not rotate them out during investigation
- Test cadence: tabletop exercise at least annually, documented with date and participants
What Should a Data Retention Policy for Prompt Logs Cover?
Prompt logs are the highest-risk data your LLM stack produces, because they often contain the same sensitive content a user would type into any other business system. A written retention policy β how long logs are kept, who can access them, and how they are deleted β is a control an auditor will specifically ask to see, not just infer from your general data-retention policy.
Use a retention window that matches your actual audit or debugging need, not "keep everything forever by default." Use field-level minimization where possible β log metadata (caller, timestamp, token count, model version) without the full prompt text for routine traffic, and reserve full-content logging for a shorter, more tightly access-controlled window used for debugging or abuse investigation.
- Retention window: define a specific number of days/months, not "indefinitely"
- Access control: prompt-log store has its own restricted access list, separate from general log access
- Minimization: log metadata by default; full-content logging only where justified and time-boxed
- Deletion process: documented and, ideally, automated β not a manual step someone might skip
How Should You Segment the Inference Server on the Network?
The inference server should sit in its own network zone, reachable only through the authenticated gateway β not flat on the same subnet as general application servers. This limits the blast radius if any other service on the network is compromised and gives an auditor a clean network diagram to review.
Use a dedicated VLAN or subnet for the inference host, with firewall rules that allow inbound traffic only from the API gateway and outbound traffic restricted to what the engine actually needs (model registry pulls, if any β many air-gapped deployments block outbound entirely after the model is downloaded).
Which Self-Hosted Tools Ship Audit-Relevant Controls?
None of the common inference engines ship a finished audit trail β the difference between them is how much you have to build versus how much a platform already provides. This is a readiness comparison, not a compliance claim about any of these tools.
Use Ollama or vLLM if you are comfortable building the gateway, logging, and access-control layer yourself. Use an enterprise inference platform if you would rather pay for built-in RBAC and audit logging and reduce the custom-instrumentation work β you still need the surrounding ISMS documentation either way.
| Tool | Built-in Auth/Logging | Instrumentation Needed |
|---|---|---|
| Ollama | None (binds localhost) | Reverse proxy + auth + SIEM export |
| vLLM | Prometheus metrics only | API gateway (OAuth2/keys) + audit log |
| Hugging Face TGI | Prometheus metrics only | API gateway + audit log, same as vLLM |
| Enterprise platforms | RBAC + audit logging built in | ISMS documentation still required |
Can a Compliance Automation Platform Help With a Self-Hosted LLM?
Compliance automation platforms β Vanta, Drata, and Secureframe are the three most commonly used β pull evidence automatically from cloud infrastructure, HR systems, and identity providers, but a self-hosted, on-prem inference server usually sits outside their default integration list. These platforms can still automate evidence collection for the parts of your infrastructure they do integrate with (cloud accounts, identity provider, ticketing system), while the inference host itself typically needs a manual evidence upload or a custom API integration.
Use a compliance automation platform if you are running a broader SOC 2 or ISO 27001 program across the company and want continuous monitoring for everything except the self-hosted LLM layer. Skip one if the LLM deployment is your only in-scope system β a smaller, manually maintained evidence folder may be cheaper for a narrow scope.
| Platform | Focus |
|---|---|
| Vanta | Broad framework coverage, common for startups |
| Drata | Continuous control monitoring, deep integrations |
| Secureframe | SOC 2 + ISO 27001 combined workflows |
These platforms automate evidence collection for your broader control environment β they do not certify your self-hosted LLM infrastructure by themselves, and PromptQuorum has no current affiliate relationship with any of them (disclosed product links only).
What Are the Most Common Audit-Readiness Mistakes?
Most self-hosted LLM audit findings come from treating the inference server as outside the normal IT control environment, not from a fundamentally missing control. These are the five most frequent gaps.
- Mistake: Assuming an open-source tool being "auditable" (source visible) means it is already audited. Fix: Document your own risk assessment of the publisher and serving stack β visibility is not the same as review.
- Mistake: Leaving the inference API reachable without a gateway "because it's internal only." Fix: Internal-only is a network claim, not an access-control claim β add authentication regardless.
- Mistake: Logging full prompt text in the same access log used for uptime monitoring. Fix: Separate the two stores; apply stricter access control and a shorter retention window to the content-bearing log.
- Mistake: Treating a model version bump as a routine deploy with no approval trail. Fix: Apply the same change-management approval used for code deployments.
- Mistake: No incident-response plan specific to model-serving failure modes (weight tampering, prompt injection). Fix: Add these triggers to your existing IR plan and test them at least once.
What Is the Audit-Prep Checklist for a Self-Hosted LLM?
Work through this checklist before your auditor's fieldwork begins β each item maps to a control category covered above.
- 1Add the self-hosted LLM system to your ISMS/SOC 2 scope statement
Why it matters: An undocumented system in scope is a finding even if every technical control is in place. - 2Map the relevant Trust Services Criteria or Annex A controls to your actual stack
Why it matters: Auditors test against the mapping you provide β an incomplete mapping means untested gaps. - 3Put an authenticated gateway in front of every inference endpoint
Why it matters: Removes the single most common finding: an unauthenticated model API. - 4Turn on structured request logging with caller identity and timestamps
Why it matters: This is the primary evidence an auditor requests for the security criterion. - 5Encrypt the host disk and the prompt-log store; enforce TLS at the gateway
Why it matters: Satisfies the confidentiality criterion and Annex A.8.24 cryptography controls. - 6Write and follow a change-management procedure for model version updates
Why it matters: Proves processing integrity and gives you a documented rollback path. - 7Document a vendor risk assessment for every open-weight model in production
Why it matters: Closes the most commonly missed control β supply-chain risk for the model itself. - 8Publish a retention and deletion policy for prompt/response logs
Why it matters: Directly required for the privacy criterion when prompts contain personal data. - 9Segment the inference server onto its own network zone
Why it matters: Limits blast radius and gives the auditor a clean network diagram to review. - 10Write an incident-response runbook with model-specific triggers and test it once
Why it matters: Auditors check that the plan exists and has been exercised, not just drafted.
Frequently Asked Questions
Is this article legal or compliance advice?
No. This guide explains, at a technical level, the categories of controls a SOC 2 or ISO 27001 auditor typically checks and how they map onto a self-hosted LLM deployment. It is not a substitute for a qualified auditor, QSA, or compliance counsel β consult one before scoping an audit or making any compliance claim.
Does using Ollama, vLLM, or Hugging Face TGI make our AI infrastructure SOC 2 compliant?
No single tool makes an organization compliant. Compliance is an audit outcome for your organization's full set of controls, evaluated by an independent auditor. Ollama, vLLM, and TGI can support the technical requirements (once you add authentication, logging, and encryption around them), but none of them are "SOC 2 compliant" or "ISO 27001 certified" as software products.
What is the difference between SOC 2 Type I and Type II for AI infrastructure?
Type I evaluates whether controls were designed appropriately at a single point in time. Type II evaluates whether those controls operated effectively over a review period, typically 6β12 months. For an inference endpoint, Type II means your access logs, change-management records, and incident-response evidence need to exist continuously across that entire window, not just on the day of the audit.
Do open-weight models need a vendor risk assessment even though there is no software vendor?
Yes. The model publisher (Meta, Mistral AI, Alibaba/Qwen, or others) is a supply-chain party the same way a SaaS vendor is. A documented risk assessment should cover publisher identity, checksum verification of the downloaded weights, licence terms, and known CVEs in the serving stack that loads the model.
Does self-hosting an LLM reduce our audit scope compared to a cloud LLM API?
It changes the scope rather than simply reducing it. Self-hosting removes the third-party data-processor relationship a cloud API creates, which can simplify vendor-risk sections of the audit. It also means your organization now owns every control the cloud vendor previously handled β access control, encryption, patching, and logging on the inference server itself become entirely your responsibility.
What logging does an auditor expect on the inference endpoint?
At minimum: caller identity (API key or authenticated user), timestamp, model and version called, endpoint, and response status, exported to a log store with restricted write access. Full prompt/response content is typically kept in a separate, more tightly access-controlled store governed by its own retention policy, not mixed into general access logs.
How long should we retain prompt logs for audit evidence?
There is no universal number β it depends on your organization's risk assessment and your auditor's expectations, balanced against data-minimization principles under any applicable privacy law. Define a specific retention window in writing (not "indefinitely"), apply stricter access control to logs containing full prompt content, and be prepared to justify the window to your auditor.
Can compliance automation platforms like Vanta, Drata, or Secureframe monitor a self-hosted LLM server?
They automate evidence collection well for cloud infrastructure, identity providers, and ticketing systems, but a self-hosted, on-prem inference server usually sits outside their default integration list. Most teams either build a custom API integration or upload evidence for that system manually while the platform automates the rest of the control environment.
What is the single most common audit finding for self-hosted AI infrastructure?
An inference API reachable without authentication, justified internally as "it's only reachable inside our network." Network reachability and access control are different claims β an auditor expects authentication on the endpoint regardless of network placement.
Should we choose vLLM/TGI or an enterprise inference platform for easier compliance readiness?
vLLM and Hugging Face TGI give you full control but require you to build the authentication, logging, and encryption layer yourself. Enterprise inference platforms often ship RBAC and audit logging built in, reducing custom instrumentation work β but you still need the surrounding ISMS documentation and vendor risk assessment either way. Choose based on whether your team would rather build or buy the instrumentation layer, not on a compliance shortcut either option claims to offer.
Where Can You Find Additional Sources?
- AICPA SOC 2 Trust Services Criteria (aicpa-cima.com) β the official Trust Services Criteria framework SOC 2 audits are evaluated against
- ISO/IEC 27001:2022 (iso.org) β the official standard text and Annex A control reference
- OWASP Top 10 for LLM Applications (owasp.org/www-project-top-10-for-large-language-model-applications) β security risks specific to LLM deployments, including supply-chain and prompt-injection risk