HIPAA compliance is not a feature you add before launch — it is an architecture you commit to from the first schema. Healthtech teams that treat it as a checklist to satisfy at the end end up re-platforming, because the cheap mistakes (PHI in logs, shared databases, no audit trail) are baked into the foundation. Here are the patterns that genuinely hold up when an auditor or a breach tests them, framed for engineers building software that touches protected health information (PHI).
Start with a signed BAA and a clear PHI boundary
Every vendor that stores, processes, or transmits PHI on your behalf must sign a Business Associate Agreement — your cloud provider, your logging service, your email sender, your analytics. If a service touches PHI without a BAA, you are non-compliant by definition, regardless of how good your code is. Equally important: draw an explicit boundary around where PHI lives. The fewer systems inside that boundary, the smaller your audit scope and your breach surface.
Encryption everywhere — and key management that proves it
Encrypt PHI at rest (database, object storage, backups, snapshots) and in transit (TLS 1.2+ on every hop, including service-to-service inside the VPC). That part is table stakes. The part that fails audits is key management: keys in a managed KMS with rotation, access to the keys logged and least-privilege, and no plaintext PHI in places encryption doesn't reach — caches, message queues, search indexes, and especially logs.
Access control: least privilege, enforced server-side
- Role-based access tied to job function, reviewed on a defined cadence, with onboarding/offboarding automated so access dies with the account.
- Enforcement server-side, never in the client. A hidden UI button is not access control.
- Break-glass access for emergencies that is logged, alerted, and reviewed after the fact.
- Unique user identity for every human and every service — no shared accounts, ever, because shared accounts destroy your audit trail.
Audit logging is the control auditors actually test
HIPAA requires that you can answer 'who accessed which patient's PHI, when, and what did they do.' That means an immutable, tamper-evident audit log capturing every read and write of PHI — append-only storage, separate from application logs, retained per your policy (typically six years). Crucially, the audit log itself must contain no PHI in a way that widens exposure, and it must be queryable, because the first thing a breach investigation needs is that trail.
Isolate PHI and minimize what you keep
Separate PHI from non-PHI at the data layer — a dedicated, tightly-scoped datastore beats PHI sprinkled across every table. Tokenize or pseudonymize where the full record isn't needed (analytics, non-clinical features). Apply data minimization: don't collect or retain PHI you don't need, and define retention and secure-deletion policies. The PHI you never stored can never be breached, and the PHI you isolated keeps your audit scope small.
Patterns that quietly cause breaches
- PHI in application logs or error trackers (Sentry, CloudWatch) — the single most common real-world HIPAA leak.
- Non-production environments seeded with real patient data instead of synthetic data.
- Third-party scripts or analytics on pages that render PHI, shipping it to vendors with no BAA.
- Backups and database snapshots that are encrypted but world-readable to too-broad IAM roles.
How Infiniti Tech Partners builds healthtech
We architect PHI boundaries, encryption, access control, and audit logging in from the first commit, deploy into BAA-covered infrastructure in your own accounts, and hand over the documentation an auditor will ask for — not a binder written after the fact. If you're building healthtech and want the compliance baked into the architecture rather than bolted on before launch, start a conversation.
Frequently asked questions
Is HIPAA compliance about architecture or paperwork?
HIPAA compliance is not a feature you add before launch — it is an architecture you commit to from the first schema. Teams that treat it as an end-stage checklist end up re-platforming, because the cheap mistakes like PHI in logs, shared databases, and no audit trail get baked into the foundation. The patterns that hold up under an auditor or a breach — encryption with real key management, server-side access control, immutable audit logging, and PHI isolation — have to be designed in from the first commit.
What audit logging does HIPAA require?
HIPAA requires that you can answer who accessed which patient's PHI, when, and what they did. That means an immutable, tamper-evident audit log capturing every read and write of PHI — append-only storage, separate from application logs, and retained per policy, typically six years. The audit log is the control auditors actually test, it must itself avoid widening PHI exposure, and it must be queryable because a breach investigation needs that trail first.
What are the most common HIPAA architecture mistakes?
The single most common real-world HIPAA leak is PHI in application logs or error trackers like Sentry and CloudWatch. Other quiet breach-causers include seeding non-production environments with real patient data instead of synthetic data, running third-party scripts or analytics on pages that render PHI and ship it to vendors with no BAA, and backups or database snapshots that are encrypted but readable by too-broad IAM roles. Any vendor that stores, processes, or transmits PHI must sign a Business Associate Agreement, or you are non-compliant by definition regardless of code quality.
Related reading
API Security: Defending Against the OWASP API Top 10
The real-world API attacks that breach growth-stage SaaS — broken object-level authorization, broken authentication, excessive data exposure, and unrestricted resource consumption — and the concrete defenses for each.
SecurityPasswordless Authentication and Passkeys: A SaaS Migration Guide
Why growth-stage SaaS is moving to passkeys and passwordless auth — how WebAuthn works, what it kills (phishing, credential stuffing, password resets), and how to migrate without locking users out.
SecuritySoftware Supply Chain Security: SBOMs, Signing, and Locking Down Your Pipeline
How growth-stage SaaS can secure the software supply chain — dependency risk, SBOMs, artifact signing, SLSA provenance, and hardening CI/CD against the attacks that hit your build, not your app.