Loki logging for ISO 27001 control A.8.15

Loki can hold the logs your ISO/IEC 27001:2022 logging controls need, but the policy, scope and certification decisions stay with you and your certification body.

On this page

How Loki supports ISO 27001 A.8.15 logging

Your ISMS team is preparing for an accredited certification audit, and the auditor will ask for logging evidence under Annex A control A.8.15. Loki helps with the collection, storage, retention and access parts of that control: it stores logs from the sources you choose in object storage you control, enforces retention through the compactor, and limits who can read the logs through an authenticating proxy and tenant separation. It does not decide which events you must log, write your logging policy, run incident response under A.5.26, or certify anything. Those decisions stay with your ISMS owners. DeployOpen prepares the system, its configuration and the evidence an auditor samples, but it does not issue audit reports or certificates. ISO does not certify organizations either; accredited certification bodies do, and they work to ISO/IEC 17021-1 and ISO/IEC 27006-1.

Start by writing down which event sources A.8.15 requires you to cover, then map each one to a Loki stream with a stable label set, and confirm the collection agent for each source. Grafana Alloy is Grafana's supported shipper, and Promtail has reached end of life, so any Promtail agents in your estate should be planned for migration. Clock synchronization is the related control A.8.17: log timestamps are only useful as evidence if every source and the Loki servers use a synchronized time source, so confirm that setup on each host and record how it is checked. Also agree the incident-related events that feed A.5.26 so the response team can query them without changing the logs.

For protection from change, put the Loki bucket behind restricted write permissions, enable object versioning or a write-once option if your storage provider offers one, and keep the compactor's deletion rights separate from ordinary administrators. Retention is a decision, not a default: retention is disabled until retention_enabled is set, so the retention period for each stream must be chosen and documented before go-live. Auditors typically sample a few events, the retention setting in force, the access list for the log store and evidence that the clocks were in sync. Keep those records, such as configuration exports, retention reviews and access reviews, in your ISMS evidence store and confirm with your certification body which samples and periods it expects.

Mapping A.8.15 and A.8.17 to Loki capabilities and configuration

This table maps the logging, clock synchronization and incident response expectations in ISO/IEC 27001:2022 Annex A to what self-hosted Loki provides and what your team must configure. Read the middle column as what Loki does and the right column as what you must set and document. The main takeaway is that Loki supplies tenancy, retention and ingestion features, but the event scope, time source and access rules are decisions you must make and record.

Requirement (control ID and title)Loki capabilityConfiguration to set
A.8.15 Logging: event sourcesAlloy, OpenTelemetry HTTP ingestion, Fluent Bit and the Docker logging driver can all ship events with labels for source and applicationList in-scope systems, enable their audit logging, ship with Alloy and apply stable source labels to every stream
A.8.15 Logging: protection of log informationTenant separation through auth_enabled and the X-Scope-OrgID header; Loki has no built-in authentication layerSet auth_enabled to true, place an authenticating reverse proxy in front and block direct access to Loki ports
A.8.15 Logging: retentionCompactor applies retention only when retention_enabled is set; it is off by default, so logs are kept indefinitelySet retention_enabled, then write per-stream or per-tenant rules that match the period in your documented retention policy
A.8.15 Logging: access to logsQuery access depends on the proxy and Grafana roles; label-based access control is a Grafana Enterprise Logs featureSeparate reader and administrator roles, restrict each tenant's queries, and confirm whether label-level limits are needed
A.8.17 Clock synchronizationLoki stores timestamps as received from senders and does not synchronize clocks itselfRun NTP or chrony on every log source and Loki node, monitor drift and record the time source in your evidence
A.5.26 Response to information security incidentsStored logs support investigation, and the Loki ruler can alert on log patterns tied to incident triggersDefine alert rules for in-scope events, route them to your incident process and grant responders time-bounded query access

Which event sources an auditor will expect to see in Loki

The list of event sources is not something Loki decides. It comes from your ISMS scope, your risk assessment and your Statement of Applicability, where you record how each Annex A control, including A.8.15 Logging, applies to your organization. Start there: identify the systems that store, process or transmit information in scope, the identity providers that authenticate access to them, and the security tools that detect or respond to events. Then ask what each system must record to show who did what, when, and from where. Write that decision down per source, with its owner and the reason it is in or out. An auditor will sample against your documented scope, so a source missing from it is hard to justify later, and a source in it with no evidence of collection is a finding.

Once the scope is set, collect from each source with Grafana Alloy, Grafana's supported log shipper, or with OpenTelemetry Collector pipelines where your teams already standardize on OpenTelemetry. Loki also accepts Fluent Bit, Fluentd and the Docker logging driver, but pick one collection path per source class so the configuration is reviewable. Cover servers and their operating system and audit logs, container platforms and their control plane events, identity systems such as your SSO provider and directory, and security tools such as endpoint or network sensors. Do not use Promtail for new or existing collection. Promtail reached end of life on March 2, 2026, with no further updates or commercial support, and Grafana directs users to migrate to Alloy. Confirm the current Alloy and Collector versions against your own test results before you standardize.

Evidence Loki produces and how to keep it for an audit

An ISO/IEC 27001 auditor sampling A.8.15 will ask whether logs exist, are protected, and can be retrieved for the period claimed. Loki does not generate an audit report, so the evidence below comes from your configuration, your version control history, your proxy and identity records, and records you capture yourself.

Retention configuration and change history

The retention settings in your Loki configuration file, including retention_enabled and the per-tenant or per-stream rules, define how long logs are kept. Store that file in version control so every change has an author, a date and a reason. An auditor will typically sample the current settings and ask for the commit that set them and the approval behind it. Check that the retention periods match the periods your logging policy states.

Loki retention docs

Compactor logs showing retention runs

Retention is applied by the compactor, and it is disabled by default, so a configuration that looks correct may never delete anything. Keep compactor logs for the audit period so you can show that retention ran and what it removed. Confirm with your own environment how long your log platform keeps these operational logs, since they are themselves evidence. Alert on compactor errors so a silent failure does not go unnoticed.

Tenant and access configuration records

Loki has no built-in authentication layer, so the authenticating reverse proxy in front of it holds much of the access evidence. Keep the proxy configuration, the identity provider's group membership for log readers, and the mapping of X-Scope-OrgID tenant values to teams. An auditor will sample who could read which tenant on a given date. Export these records periodically rather than relying on the current state.

Loki multi-tenancy docs

Sample query outputs for retrieval

Logging is only useful if records can be retrieved for a chosen period. Run scheduled queries for a defined window, such as a past month, and save the output with the query text, the time range and the date it was run. This shows the auditor that logs exist and can be read, not just that retention is configured. Store the samples alongside the configuration records so they can be matched to a period.

Clock configuration records

Log timestamps only support an investigation if the sources agree on time. ISO/IEC 27001 control A.8.17 covers clock synchronization, which is closely tied to A.8.15. Record the time source configured on Loki hosts, on the log shippers such as Grafana Alloy, and on the systems generating events, along with periodic checks showing offset. Keep these records with the logging evidence so an auditor can reconcile timestamps across sources.

Clock synchronization and protecting logs from change under A.8.17

Consistent timestamps are what let an investigator line up a failed login on a server with a firewall denial and a Grafana Alloy ingestion event from a different host. Under A.8.17 (Clock synchronization), the control expects clocks in the systems that generate logs to be synchronized to approved time sources. For Loki, the practical task is to record which time source each host and each Alloy agent uses, and to confirm that drift is monitored. Ask each platform team for the NTP or chrony configuration on every log source, the stratum or upstream servers it trusts, and the alert that fires when offset exceeds the threshold your policy sets. Keep this as a register that maps host, agent version and time source, because an auditor sampling a single incident will ask for it. Confirm the timestamp handling in your Alloy pipeline and in the Loki version you run against the vendor documentation, rather than assuming the ingest time and the event time match.

Protecting logs from change is the second half of A.8.15, and it depends on who can alter the settings that decide what survives. In a self-hosted Loki deployment, the settings that matter most are retention_enabled and the retention rules applied by the compactor, along with the object store credentials that can delete chunks. Retention is disabled by default, so a change that enables or shortens it is a material event and should be restricted to a small named group, reviewed, and logged. Limit the service account the compactor uses to the permissions it needs, keep administrative access to the object store separate from access to Grafana, and route changes to Loki configuration through version-controlled review. Loki has no built-in authentication layer, so the reverse proxy that enforces identity in front of it is also part of the change boundary.

Whether the object store can stop an accidental or malicious deletion depends on the platform you choose. Object versioning, retention locks and legal holds vary between Amazon S3, Google Cloud Storage, Azure Blob Storage, Ceph and any S3-compatible product, and their behavior is not identical. Confirm in your environment and in each vendor's documentation whether versioning is enabled, whether a write-once retention mode can be applied to the Loki bucket, and who holds the permission to remove that protection. Record the answers in the control evidence, because a retention policy that a single administrator can silently bypass will not satisfy an auditor who samples changes.

What Loki does not cover for ISO 27001 logging

Loki stores and searches logs well, but several parts of A.8.15 sit outside the product. Authentication, event selection, retention settings, storage choice and the management system remain your responsibility, and each needs a named owner before an auditor asks.

Authentication sits outside Loki

Loki has no built-in authentication layer. The Loki documentation says you must run an authenticating reverse proxy, such as nginx, HAProxy, OAuth2 Proxy or Pomerium, in front of it. Without that proxy, anyone who can reach the endpoint can read or write logs. Confirm the proxy enforces identity for every route, including the push and query paths, and record how that configuration is reviewed.

Loki authentication docs

Relevant events are your decision

A.8.15 asks you to log the activities that matter for your risk, but Loki cannot decide which events those are. Someone must define the event sources, such as identity systems, admin consoles, firewalls and privileged access tools, and confirm each one ships to Loki. Keep that list in your ISMS records so an auditor can compare it against your risk assessment.

Retention is off by default

Loki's compactor applies retention only after retention_enabled is set, so logs are kept indefinitely until you configure it. Retention can be global, per tenant or per stream selector, and each stream rule must be at least 24 hours. Decide the period for each log type, document the reason, and test that the compactor actually removes data after the period.

Storage choice affects production readiness

Loki's recommended production object stores are Amazon S3, Google Cloud Storage and Azure Blob Storage. S3-compatible stores such as MinIO and the local filesystem are supported, but the documentation does not typically recommend them for production. If your organization runs an on-premises object store, confirm its durability, versioning and access logging before you rely on it for audit records.

Loki storage docs

Label-based access control is commercial

Loki's open-source tenancy separates data by X-Scope-OrgID, but finer controls such as label-based access control, token authorization and cross-tenant queries come from Grafana Enterprise Logs. If your auditors need to limit who sees specific streams within one tenant, that requirement must be met with the open-source setup, a commercial license or a compensating control. Confirm which applies before the design is fixed.

Grafana Enterprise Logs docs

Management system and certification remain yours

Loki produces evidence, but the ISMS itself is not a software function. Your policy, scope statement, risk treatment decisions, management review and internal audit belong to your organization. The certification body performs the external audit, and DeployOpen does not issue certificates or attestations. Assign owners for these records now so they exist when the certification body asks for them.

Configuration sequence for an ISO 27001 logging setup

This sequence turns the logging expectations of control A.8.15 into a Loki configuration that a certification body can sample. Each step produces a setting, a check or a record that ties back to the organization's own ISMS scope.

  1. Confirm logging scope from the ISMS

    The information security team, with system owners, lists the systems in the ISMS scope that must produce logs, the events each one records and who reviews them. This list comes from the organization's asset inventory and risk assessment, not from what the log shipper can collect by default. The step is done when the scope is written down as an approved document that names each event source and its owner.

  2. Select the Loki deployment mode

    The platform team chooses monolithic, simple scalable or microservices mode based on the expected daily log volume and the operating model. Loki documents monolithic mode for up to about 20 GB of logs per day and simple scalable mode for volumes approaching 1 TB per day, but simple scalable mode is being deprecated and will be removed in Loki 4.0, so a new build should favor a path that will remain supported. The step closes with a short design record that states the chosen mode, the volume assumption and the reason for it.

  3. Set up object storage for chunks and index

    The platform team provisions the object store that holds compressed chunks and the TSDB index. Loki's recommended production stores are Amazon S3, Google Cloud Storage and Azure Blob Storage, and S3-compatible or filesystem stores are not typically recommended for production. The team confirms that the bucket is private, encrypted and reachable only by the Loki components. Done means a test write and read succeed and the storage configuration is saved as a controlled file.

  4. Enable authentication and assign tenant IDs

    The platform team sets auth_enabled to true so that Loki operates in multi-tenant mode, then assigns one tenant ID per separate log domain, such as production and security. Every client must send the X-Scope-OrgID header on each request. Done means a request without the header is rejected and a request with the correct tenant ID returns only that tenant's data.

  5. Place an authenticating proxy in front of Loki

    Loki has no built-in authentication layer, so the platform team deploys an authenticating reverse proxy such as nginx, HAProxy, OAuth2 Proxy or Pomerium in front of it. The proxy ties each user or service to an identity from the organization's identity provider and sets the tenant header, so clients cannot choose their own tenant. Done means an unauthenticated request is refused at the proxy and the proxy access log records the identity behind each request.

  6. Configure Alloy sources and time synchronization

    The platform team deploys Grafana Alloy on each in-scope source, which Grafana supports as its log shipper for Loki, and maps every source to its tenant and labels. Promtail reached end of life on March 2, 2026, so it should not be used for new collection. In parallel, the operations team confirms that every source and Loki node synchronizes to an approved time source, which supports the clock synchronization expectation in control A.8.17. Done means each source appears in Loki with the expected labels and a timestamp check shows no drift between sources.

  7. Set retention and per-stream rules

    Retention is disabled by default in Loki, so the platform team sets retention_enabled to true in the compactor configuration, which is the step that keeps logs from being kept indefinitely. The team then defines global, per-tenant or per-stream rules that match the retention period recorded in the ISMS decisions, with each stream rule at least 24 hours. Done means a documented retention table maps each stream to its period and a test stream is removed after its rule expires.

  8. Restrict access and document each configuration

    The security team limits who can query each tenant, who can change Loki configuration and who can reach the object store, and records these roles in the access model. Where the organization needs label-based access control or cross-tenant queries, it confirms whether that requires Grafana Enterprise Logs, which adds those features. The team then keeps every configuration file, access list and test result in version control so an auditor can sample the evidence. Done means the access review and configuration baseline are signed off by the ISMS owner.

Setting retention periods the organization can defend

ISO/IEC 27001:2022 does not give a retention number for logs. Control A.8.15 expects logs to be produced, protected and reviewed, but the period they are kept is a decision the organization must make and be able to justify. That justification should come from three inputs: the risks identified in the organization's risk assessment, the legal and contractual obligations that apply to each system, and any other frameworks it is bound by. The longest of these requirements usually sets the floor for a given log class, and the risk assessment decides what sits above it. Record the decision per log source, not once for the whole cluster, because a authentication log for a payment system and a debug log from a internal tool rarely justify the same period.

Loki applies these decisions through its retention settings. Retention is disabled by default, so logs are kept indefinitely until retention_enabled is set in the compactor configuration, which is worth confirming in your own environment before go-live. Retention can be set globally, per tenant, or per stream selector, and each stream rule must be at least 24 hours. Map each organizational decision to the narrowest setting that matches it: a tenant for an environment or business unit with one policy, and a stream selector for a class of logs, such as security-relevant events, that needs a longer or shorter period than its neighbors. Keep the mapping in version control next to the Loki configuration, so the rule and its reason change together.

For each retention rule, record the rationale, the owner who approved it, the source of the requirement, the date it took effect and the review date. Treat any change as a formal change: note who requested it, what evidence supported it and whether logs already written under the old rule will be removed or kept. Shortening a period can destroy evidence an auditor expects to see, so confirm with legal and the risk owner before reducing it. Ask your certification body and your own compliance team which records they will sample, since the audit trail for retention decisions is often what gets examined first.

How log sources, the proxy, Loki and auditors connect

The diagram starts with servers, containers, identity systems and security tools, which send events through Grafana Alloy or OpenTelemetry into Loki. Loki writes compressed chunks and its index to object storage, and the compactor applies retention there. An authenticating reverse proxy sits in front of Loki and Grafana reads, and the trust boundary covers the Loki cluster and the evidence store. Check that every write path goes through the collector, that only the proxy is reachable from users, and that the evidence store is separate from the tenants whose activity it records.

Log sources reach Loki through a collector, and auditors reach it only through the proxy.

Questions buyers ask before hiring help with ISO 27001 logging

Does running Loki make an organization ISO 27001 compliant?

No. Loki is a tool that can store and protect logs, but ISO does not certify organizations and neither does DeployOpen. Certification is issued by an accredited certification body after it audits your information security management system (ISMS) against the requirements of ISO/IEC 27001:2022. Loki can support control A.8.15 (Logging) and related controls, but the auditor will judge whether your policies, scope, risk decisions and records work together. DeployOpen prepares the Loki configuration, access controls and evidence so your team and auditor can review them. The ISO certification page explains who issues certificates.

What drives the effort and cost of a Loki logging implementation for ISO 27001?

The main drivers are scope and the number of log sources. The work usually covers which systems are in the ISMS scope, how many sources must be onboarded, the storage and retention design, how tenants and access are separated, and how evidence will be produced for an auditor. Each additional source type, such as cloud audit trails, identity providers, network devices or custom applications, adds parsing, testing and documentation work. Costs are one-time for design and build and can recur for ongoing support, upgrades and testing. DeployOpen does not publish prices. Every engagement is quoted from a written scope that lists sources, deliverables and responsibilities before work starts.

How long does a Loki logging project for ISO 27001 take?

The duration depends on the scope agreed in writing, so DeployOpen does not give a fixed timeline before the scope is known. The schedule is shaped by how quickly the client confirms its ISMS scope, how many sources need onboarding, whether storage and infrastructure are ready, and how many approval rounds the evidence package needs. Ask for a timeline tied to named milestones in the proposal, and check which dependencies sit with your team, such as access to systems and change approvals. Also plan around your certification audit date, since evidence needs to exist and have been operating for a period before an auditor samples it.

What must our organization provide before implementation starts?

Plan to provide several inputs before the build begins:

  • Your ISMS scope statement and the list of systems, services and locations inside it
  • An asset list or inventory that identifies where logs are produced and who owns each system
  • Reliable time sources and your existing clock synchronization approach, which relates to control A.8.17
  • Named owners for log access, retention decisions and audit review, along with the approvers for changes
  • Access to test environments, cloud accounts or data centers where Loki will run

Missing inputs usually cause the largest delays, so confirm them during scoping.

Can our internal team implement ISO 27001 logging with Loki without outside help?

Often yes, if the team has experience running Linux infrastructure, object storage and Kubernetes or a comparable deployment, and if someone owns the ISMS. The harder parts are usually not the installation. They include deciding what to log and how long to keep it, designing tenancy and access so administrators cannot quietly change logs, documenting decisions in a form an auditor can sample, and keeping the setup working after staff changes. Compare the internal effort, skills and time against a written partner scope. Your team keeps ownership of the ISMS either way, and the decisions on retention and risk stay with your organization.

How do the 2025 and 2026 ISO 27001 certification transition dates affect planning?

Organizations still certified to ISO/IEC 27001:2013 had to move to the 2022 edition, because under IAF MD 26:2023 all 2013 certifications had to expire or be withdrawn by 31 October 2025. That makes the 2022 controls, including A.8.15 and A.8.17, the reference for any audit now. Accredited certification bodies also had to apply ISO/IEC 27006-1:2024 to all clients by 31 March 2026, as set out in IAF MD 29:2024. Confirm with your certification body which edition and audit rules apply to your next cycle, and time your logging evidence so it covers the period the auditor will review.

Does DeployOpen issue ISO 27001 audit reports or certificates for our Loki logging?

No. DeployOpen plans, implements, hardens and documents self-hosted platforms in your infrastructure and prepares the systems, controls and evidence that a compliance assessment will need. It does not issue audit reports, attestations or certifications. Independent auditors and accredited certification bodies perform those activities. If your auditor needs a specific evidence format, agree it with them early so the Loki setup produces records in that form.

How DeployOpen works on this

DeployOpen plans and configures self-hosted Loki in your own infrastructure so your compliance and security teams can review the logging setup against ISO/IEC 27001:2022 control A.8.15. We agree the scope in writing first, then build, test and document the configuration, and hand over the evidence an auditor will ask to see.

How we scope

  • Agree in writing which systems, event sources and log types fall under the A.8.15 logging requirement.
  • Record the retention periods, tenant layout and access roles your Information Security Management System requires for Loki.
  • Confirm with your certification body which evidence they expect, since DeployOpen prepares records but does not issue audit reports.

How we build

  • Configure Grafana Alloy or other supported shippers to send time-stamped events from in-scope systems to Loki.
  • Set up an authenticating reverse proxy in front of Loki, with tenant IDs, and check that unauthenticated requests are refused.
  • Test retention, deletion and clock synchronization settings against your documented rules before go-live.

How we hand over

  • Deliver the written configuration, event source inventory and retention decisions, mapped to A.8.15 and the related A.8.17 clock synchronization control.
  • Document the access model, change controls on the log store and the procedure for reviewing logs and responding to gaps.
  • Walk your team through sample queries and the records an auditor is likely to request, so your staff can produce them on demand.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after handover, if your team wants it.
  • Re-check the logging configuration when new systems join scope or when Loki versions change.
  • Ask for a quote based on the written scope, which sets out the one-time build work separately from any recurring support.

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.