Elastic Cloud audit trail
Elastic Cloud audit trail is available on FedRAMP Moderate environments only.
Elastic Cloud audit trail records actions that members of your organization perform through the Elastic Cloud Console, the Terraform Provider for Elastic Cloud, the Elastic CLI, or any other client that calls the Elastic Cloud API.
Using Elastic Cloud audit trail data, you can answer questions such as:
- Which user or API key tried to authenticate, and did they succeed or fail?
- Which user increased resources on a deployment?
- Which resources is a given API key accessing?
- Who modified traffic filters, and when?
- Who upgraded, deleted, or changed the configuration of a deployment?
Elastic Cloud audit trail captures all calls to the Elastic Cloud API. Examples of audited actions include:
- Managing hosted deployments: creation, configuration changes, scaling, upgrades, and deletion
- Managing organization membership and invitations
- Managing Cloud API keys
- Managing network security configurations such as traffic filters, trust relationships, SSO, and role mappings
- Sign-in, sign-out, and authentication attempts to the Elastic Cloud Console
Elastic Cloud audit trail does not capture activity inside your deployments.
To audit Elasticsearch and Kibana activity within a deployment, enable audit logging on the deployment directly.
To use the Elastic Cloud audit trail, you need the following:
- A FedRAMP Moderate Elastic Cloud organization.
- A Platinum or Enterprise subscription.
- An Elastic Cloud API key with organization owner permissions.
- A destination deployment in the same organization to store audit logs. You might choose to use a dedicated deployment to keep audit data separate from production workloads.
- Your organization ID. You can find this on the Organization page under the organization name.
- The destination deployment ID. You can find this on the deployment's Overview page in the Elastic Cloud Console.
To set up Elastic Cloud audit trail, you install the integration on a destination deployment, then enable delivery through the API. After events are flowing, you can explore your audit trail in Kibana.
-
Install the Elastic Cloud integration
Before you enable delivery, install the Elastic Cloud integration on the destination deployment. The integration sets up everything you need to index and explore audit log events.
To install the integration:
- Open Kibana on the destination deployment.
- Find Integrations in the navigation menu or use the global search field.
- Search for Elastic Cloud, and then select the card from the list.
- On the Elastic Cloud integration page, click Add Elastic Cloud.
- On the installation page, click Install assets only. No agent policy is needed because the audit service pushes logs directly to your destination deployment.
- Confirm the installation.
The following resources are installed:
- Index templates for
logs-elastic_cloud.audit-* - An ingest pipeline for the
elastic_cloud.auditdata stream - Field mappings, including ECS fields and
elastic_cloud.audit.api_key.*fields - The Elastic Cloud audit logs data view (
logs-elastic_cloud.audit-*) - The [Elastic Cloud] Audit Logs dashboard
-
Enable audit log delivery
As an organization owner, enable delivery by calling the audit logs API.
Events start flowing when you enable delivery. Historical cloud audit logs are not backfilled.
Send a
POSTrequest to the audit logs endpoint, specifying your destination deployment and a data stream name that matcheslogs-elastic_cloud.audit-*. Replace the placeholders with your own values.curl -X POST \ -H "Authorization: ApiKey $CLOUD_API_KEY" \ -H "Content-Type: application/json" \ "https://api.elastic-cloud.com/api/v1/organizations/$ORG_ID/audit_logs" \ -d '{ "deployment_id": "<DESTINATION_DEPLOYMENT_ID>", "index": "logs-elastic_cloud.audit-default" }'- Replace
$CLOUD_API_KEYwith your Elastic Cloud API key - Replace
$ORG_IDwith your organization ID from the Elastic Cloud console - Replace
<DESTINATION_DEPLOYMENT_ID>with the ID of the hosted deployment that receives the logs - Represents the default data stream namespace.
To use a different data stream namespace, replace the
defaultsegment of the index name with your preferred namespace, for examplelogs-elastic_cloud.audit-production. The name must match thelogs-elastic_cloud.audit-*pattern so that the installed index templates apply.The data stream is created with a configurable retention policy that defaults to 30 days, and the failure store enabled.
ImportantIf you omit the
indexfield, events are indexed into a non-data stream index namedelastic-org<ORG_ID>-auditwithout field standardization. The installed dashboard does not display data from this index.- Replace
Verify the configuration:
curl -X GET \ -H "Authorization: ApiKey $CLOUD_API_KEY" \ "https://api.elastic-cloud.com/api/v1/organizations/$ORG_ID/audit_logs"The response returns the configured
deployment_idandindex.
-
Explore your audit trail
After enabling delivery, explore your audit logs in the destination deployment:
- Use the Elastic Cloud audit logs data view in Discover to browse individual events.
- Open the [Elastic Cloud] Audit Logs dashboard to visualize and filter audit activity.
If you need to decommission the destination deployment or switch to a different one, you can stop delivery at any time.
curl -X DELETE \
-H "Authorization: ApiKey $CLOUD_API_KEY" \
"https://api.elastic-cloud.com/api/v1/organizations/$ORG_ID/audit_logs"
This stops the delivery stream and invalidates the writer API key, but does not delete documents that were already indexed.