Blog Technical content

Security audit log fields that answer investigation questions

A practical event worksheet for documenting audit logs without collecting unnecessary sensitive data.

AI-assisted article. Sources and examples follow our editorial policy.

Security audit log fields that answer investigation questions, Infosec Writing Studio article image

An audit event says “API key updated.” During an investigation, that message leaves almost everything unresolved. Who requested the change? Which key changed? Did the caller have permission? Did the update succeed? Which workspace was affected?

Choose security audit log fields by starting with those questions. A large event payload is useful only when its fields have stable meanings and enough context to reconstruct the action. Collecting the full request can expose sensitive information without answering the questions an investigator actually asks.

The worksheet below uses a fictional permission change in a security platform. The event and identifiers are illustrative. They are not evidence from a real incident or a tested logging implementation.

Specify the action and its outcome

The fictional action is a request to add a permission to a service credential. There are at least three relevant states: the request arrived, the authorization decision allowed or denied it, and the system applied or failed to apply the change.

Those states should not collapse into an ambiguous “update” message. A permitted request can fail during storage. A denied request should never imply that permissions changed. An asynchronous system might record acceptance before the change completes.

The OWASP Logging Cheat Sheet recommends capturing context around when, where, who, and what, including action and result. Applying that guidance requires a domain-specific event vocabulary. The writer should ask engineering what each result actually guarantees.

For this example, credential.permission_change_applied means the persisted permission set changed. A separate denied event would describe an authorization rejection. The exact names are illustrative; the distinction is the useful part.

Map each field to an investigation question

QuestionIllustrative fieldMeaning and boundary
What happened?event_typeStable event name, not a free-text summary
When did it happen?occurred_atApplication event time with timezone convention
When was it collected?observed_atSeparate collection time for delayed delivery
Who acted?actor_id, actor_typeStable principal reference and principal category
In which tenant?workspace_idTenant boundary used for this operation
What changed?target_id, target_typeCredential reference without credential value
What was requested?requested_permissionPermission identifier with defined semantics
What was decided?authorization_resultAllowed or denied under the named decision model
What was applied?operation_resultCompleted, failed, or an explicit pending state
How can events be connected?interaction_idCorrelation reference across the request lifecycle
Which service recorded it?service, environmentEvent producer and deployment context
Why did it fail?reason_codeControlled category that avoids secret-bearing errors

This is a starting worksheet, not a required universal schema. Some systems need a delegating user, policy version, or source network context. Others cannot reliably supply those fields. Document availability and provenance instead of filling missing values with guesses.

The OWASP Logging Vocabulary Cheat Sheet offers a useful reference for consistent event terminology. Consistency lets analysts search related actions without remembering a different verb for every service.

Write a complete illustrative event story

In the fictional scenario, service principal example-automation-7 requests permission findings.export for credential example-key-23 in workspace example-workspace-4. The authorization service allows the request. The application commits the change and emits an applied event linked to interaction example-interaction-91.

The event stores credential identifiers, not credential material. Its action description refers to the permission added. If the product supports a readable before-and-after permission set, the documentation should explain whether both sets are recorded and whether they can be truncated.

An investigator can now connect the principal, target, tenant, and completed action. That still does not answer every question. To know whether the principal was compromised, they may need authentication events, credential issuance history, or evidence from another system. An audit record should not claim to explain intent.

This distinction is especially useful in non-human identity security, where an automated principal and the human responsible for its configuration are different actors.

Document delegation and identity carefully

If a human triggers an automation that uses a service account, record the identities according to what the system can verify. A supplied username in a request is not necessarily an authenticated initiating user. A service account name does not identify the person who approved its privileges.

A documented delegation chain should say which component established each identity and which links are unavailable. This helps readers interpret the event without treating display names as durable identifiers.

Related identity-security concepts give writers vocabulary for distinguishing a principal, credential, permission, and identity-management system. The event schema should preserve those distinctions even when the user interface uses friendlier labels.

Limit the data before it enters the log

Do not use “more context” as a reason to log passwords, tokens, or arbitrary request bodies. Review each field for investigative value, sensitivity, access restrictions, and retention. A controlled failure category can be more useful than a raw upstream error containing private data.

OWASP also discusses handling untrusted event data and preventing log injection. User-supplied text can contain line breaks or delimiters that confuse a log format. Structured output and proper handling of untrusted values should be verified in the implementation; merely calling a format JSON does not settle every downstream display or ingestion risk.

Consider who can read the event. A tenant administrator, a central security analyst, and a support engineer may need different views. A schema reference should explain redaction and field visibility where those affect interpretation.

Explain gaps and collection failures

An audit log is not automatically complete, immutable, or tamper-evident. Those are separate claims requiring evidence about collection, transport, storage, access, and integrity controls.

Describe how missing or delayed events become visible. If the application cannot write an audit event, does the sensitive operation fail, proceed with an alert, or use another recovery path? There is no universal answer for every action, but the chosen behavior needs an owner and a rationale.

A prepublication content review should check example events against actual emitted fields, including denied and failed operations. Label illustrative events as illustrative, and use captured, sanitized examples only when their provenance and disclosure are approved. Readers need to know whether an absent field means “not applicable,” “not collected,” or “unavailable in this view.”

Continue your research

Use the Reference Indexes for Definitions and Evergreen Guidance.

Editorial support

Need a Security Article Researched, Written, or Reviewed?