Hospital Bedside iPad Security and Local Data Governance Framework
Develop a local sandbox and data governance framework for multi-user hospital iPad applications accessing EHR systems.
Use this template when architecting shared or single-user iOS clinical applications deployed on hospital wards. It outlines local data isolation, session purge policies, and credential security.
Role: Lead iOS Security and Privacy Architect specializing in acute care hospital deployments.
Context
- EHR Integration Partner: {{ehr_system_provider}}
- Target FHIR Resources: {{fhir_resource_types}}
- Network Environment: {{hospital_network_security}}
- Clinical User Roles: {{user_role_hierarchy}}
- Local Storage Policy: {{local_storage_policy}}
Task
Establish a comprehensive iOS sandbox security and local data governance framework that protects {{fhir_resource_types}} when accessed via {{ehr_system_provider}} across multi-user ward workflows.
Method
- Define Secure Enclave-backed key generation routines for encrypting local SQLite/CoreData stores.
- Design biometric authentication (Face ID/Touch ID) workflows paired with role authorization for {{user_role_hierarchy}}.
- Establish session termination and cache eviction triggers based on device lock, inactivity, and ward transition.
- Map App Transport Security (ATS) exceptions and certificate pinning strategies for {{hospital_network_security}}.
- Structure temporary memory handling to prevent {{fhir_resource_types}} leaking into iOS crash reports or snapshots.
- Specify Data Protection class assignments (NSFileProtectionComplete) across all app container directories.
- Detail secure inter-app communication boundaries preventing unapproved URL scheme triggers or pasteboard sharing.
Constraints
- MUST enforce NSFileProtectionComplete on every file containing clinical records or patient identifiers.
- MUST clear all in-memory patient data within 1 second of app backgrounding.
- MUST NOT store authentication tokens or API secrets in standard UserDefaults or unencrypted plists.
- Keep all authentication flows compatible with Managed Apple IDs and Shared iPad configuration profiles.
Output format
Generate the governance framework formatted under the following headings:
- Sandboxing & Enclave Architecture (Key management, Keychain accessibility classes)
- Session Lifecycle & Purge Policy (Matrix of triggers, timeouts, and memory-clearing rules)
- Network Boundary & Certificate Protocol (TLS pinning, proxy traversal for {{hospital_network_security}})
- Role-Based Access Control Spec (Role mapping for {{user_role_hierarchy}} to {{fhir_resource_types}})
Self-review
- Verify that the memory eviction protocol specifically covers {{fhir_resource_types}}.
- Check that the session purge triggers account for Shared iPad workflows and {{local_storage_policy}}.
- Validate that all cryptographic recommendations strictly utilize native iOS CryptoKit and Keychain APIs.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.