Health Data Privacy and HIPAA Questions
Protecting health and medical data under HIPAA and equivalent sector rules: PHI, the Privacy and Security Rules, covered entities and business associates, and permitted uses and disclosures. Covers de-identification standards and safeguards specific to healthcare data. Includes how health-data constraints shape system and product design.
Design a security architecture for a healthcare SaaS that must comply with HIPAA. Include data encryption at rest and in transit, key management, audit logging, least privilege, logging of PHI access, and breach response processes. Highlight architecture components that ensure compliance.
Sample Answer
Requirements & constraints:
- Store/process Protected Health Information (PHI) per HIPAA: confidentiality, integrity, availability
- Encrypt PHI at rest & in transit, strict access controls, immutable audit logs of PHI access, key management, incident/breach response, scalability
High-level architecture:
Client/browser/mobile → API Gateway/WAF → Authentication/Authorization layer → Application services (microservices) → Encrypted data stores (DB, object storage) + Key Management Service (KMS)/HSM → SIEM / Audit log store → Backup + DR
Key components and controls:
- Authentication & least privilege
- Centralized IdP (OIDC/SAML) with MFA, SCIM for provisioning
- RBAC + attribute-based access control (ABAC) for fine-grained policies (role, purpose, patient consent)
- Just-in-time privilege elevation and approval workflows for sensitive operations
- Service accounts use short-lived certs/tokens (OIDC tokens, mTLS for service-to-service)
- Encryption in transit & at rest
- TLS 1.2+ / TLS 1.3 with strong ciphers for all inbound/outbound traffic; HSTS, cert pinning for clients
- All PHI encrypted at rest using envelope encryption: data encrypted with per-record DEKs; DEKs encrypted by KMS-managed KEKs
- Use cloud KMS with an HSM-backed option (e.g., AWS KMS with CloudHSM, GCP Cloud KMS with CMEK) or on-prem HSM for customer-managed keys
- Automated key rotation policies, split knowledge for key creation/rotation, emergency key revocation
- Key management & separation of duties
- Customer-controlled keys (CMEK) option to meet customer requirements
- KMS access restricted to specific roles; administrative operations logged and require dual-approval for destructive ops
- Backup keys stored encrypted with separate key hierarchy and access controls
- Audit logging & PHI access logging
- Central immutable audit log pipeline: application emits structured audit events (who, what, when, patient-id, purpose)
- Logs are sent to an append-only, WORM-capable storage (e.g., S3 with Object Lock) and ingested into SIEM for real-time monitoring and alerting
- Retain full request/response metadata (not full PHI payloads unless necessary) and log any decryption events and key usage (KMS access logs)
- Implement data masking/redaction in logs; if PHI must be logged for forensics, encrypt logs with separate KMS key and control access
- Monitoring, detection & response
- SIEM + UEBA to detect anomalous access patterns (excessive downloads, unusual times, bulk exports)
- Automated alerts and playbooks (SOAR) for suspected breaches: isolate account/service, snapshot environment, preserve logs, rotate keys if compromise suspected
- Forensic capability: immutable snapshots, access to decryption audit trail, chain-of-custody for evidence
- Network & infra protections
- Zero-trust segmentation: private VPCs, least-privileged security groups, service mesh with mTLS
- Data plane isolation for PHI-processing workloads; admin and dev environments separated
- Host hardening, EDR, vulnerability scanning, patching cadence
- Backup, DR & availability
- Encrypted backups (with separate keys), air-gapped copies for critical retention, periodic restore tests
- RTO/RPO defined in SLA; automated failover with strict access controls during DR
- Compliance & governance
- BAA with cloud providers; documented policies (access, retention, breach notification)
- Regular risk assessments, DPIAs, quarterly access reviews, penetration tests, and annual HIPAA readiness audits
- Retention & disposal policies; secure deletion using crypto-erase for keys to render data unreadable
Breach response process (operational steps):
- Triage & containment: trigger SOAR runbook, isolate compromised identities/services, revoke tokens, rotate keys if needed
- Preservation: secure snapshots, freeze logs (WORM), collect chain-of-custody
- Investigation: SIEM/forensic analysis to scope data accessed/exfiltrated, timeline reconstruction
- Notification: follow HIPAA timelines—notify OCR, affected individuals, business associates per legal counsel and BAA terms
- Remediation & lessons: patch root cause, strengthen controls, mandatory retraining, update runbooks
Trade-offs & choices:
- Using customer-managed keys increases compliance assurance but raises operational complexity for key lifecycle management.
- Retaining full PHI in logs aids forensics but increases risk — prefer minimal metadata + encrypted forensic logs with strict access.
This architecture provides layered (defense-in-depth) protections, strong key lifecycle controls, immutable audit trails for PHI access, and defined breach response processes to meet HIPAA compliance and operational needs.
Architect a multi-region, HIPAA-compliant data processing pipeline for a healthcare provider subject to local data residency laws. Provide a risk analysis for cross-region replication, data access controls, encryption in transit and at rest, audit logging, and justify the chosen RPO and RTO trade-offs with respect to patient safety and cost.
Sample Answer
Requirements & constraints:
- Functional: ingest PHI from clinics, normalize, run processing (alerts, analytics), serve regional reads.
- Non‑functional: HIPAA compliance, local data residency per country/region, ≤24h RPO for non-critical analytics, ≤5min RPO for active patient state; RTOs: <15min for clinical alerting, <2hr for analytics; encryption, full audit trail, role-based access, multi-region availability.
High-level architecture:
- Edge ingestion per region (VPC) → regional processing cluster (Kubernetes) → regional encrypted object store (S3-compatible, KMS-per-region) + regional DB (primary). Cross-region async replication & CDC using message bus (Kafka MirrorMaker or cloud-native CDC) with configurable filters to respect residency.
- Global control plane (no PHI) for orchestration, policy, and key management metadata.
- HA components: regional load balancers, multi-AZ deployments. Disaster recovery region(s) per legal allowance.
Key components & choices:
- Regional storage & compute: PHI stays in-region primary. Use customer-managed keys (CMKs) per region with key separation by jurisdiction.
- Cross-region replication: asynchronous CDC with transform/filter layer to prevent illegal transfer; only replicate de‑identified or allowed subsets. Use signed attestations and placement policies.
- Access controls: IAM + ABAC with attributes for role, purpose, region; just-in-time (JIT) ephemeral credentials; MFA for admin actions; break-glass workflow logged and approved.
- Encryption: TLS 1.2+ for transit; mutual TLS for inter-service. At-rest AES-256 with CMKs; envelope encryption; HSM-backed key storage (FIPS 140-2/3).
- Audit & monitoring: immutable append-only audit logs (WORM) shipped to tamper-evident store per region; SIEM integration; real-time alerting for anomalous access.
- Logging & telemetry: separate PHI-free metrics to global observability; PHI in logs redacted or stored regionally.
Data flow:
- Ingest → validation & classification (PHI? allowed cross-region?) → store regionally → local processing → if cross-region allowed, CDC publishes de-identified/sanitized events to replication pipeline → target region ingests.
Risk analysis:
- Cross-region replication: risk = illegal transfer of PHI. Mitigation: policy-based filtering, transformation (tokenization/de‑identification), contractual/legal review, per-replica attestations, encryption in transit, audit trails. Prefer asynchronous replication to limit write latency impact.
- Data access controls: risk = insider misuse. Mitigation: least privilege ABAC, RBAC, JIT, MFA, separation of duties, periodic access reviews, privileged access monitoring.
- Encryption: risk = key compromise. Mitigation: CMKs per region, HSM, split-key policies, key rotation, strict KMS access policies, logging of key use.
- Audit logging: risk = tampering/loss. Mitigation: WORM storage, cross‑checksums, external S3 replication of logs to immutable vault, quarterly integrity audits.
RPO/RTO trade-offs and justification:
- Clinical alerts (patient safety critical): RPO ≤5min, RTO <15min. Justification: timely clinical actions require near-real-time state; cost: provision reserved compute, synchronous local processing, fast journaling; acceptable given high patient-safety value.
- Operational analytics: RPO 24h, RTO <2hr. Justification: lower cost by using async batch replication and cold storage; restores acceptable for business continuity without clinical risk.
- Full-region DR (if local law allows failover): RPO depends on replication window; for jurisdictions forbidding cross-region failover, DR limited to intra-region multi-AZ; otherwise choose warm standby in compliant region with RPO ~1hr and RTO ~1hr for aggregated systems.
Compliance & governance:
- Maintain Business Associate Agreements, Data Processing & Transfer Addenda.
- Automated policy engine enforces residency rules; legal team flags exceptions.
- Regular HIPAA risk assessments, penetration tests, and third-party audits (SOC2, ISO27001).
Operational considerations:
- Regular drills for failover and break-glass.
- Cost controls: tiered replication, lifecycle policies, archive for long-term retention.
- Documentation: architecture diagrams, runbooks, access matrices, and DR plans.
This design keeps PHI in-region by default, minimizes cross-region PHI transfer through policy/filtering and de‑identification, and balances patient safety (low RPO/RTO for clinical paths) against cost (higher RPO for analytics).
You're asked to lead a multi-stakeholder architecture review for integrating Lyft APIs into a hospital EHR system. Create a detailed checklist covering security (PHI handling), performance, failover, auditability, consent flows, testing, and governance. Identify stakeholders to include (legal, security, clinical, ops), risks to escalate to leadership, and how to document residual risk for legal teams.
Sample Answer
Situation: You're leading a multi-stakeholder architecture review to integrate Lyft APIs into a hospital EHR. Below is a comprehensive checklist, stakeholder list, key risks to escalate, and a template for documenting residual risk for legal.
Checklist (high-level categories)
- Security & PHI handling
- Data minimization: only send fields required for trip (no full MRN, use hashed IDs)
- Data classification: tag each field PHI/PII/non-PHI
- Encryption: TLS 1.2+ in transit, AES-256 at rest for any persisted PHI
- Tokenization: use short-lived tokens; avoid storing Lyft access tokens tied to patient identifiers
- Least privilege: scoped OAuth scopes, RBAC for service accounts
- Key management: HSM/KMS and rotation policy
- VPC/Private Link: prefer private connectivity (VPN/Direct Connect/Private APIs)
- Consent linkage: tie patient consent records to each outbound request and storage
- Third-party risk: review Lyft’s SOC2, HITRUST, BAAs (Business Associate Agreement)
- Performance & Scalability
- Expected throughput & latency SLAs per workflow (e.g., transport request < 2s UI ack)
- Load testing plan with peak hospital shift patterns
- Rate limits handling and backoff/retry strategies
- Queueing for async requests (idempotency keys)
- Failover & Resilience
- Circuit breakers, exponential backoff, retries with jitter
- Graceful degradation: fallback workflows (e.g., manual dispatch via call center)
- Multi-region failover and DNS TTL strategy
- Alerting for degraded service and runbooks
- Auditability & Logging
- Immutable audit trail for every request/response with timestamps, actors, correlation IDs
- Log PHI redaction rules and secure retention (retention period aligned to policy)
- Monitoring: dashboards for request success/failure/latency
- Log access controls and periodic review
- Consent Flows & UX
- Explicit consent capture (who, when, what) stored in EHR with linkage to ride event
- Consent revocation handling and propagation
- Patient-visible notices and opt-out mechanisms
- Clinician workflow impacts and time-to-complete metrics
- Testing & Validation
- Integration test matrix: unit, contract, end-to-end with Lyft sandbox
- Security testing: SAST, DAST, penetration test scoped to PHI flows
- Compliance testing: BAA, HITRUST/HIPAA gap analysis
- User acceptance testing with clinical staff and patient representatives
- Chaos testing for failover scenarios
- Governance & Change Control
- Approval gates (security, clinical, legal) before production rollout
- Versioning and rollback plan for API changes
- Periodic review cadence (quarterly) for vendor posture and architecture
- Metrics/KPIs: failures per 1k requests, consent compliance %, mean time to recovery
Stakeholders to include
- Internal: CISO/security engineering, Legal & Compliance (privacy counsel), Clinical leadership (CMIO, nursing leads, social work), CareOps/Transport Ops, EHR integration team, Infrastructure/SRE, Identity & Access, Incident Response, InfoSec Risk Management, QA/testing, Patient Experience/Privacy Officer, Product/PM
- External: Lyft integration/partnership manager, Lyft security/compliance, any managed service providers, insurers if involved
Risks to escalate to leadership
- No signed BAA or insufficient contractual controls with Lyft
- Lyft fails required security/compliance posture (failed audits, expired certs)
- Architectural choice exposes persistent PHI outside controlled environments (e.g., storing plain MRNs in Lyft)
- Inability to meet required uptime/latency for clinical workflows that impact patient safety
- Regulatory/legal exposure (state privacy laws) or consent model mismatch
- Single-vendor dependency with no adequate failover/manual workflow
Documenting residual risk for legal teams (template)
- Risk ID / Title
- Description: concise technical summary of risk and conditions
- Impact: data types affected (PHI/PII), potential harm (privacy breach, patient safety), compliance implications
- Likelihood: qualitative (Low/Medium/High) with rationale (e.g., mitigations reduce probability)
- Controls in place: list of technical, process, contractual mitigations (encryption, tokenization, BAA)
- Residual risk: remaining exposure after controls
- Action plan / compensating controls: monitoring, insurance, additional audits, manual mitigations
- Acceptance: business owner, legal sign-off, date, review cadence
- Evidence links: architecture diagram, test reports, vendor SOC reports
Closing: Use this checklist during the review session, assign action owners with deadlines, capture decisions/assumptions in meeting minutes and attach the residual risk document for legal sign-off before go/no-go.
A product manager believes HIPAA does not apply because the product only schedules appointments, not claims processing. As a Solutions Architect, walk through how you'd analyze applicability of HIPAA: data types, covered entities/business associates, agreements, and technical safeguards. What evidence would you collect to support your conclusion?
Sample Answer
Start by clarifying scope and assumptions with the PM: which customers, environments (prod/test), and integrations. Then proceed through four lenses: data, parties, agreements, and technical safeguards.
- Data types (PHI):
- Map all data elements collected, stored, transmitted: names, DOB, contact info, appointment reason, provider, medical record numbers, insurance IDs, test results referenced in notes. If any element can be tied to health information it’s PHI.
- Evidence: data schema, sample records (redacted), API contracts, UI screenshots showing fields, ETL/job definitions.
- Covered entities & Business Associates:
- Determine who uses the product: is the customer a HIPAA covered entity (provider, health plan, clearinghouse) or are you interfacing with one? If you process/schedule on behalf of a covered entity, you’re a Business Associate.
- Evidence: customer contracts, sales intake that identifies customer type, architecture diagrams showing data flows between your system and providers/EHRs.
- Agreements:
- If BA status applies, a signed Business Associate Agreement (BAA) is required and flow-down clauses with subcontractors.
- Evidence: executed BAAs, legal templates, procurement emails showing negotiation, SOWs.
- Technical safeguards (Security Rule):
- Check access controls (unique IDs, MFA), audit logging, encryption at rest/in transit, data minimization, integrity controls, backup/retention, breach detection/response, segmentation/least privilege.
- Evidence: infrastructure diagrams, encryption configs, IAM policies, audit log samples, incident response plan, pen test and risk assessment reports, SOC2/HITRUST certifications.
Deliverable & Recommendation:
- Produce a short “HIPAA applicability checklist” showing yes/no on PHI presence, covered entity relationships, BAA status, and gaps in safeguards. If PHI present and no BAA, recommend immediate remediation: stop processing PHI, sign BAAs, or implement necessary controls (encryption, logging, IRP) before onboarding healthcare customers.
This approach ties technical artifacts to legal obligations so stakeholders (PM, legal, sales) can make an informed decision.
A health-tech customer requires HIPAA-compliant architecture for a new module that processes protected health information (PHI). Outline required architecture changes (encryption, identity), operational controls, third-party vetting, and the evidence artifacts you would provide during the customer security review.
Sample Answer
High-level approach: design a least-privilege, defense-in-depth architecture that minimizes PHI surface area, enforces strong identity controls, encrypts data end-to-end, and supports auditable operational controls. Below is a concise checklist you can present in a customer security review.
Architecture changes
- Data segmentation: isolate PHI in a dedicated VPC/tenant, separate databases, and dedicated storage buckets with restricted networking.
- Encryption:
- In transit: TLS 1.2+/mTLS for service-to-service and client connections.
- At rest: AES-256 encryption for DB/storage. Use cloud KMS with customer-managed keys (CMKs) and HSM-backed key material where possible.
- Field-level encryption for sensitive attributes before persistence (client-side or service-side envelope encryption).
- Identity & access:
- Centralized IdP (SAML/OIDC) with enforced MFA, conditional access (device posture, network).
- RBAC/ABAC for services and users; ephemeral credentials for services (OIDC tokens).
- Secrets management (vault/KMS) with rotation and limited scope.
- Network & runtime:
- Private subnets, no public DB endpoints, bastion with jump-hosting and session recording.
- WAF, API gateway with rate limiting and request validation, runtime workload isolation (namespaces, service mesh).
Operational controls
- Logging & monitoring: centralized immutable logs (WAF, API, application, DB access) shipped to SIEM with 365+ retention for PHI-related events; enable database audit logging.
- Detection & response: IDS/IPS, alerting, playbooks for PHI incidents, table-top exercises quarterly, 24/7 SOC or vendor.
- Change control: CI/CD with automated security scans, code signing, approved deployment pipelines, and rollback procedures.
- Access governance: quarterly access reviews, joiner/mover/leaver automation, emergency access procedures with break-glass and recorded approvals.
- Data lifecycle: retention & secure disposal policies, data minimization, anonymization/pseudonymization where feasible.
- Training & policies: annual HIPAA/security training, role-based privacy training, documented PHI handling procedures.
- Business Associate Agreement (BAA) management and record keeping.
Third-party vetting
- Require BAA from any vendor handling PHI.
- Review independent audit reports: SOC 2 Type II, ISO 27001, HITRUST certification where available.
- Security questionnaire + risk scoring, source-code access/attestation for critical components, contractual SLAs for incident reporting.
- Regular vendor pentests/third-party assessments or review of their pentest reports and remediation timelines.
Evidence artifacts to provide
- Solution architecture diagram and data flow (DIA) showing PHI boundaries and controls.
- Threat model / risk assessment and mitigations matrix.
- Encryption architecture: KMS configuration, key rotation policy, proof of CMK/HSM usage.
- IAM configuration: IdP integration design, RBAC policies, sample IAM policies/roles.
- Logs & monitoring design + retention policy and sample log extracts (redacted).
- Incident response plan, runbooks, and recent tabletop exercise report.
- BAAs and vendor risk assessments.
- Audit evidence: SOC 2 / ISO / HITRUST reports, penetration test reports and remediation tickets, change control & deployment pipeline screenshots, access review logs.
- Policy documents: HIPAA privacy/security policies, data retention/destruction policy, employee training records.
Why this satisfies HIPAA: segmentation + encryption protects ePHI confidentiality; strong identity, access controls, and logging provide required access control/auditability; BAAs and vendor audits meet HIPAA business associate requirements; documented procedures and demonstrable evidence enable attestation during customer review.
Unlock Full Question Bank
Get access to all 8 Health Data Privacy and HIPAA interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.