Key takeaway
HIPAA requires audit controls, mechanisms that record and examine activity in systems containing ePHI (45 CFR 164.312(b)), and regular review of information system activity such as audit logs and access reports (164.308(a)(1)(ii)(D)). The rule does not prescribe log fields or a log retention period. Applications should log access events with identifiers rather than PHI payloads, protect logs from tampering and set retention through policy and risk analysis.
Last reviewed November 17, 2026
Regulatory basis for audit logging
Audit controls (164.312(b)) is a Required standard with no implementation specifications. It requires hardware, software or procedural mechanisms that record and examine activity in information systems that contain or use ePHI. The design is left to the regulated entity.
Information system activity review (164.308(a)(1)(ii)(D)) is a Required administrative specification: procedures to regularly review records of information system activity, such as audit logs, access reports and security incident tracking reports. Log-in monitoring (164.308(a)(5)(ii)(C)) is Addressable and covers monitoring log-in attempts and reporting discrepancies.
Audit logs are distinct from the Privacy Rule's accounting of disclosures under 164.528, which is a patient right with its own content and six-year lookback. Good audit data can help support it, but the two are not the same thing.
What to log
A useful audit event answers who did what, to which record, when, from where and with what result. Use stable identifiers so events can be correlated without copying clinical content into the log.
- Authentication events: logins, failures, MFA challenges, lockouts, password and factor changes.
- PHI access: record views, searches, list queries, exports, downloads and prints.
- Changes: creation, modification and deletion of clinical and demographic data.
- Administrative actions: role changes, permission grants, configuration changes, key usage.
- Emergency access invocations and their justifications.
- Integration activity: API client calls, bulk exports and interface messages.
| Field | Example | Purpose |
|---|---|---|
| Actor | User ID, service ID, role, tenant | Ties activity to a unique identity, supporting 164.312(a)(2)(i). |
| Action | read, create, update, delete, export, print, share | Distinguishes viewing from changing or exporting data. |
| Resource | Resource type and internal record ID or patient ID | Shows which record was touched without storing its content. |
| Timestamp | UTC timestamp from a synchronized clock | Enables reconstruction of sequences across systems. |
| Source | IP address, device ID, client application ID | Supports anomaly detection and investigations. |
| Outcome | success, denied, error | Captures failed access attempts and authorization denials. |
| Context | Break-glass flag, reason code, correlation ID | Highlights emergency access and links related events. |
What not to log
Application and debug logs are among the most common places PHI leaks. Request bodies, error messages with record content, and verbose ORM logging can copy names, diagnoses and identifiers into systems that lack the same protection as the primary database, and into vendors that have not signed a BAA.
- No PHI payloads: clinical notes, results, diagnoses, medications or full request and response bodies.
- No direct identifiers in free text: names, dates of birth, addresses, SSNs, MRNs in messages.
- No secrets: passwords, access tokens, refresh tokens, API keys or session cookies.
- No search terms that reveal a condition when typed by a user, unless the store is protected as ePHI.
- Use allowlists for logged fields rather than blocklists, and redact at the logging library.
Tamper-evident storage and integrity
Audit logs are only useful if people under investigation cannot alter them. Separate audit storage from the application database, restrict write access to an append-only path and restrict read access to security and compliance roles.
Common techniques include write-once object storage with retention locks, hash chaining of log batches, signed log digests, and forwarding to a separate account or SIEM controlled by a different team. Time synchronization across systems matters for investigations.
Retention and review
HIPAA's six-year retention requirement in 164.316(b)(2)(i) applies to required documentation, such as policies, procedures and records of required actions, activities and assessments. It runs from the date of creation or the date last in effect, whichever is later. The rule does not set a specific retention period for raw audit logs.
Audit log retention should be set by policy and the risk analysis, considering investigation needs, state law, contractual commitments, litigation holds and the accounting-of-disclosures lookback. Many organizations choose to retain audit logs, or summaries of them, for six years for consistency. Store review records, such as reports, findings and follow-ups, as documentation subject to the six-year rule.
- 1
Define review cadence
Set how often logs and access reports are reviewed, by whom, and what triggers ad hoc review.
- 2
Automate detection
Alert on patterns such as access to a VIP or employee record, mass record views, after-hours exports and repeated denials.
- 3
Review break-glass events
Route every emergency access event to a reviewer queue.
- 4
Document results
Record each review, its findings and follow-up actions as retained documentation.
- 5
Feed risk management
Use review findings to update the risk analysis and controls.
Required, recommended, optional and organizational
HIPAA requirement
What the rules themselves require
- Audit controls that record and examine activity in ePHI systems, 164.312(b).
- Regular information system activity review, 164.308(a)(1)(ii)(D).
- Assessment of log-in monitoring, 164.308(a)(5)(ii)(C), Addressable.
- Six-year retention of required documentation, including review records, 164.316(b)(2)(i).
Recommended practice
Widely accepted security practice
- Structured audit schema with actor, action, resource, time, source and outcome.
- PHI-free application logs enforced by allowlisted fields and redaction.
- Append-only, access-restricted audit storage in a separate account.
- Automated alerting integrated with incident response.
- Synchronized time sources across services.
Architecture decision
Depends on your product and risk analysis
- Hash-chained or signed audit batches for stronger tamper evidence.
- Patient-facing access history in portals.
- Customer-exportable audit logs for enterprise tenants.
- User behavior analytics for anomaly detection.
Your organization's responsibility
Policies and operations software cannot do
- Retention policy for audit logs set through risk analysis and legal review.
- Named reviewers, review cadence and escalation paths.
- Investigation and sanctions processes for inappropriate access.
- BAAs with any logging or SIEM vendor that may receive ePHI.
Audit logging architecture
A practical architecture separates two streams. Audit events, which record ePHI access and administrative actions, go to a protected, append-only store with long retention. Operational logs, used for debugging and performance, stay PHI-free and have shorter retention.
Emitting audit events from a shared middleware or data access layer, rather than from individual handlers, makes coverage consistent. Correlation IDs connect an audit event to the operational traces of the same request without copying data between the streams.
- 1
Define the schema
Agree on a versioned audit event schema and required fields.
- 2
Emit centrally
Generate events in middleware or the data access layer so every path is covered.
- 3
Transport reliably
Use a durable queue so audit events are not lost when a service fails.
- 4
Store immutably
Write to an append-only store in a separate account with restricted access.
- 5
Index for investigation
Make events searchable by user, patient, time range and action.
How we help
We design audit event schemas, build PHI-safe logging pipelines with redaction, configure tamper-evident storage and set up alerting that supports your review procedures. Retention decisions, review staffing and sanctions remain with your organization.
Frequently Asked Questions
Does HIPAA require audit logs?
Yes. Audit controls under 164.312(b) are Required, and 164.308(a)(1)(ii)(D) requires regular review of information system activity such as audit logs and access reports. The rule does not prescribe specific fields or tools.
How long must HIPAA audit logs be retained?
HIPAA's six-year retention rule in 164.316(b)(2) applies to required documentation. It does not set a specific period for raw audit logs, so retention should be set by policy and risk analysis; many organizations choose six years for consistency.
Can logs contain PHI?
They can, but then the log store must be protected as an ePHI system with access control, encryption and BAA coverage for any vendor. The better practice is to log identifiers rather than PHI payloads.
What should a HIPAA audit log entry include?
Typically the actor, action, resource identifier, timestamp, source and outcome, plus context such as a break-glass flag. Together these show who accessed which record, when and how.
Do read events need to be logged?
Logging reads is widely regarded as essential, because inappropriate viewing is a common privacy incident. Without read events, it is difficult to investigate snooping or support access reviews.
Can we send logs to a third-party logging service?
Yes, if the service either receives no ePHI or signs a BAA and is configured appropriately. Error tracking and log analytics tools frequently capture request data by default, so verify their configuration.
How often should audit logs be reviewed?
HIPAA requires regular review but does not set a frequency. Organizations combine automated alerting for high-risk events with scheduled reviews whose cadence is set by policy.