# Story 4.11: Audit Integrity (HMAC/Signature)

## Status

Superseded

## Superseded By

This story has been superseded by the enterprise `fapilog-tamper` plugin:
- **Stories 4.14–4.18**: Enterprise tamper-evident plugin with full HMAC/signature support

## Original Story

**As a** compliance auditor,
**I want** optional HMAC/signature support for audit logs in core,
**so that** I can verify tamper-evidence without heavy dependencies; advanced key management lives in enterprise extras.

## Resolution

After architectural review, we decided to:

1. **Keep core lightweight**: No tamper-evident features in core fapilog. Core focuses on logging fundamentals.

2. **Enterprise plugin**: All tamper-evident functionality lives in the `fapilog-tamper` package (Stories 4.14–4.18):
   - Hash chains with sequence numbers
   - HMAC-SHA256 and Ed25519 signatures
   - Key management (env, file, KMS, Vault)
   - Signed manifests on file rotation
   - Verification API and CLI

3. **Plugin integration**: Core provides the `IntegrityPlugin` protocol hook in `src/fapilog/plugins/integrity.py` that the enterprise plugin uses.

## Migrated Acceptance Criteria

| Original AC | New Location |
|-------------|--------------|
| Config-driven integrity | Story 4.14 `TamperConfig` |
| HMAC-SHA256 signing | Story 4.15 `IntegrityEnricher` |
| Key from env/file | Story 4.15 key loading |
| Verification utility | Story 4.17 `Verifier` |
| KMS/Vault support | Story 4.18 `KeyProvider` |

## Change Log

| Date | Version | Description | Author |
| ---- | ------- | ----------- | ------ |
| 2025-08-11 | 0.1 | Draft story created | QA Agent |
| 2025-12-29 | 0.2 | Marked superseded; migrated to plugin stories | AI Agent |


