Skip to main content

Audit Logs

View Markdown

Audit Logs is a feature of Temporal Cloud that provides forensic access information for a variety of operations in the Temporal Cloud Control Plane.

Audit Logs answers "who, when, and what" questions about Temporal Cloud resources. These answers can help you evaluate the security of your organization, and they can provide information that you need to satisfy audit and compliance requirements.

You need the Account Owner or Global Administrator role to view Audit Logs via UI, use the API, or to configure an Audit Log Integration with AWS Kinesis or GCP Pub/Sub.

Note

Audit Logs do not capture data plane events, such as Workflow Start, Workflow Terminate, and Schedule Create. Instead, explore the Export feature, which does let you send closed Workflow Histories to external storage.

Which events are supported by Audit Logs?​

The operation field can contain the following event values:

  • Account
    • ChangeAccountPlanType: Change Account Plan Type
    • CreateAccountAuditLogSink: Create Account Audit Log Sink
    • DeleteAccountAuditLogSink: Delete Account Audit Log Sink
    • OffboardAccount: Offboard Account
    • SelfServiceOffboardAccount: Self-Service Offboard Account
    • UpdateAccount: Update Account
    • UpdateAccountAuditLogSink: Update Account Audit Log Sink
  • API keys
    • CreateAPIKey: Create API Key
    • CreateApiKey: Create API Key
    • CreateServiceAccountAPIKey: Create Service Account API Key
    • DeleteAPIKey: Delete API Key
    • DeleteApiKey: Delete API Key
    • UpdateAPIKey: Update API Key
    • UpdateApiKey: Update API Key
  • Billing
    • CreateBillingReport: Create Billing Report
  • Connectivity rules
    • CreateConnectivityRule: Create Connectivity Rule
    • DeleteConnectivityRule: Delete Connectivity Rule
  • Custom roles
    • CreateCustomRole: Create Custom Role
    • DeleteCustomRole: Delete Custom Role
    • UpdateCustomRole: Update Custom Role
  • Namespace
    • CreateNamespace: Create Namespace
    • DeleteNamespace: Delete Namespace
    • FailoverNamespaces: Failover Namespaces
    • RenameCustomSearchAttribute: Rename Custom Search Attribute
    • UpdateNamespace: Update Namespace
    • UpdateNamespaceTags: Update Namespace Tags
    • UpdateSearchAttributes: Update Search Attributes
  • Namespace export
    • CreateNamespaceExportSink: Create Namespace Export Sink
    • DeleteNamespaceExportSink: Delete Namespace Export Sink
    • UpdateNamespaceExportSink: Update Namespace Export Sink
    • ValidateNamespaceExportSink: Validate Namespace Export Sink
  • Nexus endpoints
    • CreateNexusEndpoint: Create Nexus Endpoint
    • DeleteNexusEndpoint: Delete Nexus Endpoint
    • UpdateNexusEndpoint: Update Nexus Endpoint
  • Projects
    • CreateProject: Create Project
    • DeleteProject: Delete Project
    • SetServiceAccountProjectAccess: Set Service Account Project Access
    • SetUserGroupProjectAccess: Set User Group Project Access
    • SetUserProjectAccess: Set User Project Access
    • UpdateProject: Update Project
  • Security
    • SecretFound: Detect Exposed API Key
  • Service accounts
    • CreateServiceAccount: Create Service Account
    • DeleteServiceAccount: Delete Service Account
    • SetServiceAccountNamespaceAccess: Set Service Account Namespace Access
    • UpdateServiceAccount: Update Service Account
  • Users
    • CreateJITUser: Create JIT User
    • CreateUser: Create User
    • DeleteUser: Delete User
    • InviteUsers: Invite Users
    • SetUserNamespaceAccess: Set User Namespace Access
    • UpdateIdentityNamespacePermissions: Update Identity Namespace Permissions
    • UpdateUser: Update User
    • UpdateUserNamespacePermissions: Update User Namespace Permissions
    • UserAcceptInvitation: User Accept Invitation
    • UserLogin: User Login
    • UserSignup: User Signup
  • User groups
    • AddUserGroupMember: Add User Group Member
    • CreateUserGroup: Create User Group
    • DeleteUserGroup: Delete User Group
    • RemoveUserGroupMember: Remove User Group Member
    • SetUserGroupNamespaceAccess: Set User Group Namespace Access
    • UpdateUserGroup: Update User Group

Audit log format​

The audit log schema is defined in Protocol Buffers (protobuf). The public LogRecord and Principal definitions specify the fields and types. The format you receive depends on how you access the logs:

SourceFormatField namesTimestamp representation
AWS Kinesis or GCP Pub/Sub sinkNewline-separated JSON objectssnake_case, such as log_idRFC 3339 string in emit_time
Cloud Ops API over HTTPJSON response containing a logs arraycamelCase, such as logIdRFC 3339 string in emitTime
Cloud Ops API over gRPCProtobuf response containing repeated LogRecord messagesDefined by the generated client for your languageProtobuf Timestamp
Temporal Cloud UI downloadJSON array of the UI's protobuf objectscamelCase, such as logIdObject containing seconds and nanos in emitTime

For sink delivery and HTTP responses, Temporal converts protobuf messages to JSON internally using ProtoJSON. The sink serializer uses protojson with UseProtoNames: true, which preserves the original protobuf field names in snake_case. The HTTP API uses ProtoJSON's default camelCase field names; see the GetAuditLogs HTTP reference and its OpenAPI schema. The UI download serializes the browser's protobuf objects directly, so its JSON representation differs from both sink delivery and the HTTP API.

Consume sink JSON​

AWS Kinesis and GCP Pub/Sub use the same audit log JSON format. Each stream message can contain multiple events separated by newlines. Parse each line as a separate JSON object.

The following table uses the sink's field names. Fields with default values can be omitted. The raw_details object contains request details whose keys depend on the operation; those keys are not renamed by the sink serializer.

FieldJSON typeDescription
operationStringOperation that was performed.
principalObjectWho initiated the operation, with type, id, name, and api_key_id fields.
raw_detailsObjectDetails about the request.
x_forwarded_forStringIP addresses making the call, in X-Forwarded-For format.
emit_timeStringTime the operation was recorded, in RFC 3339 format.
log_idStringUnique identifier of the log entry.
async_operation_idStringRequest or async operation identifier for correlation.
statusStringOutcome of the API call, such as OK or ERROR.
versionIntegerInternal version of the log entry.

How to interpret the status​

For supported Control Plane operations, the status field describes the outcome of the Temporal Cloud API call:

  • OK: The API call returned successfully.
  • ERROR: The API call returned an error. This includes authorization failures, such as when the authenticated principal does not have permission to perform the operation.

Audit logs do not capture authentication failures.

For an asynchronous operation, OK means that Temporal Cloud accepted the API call. The operation can fail after the audit log event is emitted, and the event is not updated with the final outcome. Use GetAsyncOperation to check the operation state and failure reason.

The async_operation_id field can contain a request identifier or an async operation identifier. Its presence does not indicate that the API call started an asynchronous operation.

Note

The X-Forwarded-For format is a comma-separated list of IP addresses which should be evaluated from the last to the first, until meeting the first untrusted IP address of the list. This allows for instance to consider proxies in the path.

Temporal provides the caller IP address in that format to allow customers to identify a caller IP address even if one (or more proxies) are in the network path to reach Temporal Cloud.

Example of an audit log​

The following example shows one JSON event delivered to an AWS Kinesis or GCP Pub/Sub sink. It uses snake_case field names and an RFC 3339 timestamp.

{
"emit_time": "2025-10-02T20:23:37.048Z",
"operation": "UserLogin",
"status": "OK",
"version": 2,
"log_id": "edb3aa3e-78c4-48fc-9c7e-2078c6989775",
"principal": {
"type": "user",
"name": "user@example.com"
},
"x_forwarded_for": "10.1.2.3"
}

How to configure an audit log integration​

Audit Logs can be configured in AWS Kinesis or GCP Pub/Sub. All Azure audit events are included in existing Audit Logs, including AWS Kinesis and GCP Pub/Sub sinks. An Azure-native streaming sink is not available during the Azure public preview.

How to troubleshoot an audit log sink​

The Audit Logs page of the Temporal Cloud UI provides the current status of an Audit Log Integration.

  • If an error is detected, a summary of the error appears below the page title.
  • If the Audit Log Integration is functioning normally, an On badge appears next to the page heading.

After an Admin Operation is performed, users can see Audit Log messages flow through the stream.

Upon successful configuration of the Audit Log sink and set up of a stream, you will receive events within the hour of setup. Temporal is able to retain Audit Log information for up to 30 days. To retrieve logs up to the past 30 days, you will need to file a request.

If you experience an issue with an Audit Log sink, we can provide the missing audit information. Open a support ticket to request assistance.

How to delete an audit log sink​

To delete an Audit Log sink, follow these steps:

  1. In the Temporal Cloud UI, select Settings.
  2. On the Settings page, select Audit Logs.
  3. In the Audit Logs Integration card, select Edit.
  4. At the bottom of the Audit Logs Integration page, choose Delete.

After you confirm the deletion, the Audit Log Sink is removed from your account and logs stop flowing to your stream.

View an audit log​

An Audit Log can be viewed in the Temporal Cloud UI.

  1. In the Temporal Cloud UI, select Settings.
  2. On the Settings page, select Audit Logs.

Up to 1,000 events can be downloaded from the Audit Log UI to a local JSON file. The download contains an array with camelCase field names and emitTime objects containing seconds and nanos. See Audit log format to compare the download with sink delivery and Cloud Ops API responses.

Access an audit log via API​

An Audit Log can be accessed using the Temporal Cloud Ops API. Use the API to access an Audit Log if you wish to make dashboards for viewing an Audit Log outside of Temporal Cloud. If your goal is to export an Audit Log, it is better to use an Audit Log sink and capture each entry as it is generated.

The gRPC API returns protobuf messages, and the HTTP API returns JSON with camelCase field names. See Audit log format for the differences between these representations.

Audit Logs are accessible for the past 30 days using the API.

The API allows:

  • StartTimeInclusive: Filter for UTC time >= (defaults to 30 days ago) - optional
  • EndTimeExclusive: Filter for UTC time < (defaults to current time) - optional
  • PageSize: Cannot exceed 1000. Defaults to 100. - optional
  • PageToken: The page token if this is continuing from another response - optional