Compliance · 11 min read · Oct 12, 2026

Reading 45 CFR 164.312 Like a Design Document: HIPAA Technical Safeguards for Engineers

The five HIPAA technical safeguard standards mapped to concrete engineering decisions: identity, logging, integrity, authentication and encryption.

The technical safeguards section of the HIPAA Security Rule is short enough to read in five minutes and vague enough to argue about for a year. It names outcomes and leaves the technology to you. The way to make it useful is to treat it as a requirements document: five standards, each of which turns into a small set of architecture decisions that you make once, write down, and can defend later.

This article is general information for engineering teams, not legal advice. Your organization's risk analysis and your counsel govern the specifics.

How the rule is put together

A few structural points remove most of the confusion.

It covers electronic protected health information. The Security Rule is about ePHI: individually identifiable health information that is created, received, maintained or transmitted in electronic form. If your system stores or moves it, the rule is talking about your system.

It applies to covered entities and to business associates. Health plans, clearinghouses and most providers are covered entities. A vendor that handles ePHI on their behalf, such as a software company hosting a patient portal, is a business associate and is directly responsible for complying with the Security Rule, not only bound by contract.

Standards and implementation specifications are different things. A standard states what must be achieved. Some standards come with implementation specifications, which are more specific instructions. Two of the five technical standards have none at all.

Specifications are either required or addressable. Required means implement it. Addressable is the word that causes trouble, because it sounds like optional. It is not. For an addressable specification you must assess whether it is reasonable and appropriate in your environment. If it is, implement it. If it is not, document why and implement an equivalent alternative where that is reasonable. Silence is not one of the choices.

The rule is deliberately technology neutral and scalable. It has to fit a solo practice and a national insurer. So it lets you weigh your size, complexity, technical capabilities, costs and the likelihood and severity of risks. That flexibility is why the risk analysis matters so much: it is the document that justifies each choice.

The whole section on one page

CitationStandardImplementation specificationsStatus
164.312(a)Access controlUnique user identificationRequired
Emergency access procedureRequired
Automatic logoffAddressable
Encryption and decryptionAddressable
164.312(b)Audit controlsNone listedStandard is required
164.312(c)IntegrityMechanism to authenticate ePHIAddressable
164.312(d)Person or entity authenticationNone listedStandard is required
164.312(e)Transmission securityIntegrity controlsAddressable
EncryptionAddressable

Note what the table says about encryption. Both encryption specifications, at rest under access control and in transit under transmission security, are addressable. In practice it is very hard to write a credible justification for leaving ePHI unencrypted on modern infrastructure, where encryption is a configuration setting. Treat both as things you will do.

Access control: 164.312(a)

The standard asks for technical policies and procedures that allow access only to the persons or software programs that have been granted access rights.

Unique user identification (required). Every user gets an identifier that is theirs alone. This is the foundation for everything else, because audit logs are only meaningful if an action maps to a person. The usual violations are not in the application. They are around it:

  • A shared admin login on the database.
  • One cloud console account used by the whole team.
  • A service account whose credentials three engineers use to run ad hoc queries.
  • A support tool where agents share a login.

The engineering fix is to federate everything to one identity provider, give humans individual identities everywhere including the database layer, and reserve service accounts for services. Where a human must act through a service identity, record which human.

Unique identity is necessary and not sufficient. The standard is about granted rights, so pair it with role-based access and least privilege: a billing clerk does not need clinical notes, and an engineer does not need standing read access to production data.

Emergency access procedure (required). You need a documented way to obtain necessary ePHI during an emergency. People read this as disaster recovery, and it partly is. It also covers the case where normal authentication is unavailable and care or operations still need the data. The pattern that works is "break glass": a sealed, highly privileged path that requires a stated reason, alerts security the moment it is used, expires quickly and is reviewed afterward. An envelope holding one common credential, kept in a desk for bad days, technically counts as a procedure, yet it throws away unique identification at the exact moment you need it most.

Automatic logoff (addressable). Sessions end after a period of inactivity. Apply it to every interface that reaches ePHI, not only the web application: admin consoles, database clients, remote desktop sessions, internal tools and mobile apps. Choose timeouts by context. A workstation in a shared clinical area warrants a much shorter timeout than a locked office.

Encryption and decryption (addressable). This is encryption at rest: databases, object storage, file systems, backups, snapshots, laptops and removable media. The design questions are about keys more than algorithms. Who can use the keys? Are they separated from the data? Are they rotated? Is use of the key logged? Encryption where every workload and every engineer can decrypt everything protects against a stolen disk and little else. For the most sensitive fields, consider application-level encryption so that database access alone does not reveal them.

Audit controls: 164.312(b)

The standard requires hardware, software or procedural mechanisms that record and examine activity in systems that contain or use ePHI. It does not say which events, in what format or for how long. Your risk analysis decides.

A defensible baseline records, for each access to a patient record:

  • Who (the unique identity, and the service on whose behalf if relevant)
  • What (which record, which patient, which fields or document)
  • Which action (viewed, created, changed, exported, deleted, printed)
  • When, and from where (timestamp, source address, device or session)
  • The outcome (allowed or denied)

Three mistakes account for most weak implementations.

Logging writes and not reads. In healthcare the most common misuse is looking at a record without a reason: a neighbor, a celebrity, a family member. If reads are not logged, that event is invisible.

Logs that the people being logged can change. An administrator who can edit the audit trail has no audit trail. Ship logs to storage with separate access, write-once retention where available, and alert on gaps.

Logs nobody examines. The standard says record and examine. A related administrative requirement calls for regular review of information system activity. Build queries that answer real questions ("who viewed this patient in the last 90 days?", "which user viewed far more records than their peers?") and make someone responsible for running them.

Retention is not specified for audit logs in this section. The Security Rule does require that documentation of policies and required actions be kept for six years, and many organizations align log retention with that. Decide a period, write down the reason, and check state law and contracts.

One caution that pairs with this section: the audit log should identify the record, and should not copy the record. Dumping full payloads into logs creates a second, less protected store of ePHI.

Timing drives the cost of this control more than anything else. Added early, it is a single layer that every read and write passes through. Added late, it means hunting down every query, report, export and background job that touches patient data.

Integrity: 164.312(c)

The standard is to protect ePHI from improper alteration or destruction. The addressable specification asks for electronic mechanisms to corroborate that ePHI has not been altered or destroyed in an unauthorized manner.

This is a familiar engineering problem with familiar tools:

  • Versioned records. A correction creates a new version, and the prior version remains retrievable with its author and time. Clinical data should almost never be overwritten in place.
  • Database constraints and transactions, so partial writes and orphaned references cannot corrupt a chart.
  • Checksums or digital signatures on stored documents, images and files, verified on read or on a schedule.
  • Soft deletion with restricted hard deletion, plus logging of every delete.
  • Backups with verified restores. Integrity includes being able to get the correct data back. A backup that has not been restored in a test is an assumption.
  • Controls on bulk operations. Migrations and batch updates are where large-scale accidental alteration happens. Require review and a rollback plan.

Person or entity authentication: 164.312(d)

The standard requires procedures to verify that a person or entity seeking access to ePHI is the one claimed. It names no method. The current text does not use the phrase multi-factor authentication.

That said, a password alone is hard to defend for any system holding health data today, and regulators have signaled the direction clearly (see the note on proposed changes below). The practical baseline is multi-factor authentication for every human path to ePHI, with phishing-resistant methods for privileged access.

"Entity" matters as much as "person". Services, devices and partner systems authenticate too. Use mutual TLS, signed tokens with short lifetimes or managed workload identity, not long-lived static keys in configuration files.

The gap is usually around the application, not in it. Walk the full list of ways to reach the data:

  • The cloud provider console and its API keys
  • Direct database access and read replicas
  • The CI/CD system, which can deploy code that reads anything
  • Backup storage and the tools that restore from it
  • Remote access paths, VPNs and bastion hosts
  • Support and analytics tools that sit beside the product
  • Vendor access for maintenance

Each needs individual identity and strong authentication, because each is a route to the same records.

Transmission security: 164.312(e)

The standard is to guard against unauthorized access to ePHI while it is being transmitted over an electronic communications network. Both specifications, integrity controls and encryption, are addressable.

TLS between the browser and your application is the easy part. Modern TLS provides both confidentiality and integrity in transit. The misses are elsewhere:

  • Internal traffic. Service to service, application to database, and data center to data center links should be encrypted too. "It is inside our network" is not a boundary anyone should rely on.
  • Backups, exports and replication. Data leaving for another region, a warehouse or a partner needs encryption on the wire and at the destination.
  • Email and messaging. Still a common way ePHI leaves an organization unprotected. Standard email is not reliably encrypted end to end. Use a secure portal or enforced encryption.
  • File transfers to partners. Replace plain FTP and ad hoc shares with authenticated, encrypted transfer and expiring links.
  • Mobile and device traffic, including older integrations and medical device feeds that predate current protocols.

Where ePHI escapes in a modern stack

The regulation was written before most current tooling existed. These are the places where a well-built application still leaks:

  • Observability. Error trackers capture request bodies and stack traces. Log aggregators receive full payloads. Session replay tools record the screen. If a patient record lands in a service with no business associate agreement, you have made a disclosure. Scrub at the source, in the application, before data leaves.
  • Product analytics and advertising pixels. Scripts on authenticated pages, or on pages whose URLs reveal a condition or appointment, can send health-related information to third parties.
  • Lower environments. Production data copied to staging or a developer laptop carries all its obligations with it, usually into a place with none of the controls. Use synthetic or de-identified data.
  • AI services. A prompt containing patient details sent to a model API is a transmission to a vendor. It needs a business associate agreement, a clear position on retention and training use, and the same audit logging as any other access.
  • Caches, queues and search indexes. Secondary stores get populated automatically and forgotten in encryption and access reviews.

What this section does not cover

Passing a 164.312 review does not make a system compliant. The Security Rule groups its safeguards into three families, and this section is only the technical one. Documentation duties sit alongside them.

  • The administrative family (164.308) includes the risk analysis, risk management, workforce training, access authorization processes, incident response and contingency planning. The risk analysis is the foundation: it is what each of your technical choices is justified against, and its absence is a frequent finding in enforcement actions.
  • Physical safeguards (164.310) cover facility access, workstation use and security, and device and media controls, including disposal.
  • Documentation requirements (164.316) require written policies and procedures and retention of that documentation.

Two connected points are worth knowing.

The breach notification incentive. Breach notification obligations apply to unsecured PHI. PHI that is encrypted in line with the guidance issued by the Department of Health and Human Services, with the keys not compromised, is not considered unsecured. A lost encrypted laptop can therefore be a very different event from a lost unencrypted one. This is the strongest practical argument for treating encryption as mandatory.

The contract. Vendors carry these duties twice: once under the rule itself, and again under the business associate agreement they sign with each client. The agreement sets out permitted uses, reporting timelines and what happens to data at termination. Your subcontractors that touch ePHI need agreements too, which includes cloud providers and many of the tools listed in the previous section.

Proposed changes. The Department of Health and Human Services published a proposal to update the Security Rule that would, among other things, remove the required versus addressable distinction and make controls such as encryption and multi-factor authentication explicit. Check its current status before you finalize a design. Building to the stricter reading now is the low-regret choice either way.

A working checklist for the next architecture review

  • Every human has an individual identity on every system that reaches ePHI, including databases and cloud consoles.
  • Access is granted by role, with least privilege, and reviewed on a schedule.
  • A break-glass procedure exists, alerts on use and is reviewed after use.
  • Inactivity timeouts apply to all interfaces, with documented values.
  • ePHI is encrypted at rest everywhere, including backups, snapshots and endpoints, with managed and logged keys.
  • Reads and writes of patient records are logged with who, what, when, where and outcome.
  • Audit logs are tamper resistant, retained for a defined period and actually reviewed.
  • Records are versioned, deletes are controlled, and restores are tested.
  • Multi-factor authentication covers every path to production, and services authenticate with short-lived credentials.
  • All transmission is encrypted, internal traffic included, and email and file exchange have a secure path.
  • Logs, error trackers, analytics and AI services have been checked for ePHI, and each such vendor has a signed agreement.
  • Non-production environments contain no real patient data.
  • Every addressable specification has a written decision.
  • A current risk analysis exists and references these controls.

Which of these controls is designed into your system, and which is waiting to be bolted on after the first audit?

Retrofitting identity and audit logging is far more expensive than designing them in, so the right time to ask is before the architecture hardens. Trivo builds software for regulated environments with these safeguards as requirements from the first sprint. Bring your system and its data flows, and you will get a plain account of the controls already in place, the ones still missing and the design changes each missing one would require.

Book your Two-Week Discovery

Share this article

Keep reading