Loki as evidence for SOC 2 monitoring controls

Loki can produce much of the log and alerting evidence an auditor samples for CC7.2, but it does not write your monitoring policy, define your anomaly criteria or make the audit decision.

On this page

How Loki helps meet SOC 2 CC7.2 monitoring evidence

A SOC 2 engagement is coming, and criterion CC7.2 asks for two things: evidence that system components are monitored for anomalies that point to malicious acts, natural disasters or errors, and evidence that those anomalies are analyzed to decide whether they are security events. Loki supports the log collection, retention and access evidence behind that control, not the whole control. It stores the logs your monitoring depends on. It does not decide what counts as an anomaly, who reviews it, or how the review is recorded. Those remain with management and the auditor.

The split matters for scoping. DeployOpen prepares the Loki side: which log sources feed the store, the alert rules and their documented links to CC7.2, retention set to cover the audit period, and access controls on the log store and its query path. Management owns the monitoring objectives, the triage procedure, the escalation criteria and the tickets showing each anomaly was evaluated. The auditor decides whether the design is suitable and, in a Type 2 examination, whether those controls operated effectively over the period. A SOC 2 Type 1 report covers the system description and control design as of a date, while a Type 2 report adds an opinion on operating effectiveness over a period, so the evidence you collect should be ready for the period the report will cover.

The Trust Services Criteria place CC7.2 in the common criteria series CC6 to CC9, which apply to every SOC 2 report, and the points of focus under it are guidance rather than separate requirements. Read the 2017 TSC with revised points of focus (2022) and confirm with your auditor which points of focus they expect you to address. Also confirm the audit period, the systems in scope and the sample populations they will request, because those determine how long Loki must keep data and which sources must be wired in. The sections that follow cover each of these in turn.

Mapping CC7.2 and related criteria to Loki capabilities

This table pairs each SOC 2 criterion area with what Loki can record, the configuration that makes the record usable, and the evidence an assessor will ask to see. CC7.2 wording is paraphrased, and points of focus are guidance rather than separate requirements, so confirm final control design with your auditor. Read each row as a question: what must be true, what Loki provides, and what you must configure.

Criterion areaLoki capabilityConfiguration needed
CC7.2: monitoring system components for anomaliesLoki stores logs from the components you route to it, queryable by label and line contentDefine the in-scope sources (hosts, applications, identity provider, cloud audit logs) and ship them with Grafana Alloy or another supported client
CC7.2: analyzing anomalies and deciding security eventsThe ruler evaluates LogQL alert rules, and Grafana Alerting can route notifications to respondersWrite alert rules tied to named anomaly conditions, set owners and document how each alert is triaged and closed
Retention for the audit periodRetention is applied by the compactor and is disabled by default, so logs persist until you enable itSet retention_enabled and a period that covers your audit window, using global, per-tenant or per-stream rules of at least 24 hours
CC6: restricting access to the log storeMulti-tenancy is active only when auth_enabled is true and each request carries X-Scope-OrgIDEnable auth, place an authenticating reverse proxy in front of Loki, and restrict who can query and who can delete
CC6 and CC7: protecting logs from changeLoki has no built-in authentication layer and deletion is an operator actionLimit administrative access, restrict object storage permissions and record who changes retention or deletes data
Confirm before the audit period startsCapabilities depend on the Loki version and deployment mode you runConfirm the release, deployment mode and any enterprise features with your team and your auditor before relying on them as evidence

Which logs Loki should collect for system anomaly monitoring

Start from the system description, not from the log sources you happen to have. Under the 2018 description criteria (DC 200), management describes the infrastructure, software, people, procedures and data that make up the system in scope, and CC7.2 monitoring is then tested against that same boundary. If a component appears in the description but its logs never reach Loki, the auditor will treat the monitoring control as incomplete for that component. Walk the description and map each component to four log families: infrastructure (hosts, Kubernetes nodes, load balancers, network devices), identity (SSO and directory events, authentication successes and failures, MFA changes, privilege grants), application (business-relevant API and audit events, errors, administrative actions) and administrative activity (console and CLI use, configuration and change events, access to the log store itself). Record the decision for each family in writing so the scope can be traced back to the description.

Ship logs with Grafana Alloy, Grafana's supported log shipper. Promtail reached end of life on March 2, 2026, with no further updates, so any Promtail agents in the scope are a finding to remediate before the audit period starts. For applications that already emit OpenTelemetry, an OpenTelemetry Collector pipeline that exports to Loki's OpenTelemetry ingestion endpoint is a valid path, and Fluent Bit is supported for hosts that already run it. Whichever path you choose, use one shipper per source class where possible, and confirm with your own environment that each source produces the timestamps, host identifiers and user identifiers the alert rules will depend on. Keep a current inventory of shippers, versions and target tenants, because the auditor will ask how you know a source is missing.

What evidence Loki produces for the auditor

A SOC 2 auditor testing CC7.2 wants to see the monitoring setup, the alerts it raised, and the decisions made about them, all kept for the audit period. The cards below cover the artifacts Loki and its surrounding components can produce, how to export each one, and why the auditor, not the team, decides whether the set is sufficient.

Alert rule definitions and change history

The alert rules that watch log patterns are the core of the CC7.2 story. Keep the ruler rule files in version control so each rule has an author, a reason and a dated commit, and export the deployed rule set at regular points so the auditor can match what ran to what was approved. Check that the rules in production match the repository, since a manual edit in the running cluster leaves no history. Confirm with your own change process how rule changes are approved.

Loki retention docs

Alert firing and routing records

Auditors look for proof that anomalies were detected and went somewhere. Capture firing events from the ruler and Alertmanager or Grafana Alerting, including timestamps, rule identity and the receiver each notification reached. Export these records to storage outside the cluster, because a cluster rebuild can erase them. Confirm which notification history your alerting backend keeps by default and whether it meets the audit period you are testing.

Retention settings in effect

An auditor testing a Type 2 period will ask what retention applied during that period, not what applies today. Record the compactor settings, including whether retention_enabled is set, and the global, per-tenant or per-stream rules in force. Retention is disabled by default, so an unset value means logs are kept indefinitely. Keep dated copies of the configuration so a change partway through the period is visible.

Minimum stream rule
24 hours
Loki retention docs

Tenant and access configuration

This card shows that log access is controlled. Save the Loki configuration showing auth_enabled, and document how each client sets the X-Scope-OrgID header and which tenant each team or service may read. Loki has no built-in authentication layer, so capture the reverse proxy configuration that enforces login in front of it. Confirm that clients cannot choose a tenant header that bypasses the proxy.

Loki multi-tenancy docs

Reverse proxy authentication logs

Because the authenticating proxy is the only gate in front of Loki, its logs show who queried logs and when. Export access logs and authentication failures from nginx, HAProxy, OAuth2 Proxy or Pomerium to the same retained store as the alert records. Include the identity provider events behind the proxy so a reviewer can trace a query to a named account. Confirm that the proxy log format records the user identity and the requested tenant.

Loki authentication docs

Documented triage of alerts

A firing alert only becomes a monitoring control when someone decides what it means. Keep a triage record for each alert that states whether it was a security event or not, who made the call and the basis for it. Link each record to the alert firing it reviewed. Sample a set of closed alerts each review cycle to confirm the triage was done and documented on time. The auditor will test this record against CC7.2, which asks for analysis of anomalies, so keep it in the ticketing system you already use.

Retention and access controls the auditor will test

Loki does not delete anything by default. Retention is applied by the compactor and stays disabled until you set retention_enabled to true, so a fresh install keeps logs indefinitely until someone decides otherwise. Once enabled, retention can be set globally, per tenant, or per stream selector, and each stream rule must be at least 24 hours. This lets you keep security-relevant streams for longer than general application logs, but only if the rules are written deliberately and reviewed.

  • Enable retention explicitly: Confirm that retention_enabled is set in the compactor configuration and that the value is in your infrastructure-as-code repository, not only on the running server.
  • Match periods to the engagement: Compare the configured retention with the period covered by the Type 2 examination, plus the sampling window the auditor uses. Confirm that period with your auditor and your engagement letter.
  • Scope per-stream rules narrowly: Use stream selectors for authentication, administrative and monitoring sources so that the longer period does not apply to every stream by accident.
  • Confirm the object store lifecycle: Check that bucket lifecycle policies do not expire objects earlier than Loki retention, and that backups follow the same period.
  • Keep a retention change log: Record every change to retention values with a date, a reason and an approver, since auditors often ask whether logs were removed during the period.

Before the examination, run a query that returns the earliest available entry for each in-scope stream and confirm it reaches back to the start of the period.

How log evidence flows from systems to the auditor

The flow starts in the monitored systems, where Grafana Alloy ships logs into Loki's write path and onto object storage, with the compactor enforcing retention. Loki's ruler evaluates alert rules that route through Grafana Alerting into the incident process. Operators reach Grafana and the Loki API only through an authenticating reverse proxy backed by SSO, and evidence exports are copied into the control evidence folder that the auditor receives. Check each boundary against your own environment, especially who can change retention and alert rules.

Log evidence moves from monitored systems through Loki to the auditor, with trust boundaries marked.

What Loki does not cover for CC7.2

Loki collects and stores logs, but CC7.2 is about how anomalies are identified, judged and acted on. The cards below mark where Loki stops and where your own design, records and sign-offs have to take over before an auditor will accept the monitoring control.

Anomaly thresholds and security event criteria

Loki evaluates whatever rules you write, but it does not decide what counts as an anomaly or when one becomes a security event. CC7.2 expects you to analyze anomalies and make that call, so the thresholds, severity levels and triage steps must be written down and approved. Confirm that each alert rule maps to a documented criterion and that someone owns the decision to escalate.

Operating effectiveness over time

A working Loki cluster on the day of review shows design, not sustained operation. A Type 2 examination looks at controls over a period, so you need evidence that ingestion stayed healthy, alert rules fired and were reviewed throughout that window. Confirm how you will export alert history, ingestion gaps and triage tickets for the full period rather than a screenshot taken for the audit.

Systems that send no logs

Loki can only monitor components that ship logs to it. Hosts, network devices, SaaS applications and batch jobs that are not wired into your collectors are invisible to CC7.2 monitoring, and silence from them looks like health. Build an inventory of system components in scope and confirm that each one has a log source and an alert for when its logs stop arriving.

Authentication in front of Loki

Loki has no built-in authentication layer. The documentation directs you to run an authenticating reverse proxy such as nginx, HAProxy, OAuth2 Proxy or Pomerium in front of it, so access control on the log store depends on that proxy and on how tenant IDs are set. Confirm which component authenticates users, that direct access to Loki ports is blocked, and that the proxy's own access logs are retained.

Loki authentication docs

Tamper protection and object lock

Retention settings alone do not prove that logs were not altered or deleted early. Protection depends on the object store configuration, such as write-once or retention locks, restricted delete permissions and separate credentials for the compactor. Confirm how your chosen object store enforces these controls, test that an operator cannot remove or rewrite stored chunks, and document the result.

Loki retention docs

Policies, roles and sign-off records

Loki produces logs and alert events, but the policy that requires monitoring, the assignment of responsible roles and the management sign-off that the control operates are management's work. Auditors sample these records alongside the technical evidence. Confirm that a written monitoring policy exists, that named owners review alerts on a stated cadence and that reviews are recorded in a system the auditor can access.

Configuring Loki so the monitoring control is testable

This sequence turns Loki into a log source an auditor can test for CC7.2, from defining scope and collection through alert ownership, retention, access reviews and dated test records.

  1. Define system scope and log sources

    Before any deployment, the control owner and the engineering lead list the system components in the SOC 2 system description, such as identity provider, application servers, databases, load balancers, cloud audit trails and endpoints that produce security-relevant events. Each source gets a named owner and a short note on which events matter for anomaly detection. The output is a signed scope table that the auditor can compare against the system description. Confirm the list with your SOC 2 auditor early, since they will sample from it.

  2. Deploy Loki on the chosen mode

    DeployOpen or your platform team deploys Loki in the deployment mode that fits the expected daily volume, using the sizing guidance in the Loki deployment modes documentation. Logs and the index go to object storage that you control. Note that simple scalable mode is being deprecated and removed with Loki 4.0, so new builds should confirm their path with the current upgrade guidance. The output is a running cluster with a recorded version, configuration file and storage location for the evidence pack.

  3. Enable tenancy and an authenticating proxy

    Set auth_enabled to true so every request carries an X-Scope-OrgID header, then place an authenticating reverse proxy such as nginx, HAProxy, OAuth2 Proxy or Pomerium in front of Loki. Loki has no built-in authentication, so without the proxy the log store is reachable by anyone who can route to it. Confirm that direct access to the Loki port is blocked at the network layer. The output is a test showing that unauthenticated requests fail and that authorized users reach only their tenant.

  4. Set retention to match the audit period

    Set retention_enabled in the compactor and define retention periods, globally or per tenant or stream, that cover the audit period your auditor will test. Retention is disabled by default, so logs persist indefinitely until this is set. Confirm the period with your auditor and your own policy, since the period is a business decision and not a Loki default. The output is a retention configuration in version control and a dated check that the compactor applies it.

  5. Ship logs through Grafana Alloy

    Deploy Grafana Alloy on the in-scope sources and configure it to forward logs to Loki with the tenant header set. Promtail reached end of life on March 2, 2026, so new collection should not start on it. Label streams by source and environment only, leaving detailed fields as content, so queries stay manageable. The output is a query in Grafana showing recent events from each source on the scope table, with gaps documented.

  6. Write alert rules with owners and severity

    Write alert rules for the anomaly patterns defined in the scope, such as repeated failed logins, privilege changes and unexpected administrative access, using the Loki ruler or Grafana Alerting. Each rule records an owner, a severity level and the response expected, so the rule can be defended as CC7.2 monitoring. Keep the rule definitions in version control with change history. The output is a rule catalog that an auditor can read without a walkthrough.

  7. Route alerts to a ticket record

    Connect each alert route to your ticketing or incident system so every firing alert creates a record with a timestamp, rule name, owner and disposition. The record should capture the analysis step that decides whether the event is a security event, which CC7.2 expects the organization to perform. Confirm that ticket fields cannot be edited silently after closure. The output is a sample ticket chain from alert to closure that shows the evaluation step.

  8. Test alerts and keep test records

    Run controlled tests that trigger each alert rule with known inputs, confirm the alert fires, the ticket is created and the owner receives it, then store the test date, input, result and tester in the evidence folder. Repeat tests on a schedule your control design sets, and after any rule or pipeline change. The output is a dated test log that supports operating effectiveness over the examination period in a Type 2 engagement.

  9. Review access to the log store

    Set a periodic access review of who can query Loki, who can change its configuration and who can reach the object storage bucket, and record the reviewer, date and any removals. The review covers both the proxy group membership and the cloud storage permissions, since either path exposes the logs. Confirm the review interval with your control design and auditor. The output is a signed access review with evidence of removals, which supports the logical access criteria as well as monitoring.

Questions buyers ask before using Loki for SOC 2 evidence

Does Loki alone satisfy SOC 2 criterion CC7.2?

No. Loki supports CC7.2 but does not satisfy it on its own. CC7.2 asks you to monitor system components for anomalies that indicate malicious acts, natural disasters or errors, and to analyze those anomalies to decide whether they are security events. Loki provides the log collection, storage and query layer. The monitoring design also needs defined log sources, alert rules with owners, a documented triage process and records showing that alerts were reviewed and acted on. An independent auditor decides whether those controls, taken together, meet the criterion. Your SOC 2 team should map each piece of Loki evidence to the criterion and its points of focus, which the AICPA's 2017 Trust Services Criteria describe as aids to control design rather than separate requirements.

How much effort does a Loki monitoring setup for SOC 2 take?

The effort depends on four drivers: the number of log sources in scope, the design of the alert rules, the maturity of your existing SOC 2 program and the scope of the system description. Each log source needs collection, labeling and a check that events arrive with correct timestamps. Alert design takes the most judgment, because each rule needs a threshold, an owner, a response path and a way to show it was reviewed. A team that already runs a SOC 2 program with documented monitoring procedures will need less design work than one starting from nothing. A wider system description, covering more components and more criteria beyond the common criteria, adds evidence to collect and maintain. Ask any provider to break its quote down by these drivers rather than giving a single figure.

Can our own team set up Loki for SOC 2 monitoring without a partner?

Yes, if you have the staff and the time. Before starting, confirm that you have people who can operate Loki, write and tune LogQL alert rules, and manage object storage and retention. Confirm that a named owner exists for each monitored system and for each alert rule. Check that you can enforce access controls on the log store, because Loki has no built-in authentication layer and needs an authenticating reverse proxy in front of it. Confirm that someone can produce evidence on request, including retention settings, alert definitions, access lists and records of reviewed alerts. Also confirm that your policy owners have approved the monitoring policy the auditor will read. If any of these items is missing, a partner can fill the gap, but the decision should rest on your own staffing picture.

How long does Loki SOC 2 monitoring work take?

No fixed duration applies to every environment, so the timeline comes from the written scope. Duration depends on how many systems and log sources are in scope, how many alert rules must be designed and reviewed, whether a retention policy and object storage layout already exist, and how quickly your owners can review and approve their parts. Timing also depends on your audit calendar. A Type 1 report describes control design as of a date, while a Type 2 report covers operating effectiveness over a period, so evidence must exist for the whole period the auditor examines. Start the scope conversation early enough that alert and retention controls operate long enough to produce evidence before the examination window begins.

What do we need to provide for a Loki SOC 2 engagement?

The work needs three groups of people and access. System owners must identify the components in scope, describe how they run and name who responds to their alerts. Environment access is needed for the infrastructure that hosts Loki, the object storage bucket, the reverse proxy and the systems that send logs, so that collection and access controls can be configured and tested. Policy owners must provide or approve the logging, monitoring and access policies that the alert rules and retention settings implement. Your SOC 2 or compliance lead should agree early on the system description and the criteria in scope, since these determine which evidence is needed. Ask for a written list of these inputs in any proposal, with a named contact for each.

Does DeployOpen certify our SOC 2 compliance?

No. DeployOpen prepares systems, controls and evidence for compliance assessments, including Loki collection, retention, alerting and access configuration, and documents how they operate. DeployOpen does not issue audit reports, attestations or certifications. An independent CPA firm performing a SOC 2 examination issues the report, and the AICPA framework requires that the service auditor obtain written representations from management. Your management remains responsible for the description of the system and for the controls it asserts. Before engaging any provider, confirm with your auditor which evidence they will sample and how they want it presented, so the work is built to match their testing.

What does Loki retention need to cover for the SOC 2 audit period?

Retention must keep monitoring evidence available for the full period the auditor will examine. Loki's retention is disabled by default, so logs are kept indefinitely until retention is enabled, which means you must set it deliberately. Retention can be set globally, per tenant or per stream selector, with each stream rule at least 24 hours. Confirm the period with your auditor and your own policy, then configure the compactor and keep the retention settings in version control so you can show what was in force on a given date. Also confirm that retention does not delete the alert history or review records you need to show, since those may live in a separate system.

Which Loki version and deployment mode should we plan around?

Plan around a supported Loki release and a deployment mode that your log volume justifies. Loki documents three modes: monolithic, simple scalable and microservices. The Loki documentation states that simple scalable mode is being deprecated and will be removed with Loki 4.0, so a new design should not depend on it. Confirm the current release on the Loki releases page before you fix a version, and record the version in your evidence, since auditors may ask which software produced the logs. Promtail reached end of life on March 2, 2026, so new collection should use Grafana Alloy rather than Promtail.

Who owns each part of the SOC 2 monitoring evidence

Management owns the system description and the monitoring policy, and no tool can take that over. Under the AICPA's 2018 description criteria (DC 200), management describes the system, including which components are in scope and how anomalies are monitored and evaluated. Management also decides which events count as security events, who reviews alerts and how fast they must be triaged. Those decisions appear in the description and in the written policy the auditor will read. Before any engagement, confirm with your CPA which system components the description must cover so that the Loki log sources match it.

DeployOpen's work sits underneath those decisions. Under the engagement, DeployOpen configures Loki collection, the ruler alert rules tied to CC7.2, tenant and access settings on the log store, and the reverse proxy that handles authentication. DeployOpen also prepares evidence exports, such as rule definitions, retention settings and access lists, so management can hand them over. DeployOpen does not write the system description, decide what is a security event for your organization, or certify the controls. Those remain management's responsibility, and the exports are inputs to management's assertion, not the assertion itself.

The CPA performs the examination, tests the controls and issues the report. A SOC 2 is an assertion-based examination under AT-C section 205, so the service auditor must obtain written representations from management, typically in a management representation letter, and cannot rely on a vendor's statements in their place. Type 1 and Type 2 reports differ in whether they test design only or operating effectiveness over a period. Ask your CPA which period and sampling approach they expect. Also note that a SOC 3 report is a general use report that can be freely distributed, while a SOC 2 report's use is generally restricted to specified parties.

How DeployOpen scopes and delivers SOC 2 monitoring evidence

DeployOpen plans, builds and documents the Loki log pipeline, alert rules and log store controls inside your own infrastructure, so your team can show how system anomalies are monitored and evaluated. We prepare the systems, controls and evidence for your assessment, while the independent auditor performs the SOC 2 examination and issues any report.

How we scope

  • The written scope names the log sources, such as identity, admin and production system logs, that feed Loki for CC7.2 review.
  • Alert rules, their owners and the response steps each alert triggers are listed as in-scope deliverables.
  • Retention periods, tenant layout and access roles for the log store are agreed before any build work starts.

How we build

  • We deploy Loki on object storage in your cloud account, data center or air-gapped network, with auth_enabled and tenant headers configured.
  • An authenticating reverse proxy is placed in front of Loki, and access to the log store is limited to named administrator roles.
  • Alert rules are tested with controlled events so you can show that anomalies are detected and routed to review.

How we hand over

  • You receive configuration, alert rule inventory, retention settings and access control records mapped to CC7.2 and the wider common criteria.
  • A written runbook covers how anomalies are triaged, how security events are decided and how the evidence is exported for the auditor.
  • Knowledge transfer sessions are held with your security, operations and compliance staff so they can review the setup independently.

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
  • Ongoing support, upgrades and continuous testing of the monitoring setup are available as a retainer.
  • Ask any provider to confirm in writing which evidence is produced, who reviews it and how the auditor will access it.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.