Skip to content

feat: add audit logging semantic conventions (OTEP 0267)#7

Open
hilmarf wants to merge 10 commits into
mainfrom
auditing
Open

feat: add audit logging semantic conventions (OTEP 0267)#7
hilmarf wants to merge 10 commits into
mainfrom
auditing

Conversation

@hilmarf

@hilmarf hilmarf commented Jun 3, 2026

Copy link
Copy Markdown
Member

Project Proposal: Audit Logging SIG #2409

Summary

  • Introduces a new audit.* attribute namespace implementing the OTEP 0267 Audit Logging signal design
  • Adds model YAML files (registry.yaml, logs.yaml) defining all attribute groups with stability markers and requirement levels
  • Adds documentation page (docs/audit/audit-logs.md) covering motivation, signal separation, attribute tables, SDK invariants, compliance mapping, and worked examples
  • Adds registry attribute reference page (docs/registry/attributes/audit.md)

Motivation

Compliance frameworks (ISO 27001, SOC 2, PCI-DSS, HIPAA) require that security-relevant events are captured completely, without loss, and in a tamper-evident form. The standard OTel Log signal allows sampling, back-pressure shedding, and record transformation — all incompatible with these requirements. This PR establishes the semantic conventions layer for the dedicated audit signal.

Attribute groups

Group Key attributes
audit.record audit.record.id (auto-generated UUID v4), audit.schema.version
audit.actor audit.actor.id ✱, audit.actor.type ✱ (user/service/system), audit.actor.name
audit.action audit.action ✱, audit.outcome ✱ (success/failure/unknown)
audit.target audit.target.id, audit.target.type, audit.target.name
audit.source audit.source.id, audit.source.type
audit.integrity audit.integrity.value (Base64url MAC/sig), audit.integrity.algorithm (JWA/IANA id), audit.integrity.certificate
audit.sequence audit.sequence.number (monotonic counter), audit.prev.hash (SHA-256 hash-chain)

✱ mandatory on every audit record

Compliance mapping

Requirement Covered by
ISO 27001 A.8.15 — Logging Mandatory attributes + integrity triplet
ISO 27001 A.8.17 — Clock sync SDK clock-skew warning documented
SOC 2 CC7.2 — Anomaly detection audit.records.dropped metric + alert invariant
PCI-DSS Req. 10.2 — Audit trails All required fields; audit.source.id for IP capture
PCI-DSS Req. 10.5 — Log protection audit.integrity.value + audit.prev.hash hash chain
HIPAA § 164.312(b) — Audit controls audit.actor.* + audit.target.* for ePHI access logging

Test plan

  • Verify YAML parses cleanly with the Weaver toolchain (make build)
  • Confirm model/audit/logs.yaml ref: entries resolve against model/audit/registry.yaml
  • Review attribute naming against naming conventions
  • Review SDK invariants section in docs/audit/audit-logs.md against OTEP 0267
  • Check compliance mapping table for accuracy against framework requirements
  • Verify both JSON examples in the docs are well-formed and consistent with the attribute definitions

@hilmarf hilmarf moved this from Backlog to In progress in OTel-Audit-Logging Jun 3, 2026
@hilmarf hilmarf added the do-not-merge Do not merge this PR yet! label Jun 3, 2026
@hilmarf
hilmarf requested a review from MJarmo June 3, 2026 09:06
@hilmarf
hilmarf force-pushed the auditing branch 4 times, most recently from 555387c to 2c9f015 Compare June 3, 2026 10:11
hilmarf added 10 commits June 3, 2026 12:14
Introduces a new `audit.*` attribute namespace and accompanying
documentation for the OpenTelemetry Audit Logging signal.

The audit signal is a dedicated, lossless pipeline separate from the
standard log/observability pipeline, required by compliance frameworks
such as ISO 27001, SOC 2, PCI-DSS, and HIPAA.

Files added:
- model/audit/registry.yaml   — all audit.* attribute definitions
- model/audit/logs.yaml       — audit.record attribute group with
                                requirement levels
- docs/audit/audit-logs.md    — full documentation page incl. examples,
                                SDK invariants, and compliance mapping
- docs/registry/attributes/audit.md — registry attribute reference page

Attribute groups defined:
  audit.record   (record.id, schema.version)
  audit.actor    (actor.id, actor.type, actor.name)
  audit.action   (action, outcome)
  audit.target   (target.id, target.type, target.name)
  audit.source   (source.id, source.type)
  audit.integrity (integrity.value, integrity.algorithm, integrity.certificate)
  audit.sequence (sequence.number, prev.hash)

Signed-off-by: Hilmar Falkenberg <hilmar.falkenberg@sap.com>
Both audit.integrity.algorithm and audit.integrity.certificate are
constants for the lifetime of a service instance — a resource uses one
signing key throughout its life. Clarify in registry note, logs.yaml
requirement level (conditionally_required as Resource attr), registry
reference doc, and audit-logs.md integrity section + attribute table.

Signed-off-by: Hilmar Falkenberg <hilmar.falkenberg@sap.com>
Signed-off-by: Hilmar Falkenberg <hilmar.falkenberg@sap.com>
Signed-off-by: Hilmar Falkenberg <hilmar.falkenberg@sap.com>
Signed-off-by: Hilmar Falkenberg <hilmar.falkenberg@sap.com>
…nventions

audit.prev.hash violated the dot-namespacing rule: 'prev' is not a
standalone object namespace, it is a property qualifier for 'hash'.
Moving it under audit.sequence.* groups it with audit.sequence.number
where the rest of the hash-chain mechanics live, consistent with the
{object}.{property} pattern (e.g. http.response.status_code).

Signed-off-by: Hilmar Falkenberg <hilmar.falkenberg@sap.com>
Signed-off-by: Hilmar Falkenberg <hilmar.falkenberg@sap.com>
Signed-off-by: Hilmar Falkenberg <hilmar.falkenberg@sap.com>
Signed-off-by: Hilmar Falkenberg <hilmar.falkenberg@sap.com>
Signed-off-by: Hilmar Falkenberg <hilmar.falkenberg@sap.com>
@hilmarf hilmarf moved this from In progress to In review in OTel-Audit-Logging Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge Do not merge this PR yet!

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

1 participant