Skip to main content

Audit Log Schema

Golf Gateway generates structured audit logs for all MCP traffic, authentication events, and security analysis. This reference documents the complete schema used for audit log entries.

Quick Reference


Schema Overview

Each audit log entry is a JSON object. The sections below document each field category in detail.

Core Fields

These fields are present on every audit log entry.

Event Types

Component Values


Session and Identity


Integrity Fields

These fields provide tamper-proof audit logging through cryptographic hash chaining.
The integrity chain allows verification that no log entries have been modified or deleted. Configure the hash key with GOLF_SECURITY_INTEGRITY_KEY.

Client Info

Information about the MCP client, extracted from the initialize request. Example:

Authentication

Authentication and authorization results. Example:

Security

Access control, rate limiting, replay protection, and PII scrubbing results.

PII Scrubbing Fields

Example (request blocked by rate limit):
Example (PII scrubbed):

Request

Request context information.

Upstream

Information about the upstream MCP server. Example:

User

User identity information.
For privacy compliance, user.email is hashed and user.name is removed before export to external systems.

MCP Protocol Fields

Extracted Fields

These fields are extracted from MCP messages for efficient querying and aggregation.

Raw Payloads

Token Estimates

Error Detection


Elicitation Fields

Fields for server-initiated user input requests (MCP elicitation).

Session Statistics

Aggregate session statistics (for monitoring events).

Internal Fields

These fields are present in audit log entries for internal processing but are excluded from external exports and the GraphQL API.
These fields are for internal use only. They are not exposed through the GraphQL API and are excluded from export payloads to external systems (Elasticsearch, OpenTelemetry, Sentinel).

Complete Example

MCP Request Event:
Security Blocked Event:

Export Destinations

Audit logs are exported to configured destinations with automatic schema mapping:
Each destination applies field-specific transformations. For example, Elasticsearch uses daily indices while Sentinel transforms fields to PascalCase for KQL compatibility.

Environment Variables

Configure Golf Gateway using environment variables

YAML Configuration

Distributed mode configuration for GitOps deployments

Export to Elasticsearch

Set up audit log export to Elasticsearch

Export to Sentinel

Set up audit log export to Microsoft Sentinel