OpenSearch audit logging

OpenSearch Security audit logs record who did what on the cluster, but only if categories, storage and retention are planned before go-live. This page explains how to enable them and keep audit records outside the cluster they describe.

On this page

Why OpenSearch audit logging needs a plan before go-live

Audit logging on OpenSearch should be designed before the cluster takes production data, because the evidence a security or compliance team needs (who accessed which index, who changed a role or a security setting, and from where) is only as good as the logging configuration in place on day one. The OpenSearch Security plugin provides audit logs alongside role-based access control, document and field-level security, field masking, user impersonation and TLS for node and client traffic. Teams usually need audit logs when the cluster holds sensitive search data or logs that other controls depend on, when an assessor asks for evidence of access and configuration changes, or when a security team wants to investigate activity after the fact. Confirm the audit category list, the default settings and the configuration keys for your exact OpenSearch version in the OpenSearch security documentation before you write the plan, since categories and defaults can differ between releases.

Settle three questions early. First, which events must be captured for your control set, and how much volume each category will add to the cluster. Second, where the audit records go: the cluster's own indices are the wrong place, because anyone who can administer the cluster could alter or delete the evidence of their own actions. Third, who owns the records, how long they are kept, and who may read them. Each answer changes the design. Audit volume grows with query traffic, so a category that is cheap on a test cluster can become expensive on a busy production cluster, and the storage target has to hold that volume for the full retention period.

Treat the audit configuration as part of the security baseline rather than a late add-on. Write down the target for each audit record, the account that writes it, the role that can read it and the test that proves a known action produced a record in the external store. Run that test after every upgrade and after every change to the Security configuration, because a configuration reset can quietly remove logging that was working before. A short written plan agreed with your compliance team at this stage is far cheaper than rebuilding evidence after an audit request arrives.

Audit log categories and storage targets, and when each fits

This table compares the audit log category choices and storage targets for OpenSearch Security audit logging, and the trade-offs each one creates. Read each row as a decision to make before enabling audit logging, then confirm the exact category and sink names in the documentation for your OpenSearch version. The main takeaway is that more verbose logging raises storage and review effort, and records kept only inside the cluster they describe are harder to trust during an investigation.

DecisionWhat it recordsTrade-offWhen it fits
Authentication failuresFailed login attempts against the configured identity backendsLow volume and high value for detecting brute force or misconfigured clientsAlmost every deployment, as a baseline before adding other categories
Successful accessSuccessful authentications and the requests that follow themShows who touched what, but volume grows quickly with dashboards and automated clientsRegulated workloads where access must be attributable to a named user
Configuration changesChanges to security settings, roles, users and mappingsLow volume with high investigative value, since privilege changes are a common focus of reviewAny cluster where administrators or automation change security configuration
Requests to indicesRead, write and search requests against index dataMost detailed and most expensive in storage and review time, so scope it to sensitive indicesClusters holding personal, financial or health data where access to specific records must be traceable
Records written to the cluster's own indicesAudit events stored in indices on the cluster being auditedSimple to set up and query, but an attacker or failure that damages the cluster can also damage its audit trailShort-term troubleshooting or low-risk environments only
Records sent to a separate cluster or log pipelineAudit events forwarded to storage outside the audited clusterAdds a second system to run, secure and back up, but keeps the audit trail intact if the audited cluster failsRegulated or security-sensitive deployments that need records independent of the cluster
Retention and volume planningHow long records are kept and how much storage they consumeLonger retention and broader categories raise storage cost, and records nobody reviews add little valueEvery deployment, decided before enabling categories so storage and review ownership are agreed
Review and alerting ownershipWho reads the records and how oftenRecords with no reviewer provide evidence only after the fact, so ownership should be assigned with the category choiceAny deployment that must show audit review to an assessor

How to enable audit logging on an OpenSearch cluster

This sequence turns on the Security plugin's audit logging, sends the records to a destination outside the cluster they describe, and proves that real events arrive. Each step ends with a check so the team knows the previous step held before moving on.

  1. Confirm the Security plugin and TLS are in place

    Before touching audit settings, confirm the OpenSearch Security plugin is installed and enabled on every node, and that TLS covers node-to-node and client traffic. Audit records only mean something if the cluster is authenticating users over encrypted connections. Check the cluster health endpoint and confirm an authenticated request succeeds over HTTPS while an anonymous request is rejected. Record the Security plugin version so you can match it to the security docs for that version.

  2. Review the security docs for your version

    Audit configuration keys, file names and the location of the security configuration directory can change between OpenSearch versions. Open the official security documentation for the exact version your cluster runs and note the audit logging settings, the file that holds them and how changes are applied. Do not copy settings from older blog posts or from another cluster. Your output is a short, version-specific checklist that the rest of the sequence follows.

  3. Enable audit logging in the security configuration

    Using the audit configuration described in the docs for your version, set audit logging to enabled and keep a backup of the original file before editing. Make the change through your configuration management tooling where possible so the change is tracked. The change is complete when the audit configuration file validates against the version's expected format and the change is recorded in version control or your change log.

  4. Select audit categories and the events you need

    Choose which event categories to record, such as failed logins, granted and denied access, and configuration changes, based on what your security and compliance teams need to answer. Recording every category produces large volumes, so decide which events must be kept and for how long. Confirm which categories exist in your version and what each one records, since names differ across releases. The check is a written list of enabled categories that the security owner has approved.

  5. Configure the storage target outside the cluster

    Set the audit destination so records leave the cluster they describe. Options depend on your version and the docs, and may include writing to an external index on a separate cluster or to an external system your team operates. Confirm the target's own access controls, so cluster administrators cannot silently alter or delete audit records. Confirm the write credentials are scoped to audit writes only. The check is a test write from the audit path that appears in the target and nowhere else.

  6. Apply the configuration and restart as the docs require

    Apply the change using the method the security docs specify for your version, which may be a security admin script run against the cluster or a node restart. Apply it in a controlled window and watch cluster health during the change. Confirm every node loaded the new configuration, since a node that missed the change will record differently. The check is that the cluster returns to green health and each node reports the audit settings you set.

  7. Generate test events and verify they reach the target

    Create three known events: a failed login with a deliberately wrong password for a test user, a permitted read by a user whose role allows it, and a configuration change in a test index or role. Then query the audit target and confirm each event appears with the user, timestamp, source address and action. If one event is missing, check that its category is enabled and that the target write succeeded. Save the test results with the change record as evidence that the control works.

  8. Confirm ongoing delivery and access to the audit store

    Confirm that audit records keep arriving after the test, and that the team can only read them with a role separate from cluster administration. Set an alert or a routine check for when audit writes stop, because silent failure of the audit path is a common gap. Ask your auditors or compliance lead which retention period and review process they expect, and document the answer. The check is a recurring report or alert that shows records are still flowing.

Why audit records must live outside the cluster they describe

An audit trail stored only inside the cluster it describes is weak evidence. If an administrator with broad rights, or an attacker who has taken over a node, can change the indexes that hold audit events, the records can no longer show what happened. The integrity question is not whether the cluster is well configured today but whether anyone who could misuse it could also rewrite its history. Treat the audit store as a separate trust boundary from the cluster being audited, and decide this before you enable the feature, because retrofitting it later means explaining a gap.

The usual pattern is to ship audit records to a separate store that has its own access controls. That store should be administered by a different group than the OpenSearch cluster team where your organization allows it, with read access granted narrowly to investigators and compliance reviewers. Use separate credentials for the audit pipeline, so that the account which writes audit events cannot also administer the cluster, and so that rotating one set of credentials does not disrupt the other. Where the sink supports write-once storage, object lock, or a retention policy that blocks deletion for a set period, enable it and record the settings as evidence. Confirm each of these with your chosen sink, because support varies by product and deployment model.

Before you rely on any sink, ask the vendor or platform team to confirm four things in writing: whether records can be altered or deleted by its administrators, how retention is enforced, how the write path authenticates, and what happens to events if the sink is unavailable. Test the last point directly by stopping the sink during a controlled test and checking whether the cluster buffers, drops or blocks. Document the answers in the same evidence pack as your audit category choices, since an assessor will ask who can change the trail and how you know.

Security and operational considerations for audit logs

Audit logs are only useful if they are complete, tamper-resistant and available when someone needs them. The cards below cover the places where audit logging itself can fail: the credentials and transport used to ship records, the people who can change the configuration, the sensitive data that can end up in logged requests, and the storage and certificate work that comes with running the pipeline long term.

Protect shipping credentials

The account that writes audit records to an external store is a high-value target, because an attacker holding it can send false records or delete evidence. Give the shipping component its own service account with write-only access to the audit destination and no rights to read or modify the cluster. Store its secret in a secrets manager you control, rotate it on a schedule, and confirm in your own environment that a compromised cluster admin cannot reach the audit store with the same credential.

Encrypt the shipping path

Audit records often contain user names, source addresses and request paths, so they should not cross the network in clear text. Enable TLS between the cluster and every audit destination, and verify the destination certificate rather than trusting any certificate presented. Confirm the exact TLS settings for your chosen storage target with its documentation before rollout, since audit delivery options differ by target.

OpenSearch security docs

Restrict audit configuration changes

Whoever can edit the audit settings can quietly switch off categories, change the destination or exclude a user from logging. Limit the security admin role to a small named group, require SSO with multi-factor authentication for those accounts, and forward the configuration changes themselves to the external store. Review who holds the role on a set schedule and check that a change to audit settings raises an alert.

Handle sensitive data in requests

Verbose categories can capture request bodies, which may include personal data, credentials or query contents that the organization is not allowed to retain in a log store. Decide which fields must be excluded or masked before the first production run, and test with representative requests. Limit read access to the audit index, since the records may still be sensitive even when secrets are removed, and confirm retention limits with your privacy and legal owners.

Plan for volume growth

Enabling every category on a busy cluster can produce far more records than the team expects, and the audit store can fill its disk and stop accepting writes. Estimate volume during a pilot period that reflects real traffic, choose only the categories your controls need, and set retention and capacity alerts on the audit store. Ask your storage team to confirm the sizing and retention period in writing before the audit configuration goes live.

Rotate certificates without losing records

Certificate expiry on the transport path can stop audit delivery silently, leaving a gap that is only discovered during an investigation. Add the audit destination certificate to the same inventory and renewal calendar as the cluster certificates, and test a rotation in a non-production environment first. Monitor delivery failures so that a broken connection produces an alert within a known window, and confirm how records are buffered or lost during an outage with your chosen setup.

How audit events flow from the cluster to external storage

The flow starts with client and admin requests reaching the OpenSearch cluster, where the Security plugin checks each request and records audit events. Those events leave the cluster through a configured sink and land in a store that sits behind a separate trust boundary with its own access controls. Reviewers query that separate store, not the cluster, so anyone who administers the cluster cannot quietly edit the record of what they did. Check that the cluster credentials cannot write to or delete from the audit store.

Audit events leave the cluster for a store that reviewers query under separate controls.

Questions buyers ask about OpenSearch audit logging

What drives the effort and cost of an OpenSearch audit logging project?

The main drivers are the audit categories you need, the storage target (sink) that holds the records, the number of clusters, the evidence your assessors will ask for, and how much audit and OpenSearch experience your in-house team already has. A single cluster with a short list of categories and an existing log store is a small piece of work. Several clusters, regulated evidence requirements and a new sink each add configuration, testing and review. Cost comes from the people doing the design, configuration, verification and handover, so ask any partner to break the quote down by these drivers and to state which items are one-time and which recur, such as log storage growth and periodic review.

How long does audit logging setup and verification usually take?

Duration depends on the same drivers as cost: how many clusters are in scope, how many audit categories you enable, where records must go, and how much evidence must be produced and reviewed. A single cluster with documented categories and an existing sink is usually the shortest path. Multi-cluster estate with new storage, access separation and evidence packs takes longer, mainly because changes need change windows and each sink and cluster needs its own test. Ask for a timeline in the written scope that lists the design, change, verification and handover steps separately, so you can see which step depends on your own approvals.

What does the work need from our team?

The work needs three things from your side. First, named owners: one person for the cluster, one for the audit sink or log platform, and one for the compliance or security evidence requirements, with authority to approve categories and retention. Second, access: administrative access to the cluster's security configuration and to the destination where audit records will be stored, plus a read-only reviewer account for verification. Third, change windows: enabling audit categories and restarting or reloading security settings usually needs a planned window on each cluster. Confirm these owners and windows before the scope is signed.

Can our own team enable OpenSearch audit logging without a partner?

Yes, for a single cluster with a documented list of categories and a sink your team already operates. The OpenSearch Security plugin provides audit logging settings, and a capable platform team can follow the documentation, test in a non-production cluster and roll the change out. More review is needed when the records are evidence for a regulated assessment. In that case, someone must confirm that the categories, retention, access separation and tamper protection match the control requirements, and that the records can be produced on request. A partner can help with that review, but the decision on what counts as sufficient stays with your compliance owner.

Does DeployOpen issue audit reports or certifications for our OpenSearch logging?

No. DeployOpen prepares systems, controls and evidence for compliance assessments, including configuring audit logging, separating storage from the cluster and documenting how the records are produced. It does not issue audit reports, attestations or certifications. Those come from independent auditors and certification bodies, who decide whether your controls meet the criteria that apply to you. Ask your auditor early which evidence they expect, such as configuration exports, sample records and proof of access restriction, so the implementation can produce it.

Which OpenSearch version do we run, and what should we confirm before planning?

Confirm the exact version of every node, the Security plugin version, and whether the cluster is in maintenance or past end of life. Audit logging settings and categories can differ between releases, so the configuration must be checked against the documentation for your version rather than copied from a newer example. The OpenSearch releases page lists maintenance status for each version, and only maintained versions receive security patches. If the cluster is on an unsupported version, audit logging should be planned together with an upgrade path, because the audit configuration will need to be redone after the upgrade.

Where should audit records be stored so they stay outside the cluster they describe?

Store audit records in a separate system that the cluster administrators cannot quietly change, such as a dedicated log platform or an external destination your security team controls. Keeping the records on the same cluster means an administrator who alters the cluster can also alter its history. Plan separate credentials for the sink, restrict who can read and delete records, and test that a cluster outage does not stop records from being captured. Confirm the chosen destination and its retention with your security owner before enabling categories.

How audit logs support compliance evidence

Audit logs are one input to the evidence a compliance program uses for logging and access controls, but they are not evidence on their own. A compliance assessment looks at the whole control: the requirement, the configured mechanism, the records it produced, and proof that someone reviewed them. DeployOpen prepares systems, controls and evidence for that review, but it does not issue audit reports, attestations or certifications. Independent auditors and certification bodies make those determinations, so the scope of what the audit log must prove should be settled with them before the categories are chosen.

Start by mapping each framework requirement your organization is assessed against to the specific OpenSearch Security audit settings you plan to enable. Record which categories cover which requirement, where the records are stored, who can read them, and how long they are kept. A requirement for access history, for example, usually points to authentication and access-related categories, while a requirement for configuration change tracking points elsewhere. Keep the mapping in a document the auditor can read, and tie each row to a named configuration file or setting such as opensearch.yml or the audit section of the security configuration, so the claim can be tested rather than described.

Confirm the retention period, the review cadence and the sampling method with your auditor and your legal or records team before go-live, since these vary by framework and by jurisdiction. Ask the auditor which evidence they will request, such as a configuration export, a sample of records over a set period, or proof that alerts were acted on. Then run a test: generate known events, confirm they appear in the external store with the expected fields, and keep the output. That test record is often the most useful artifact you can hand an assessor, because it shows the control working on your system rather than in a diagram.

How DeployOpen works on this

DeployOpen plans OpenSearch audit logging as part of a self-hosted OpenSearch deployment in infrastructure you control. The work covers which audit categories to enable, where records are stored outside the cluster they describe, and how access to those records is controlled, with each step written down before the build starts.

How we scope

  • The written scope lists which audit categories are enabled and the reason each one is needed.
  • It names the storage target for audit records and confirms it sits outside the monitored cluster.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.

How we build

  • We configure the Security plugin audit settings in a staging cluster before changing production.
  • We test that audit events appear for authentication, failed logins and privileged actions as designed.
  • We check that audit records are shipped off-cluster and that the cluster cannot alter them after delivery.

How we hand over

  • You receive the audit configuration, storage design, retention settings and access roles as written documentation.
  • The handover includes a verification checklist your team can rerun after upgrades or certificate changes.
  • Compliance and security reviewers get the evidence they need to review how audit logging was set up.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer after handover.
  • Retainer work can cover reviewing audit coverage when OpenSearch versions move through maintenance.
  • We can retest audit controls after configuration changes, so the setup stays verified over time.

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.