How a Medplum patient portal limits patients to their own records
Medplum can allow open patient registration, so patients create their own accounts without staff provisioning each one. Visibility, however, is not granted by registration. What a patient can see depends on the access policies and compartment rules your team designs, tests and maintains, so the portal is only as contained as those rules. Open registration fits when the data a patient can reach is limited to their own Patient record and related resources, the portal is a low-risk service such as appointment history or intake forms, and your team can run the policy tests before go-live. Invitation-only onboarding is the safer default when staff must verify identity before an account exists, when the patient population includes proxies or minors, or when the team has not yet tested how compartment rules treat every resource type the portal reads. Confirm in your environment which registration flow and identity verification steps your compliance team will accept for your patient population.
Whichever registration model you choose, test the boundary before patients arrive. Create two test patients and two test accounts, then attempt every read and search the portal performs from each account, including direct lookups by ID, search parameters and GraphQL queries. Check that Binary files, which bypass compartment policies unless they carry a securityContext, are not exposed to the wrong patient. Confirm how reCAPTCHA is wired into the registration flow, since Medplum's integration catalog lists it as a way to protect patient registration, and verify that abandoned or bot-created accounts cannot reach patient data. Plan for the operating side too: a patient-facing app that later needs third-party access will require its own SMART scopes decisions, and every policy change should be re-run through the same test set. Ask your implementation partner or internal team to document the expected result for each test, so an auditor can compare evidence against the design.
Which registration and sign-in options fit which portal
This table compares open self-registration, invitation or staff-created accounts, reCAPTCHA-protected registration, and Google or Auth0 sign-in for patients. Read each row for the portal type it suits and its main trade-off, then confirm the exact configuration with Medplum for your version. The main takeaway is that the registration method controls who can create an account, while the access policies still decide what each account can see.
| Option | When it fits | Main trade-off |
|---|---|---|
| Open self-registration | Public portals where any patient can create an account for their own records | Anyone can submit a registration, so bot protection and identity checks must be added around it |
| Invitation or staff-created accounts | Portals limited to patients a clinic has already enrolled or verified | Staff must create or invite each account, which adds an onboarding step and workload |
| reCAPTCHA-protected registration | Open registration portals that need to limit automated sign-ups | Adds a third-party verification step to the registration flow that you must configure and test |
| Google sign-in for patients | Patients who already use a Google account and accept that identity source | Identity depends on the Google account, so confirm how it maps to a patient record before go-live |
| Auth0 sign-in for patients | Portals where your organization already runs Auth0 or wants its login features | Adds an external identity provider to operate and tie to patient matching and access policies |
| Medplum as identity provider | Portals where Medplum manages patient logins directly with multi-factor authentication | You manage the account lifecycle inside Medplum, so plan password reset and account recovery |
Setting up open registration and patient access step by step
This sequence takes a self-hosted Medplum deployment from an open sign-up form to a portal where each patient can reach only their own records. Each step closes with a check you can run before moving on.
Decide the patient identity model
Your security, compliance and product owners agree how patients will prove who they are: Medplum's own sign-in, an external provider such as Google or Auth0, or a patient identity service your organization already runs. The team also decides whether patients can self-register, which identity fields must match a Patient record, and how existing patients will claim accounts. The step is done when this model is written down and approved, and every later step refers back to it.
Configure the patient sign-in provider
A platform engineer sets up the chosen sign-in provider in the Medplum project, adds the redirect URLs for your portal, and confirms that the Patient client application points at the right project. Check which sign-in options are available on your plan and deployment, since the pricing and integration pages list features by tier. The check is a test patient account that signs in through the portal and receives a token issued for that patient, with no access to staff-only screens.
Add reCAPTCHA to patient registration
The team connects Google reCAPTCHA to the registration form so automated sign-ups are challenged before a new account is created. Medplum's integration catalog lists reCAPTCHA as a way to protect patient registration, so confirm the current setup steps in the integration documentation for your version. The check is a scripted submission without a valid challenge token, which should fail, followed by a normal sign-up, which should succeed.
Write the patient compartment access policy
A security engineer writes an access policy that lets a Patient-role user read the Patient resource for their own record and the resources that reference it, and nothing else. The policy is attached to the patient role and tested in a non-production project first. The check is two test patients: patient A reads their own Observation and Encounter resources, and patient B, using a valid token, is refused when requesting patient A's records by ID, by search and through GraphQL.
Test the policy against edge cases
Before go-live, the team tests paths that often leak data in patient portals: direct resource reads by ID, searches with broad parameters, Binary and file downloads, and write attempts on another patient's records. Any Binary files attached to a patient should be checked for security context, because Binary resources can bypass compartment-style policies unless they are labeled. The check is a written test matrix with an expected result for each path, and every row returns the expected outcome.
Grant SMART patient scopes to patient apps
For any third-party or patient-facing app that reads FHIR data, the team requests SMART on FHIR patient-level scopes instead of broad user scopes, and confirms the app only receives the launch context for the signed-in patient. Offline access should be granted only if the use case requires it. The check is an app launch as patient A that returns only patient A data, and a token inspection that shows the granted scopes match the approved list.
Retest after every change
The security team repeats the full test matrix after each change to the sign-in provider, registration form, access policies, or app scopes, and again after each Medplum upgrade. Keep the results with the change record so auditors and internal reviewers can see what was tested and when. The step is complete when the latest run passes every row and the results are filed with the approved identity model.
How a patient request moves from registration to record access
The flow starts in the patient's browser at the public registration endpoint, where reCAPTCHA is checked before an account is created. Sign-in then passes through the chosen identity provider to Medplum Auth, which issues a token carrying the patient's identity. Each FHIR request is evaluated against the access policy, so the API returns only resources in that patient's compartment. Check that the trust boundary sits between registration and protected clinical data, and that no request skips the policy step.
Patient requests pass registration, sign-in and policy checks before reaching only their own records.
Security risks in open patient registration
Open registration lets anyone on the internet create an account, so the risks start before a patient sees any data. The cards below cover the threats that connect registration, patient compartment policies and audit logging, and the control to apply to each. Under the shared responsibility model described in Medplum's compliance documentation, Medplum provides the platform, while your organization configures, tests and evidences these controls.
Automated bot sign-ups
Scripts can create large numbers of patient accounts, consume registration capacity and seed the system with fake identities. Enable reCAPTCHA on the registration form so that automated submissions are challenged before an account is created. Confirm with your own testing that the challenge runs on the registration endpoint and not only on the visible page, and check how your identity provider handles accounts created outside the portal.
Integration docsEnumeration of patient records
An attacker with a valid account may try to guess identifiers or search for other patients by name, date of birth or record ID. Patient compartment policies should limit each signed-in patient to resources linked to their own Patient record, and searches should return only compartment results. Test with two patient accounts and attempt direct reads, searches and GraphQL queries against the other patient's data.
Misconfigured policies exposing other patients
A broad access policy, a missing compartment rule or a resource type left without a restriction can expose records across patients. Review every access policy that applies to the patient role, including those for Binary files and linked resources, before go-live. Keep a written test set that covers each resource type the portal reads, and rerun it after every policy change or Medplum upgrade.
Compliance docsUnverified identity at registration
Open registration does not prove that the person signing up is the patient whose record they claim. Decide which identity checks your program requires, such as email verification, multi-factor authentication or a link to an existing record, and document who approves linking an account to a Patient. Confirm with your compliance team which proofing standard applies to your portal before the patient role is granted access.
Unmonitored patient access
Without audit records of who read or changed patient data, incidents are hard to investigate and access reviews are hard to perform. Confirm which events Medplum records for patient logins, reads and failed attempts, where those logs are stored and how long they are kept. Set alerts for unusual access patterns, such as many failed searches from one account, and assign an owner for reviewing them.
What open patient registration costs and requires
How much effort does it take to configure open patient registration in Medplum?
The effort depends less on the registration form itself than on the decisions around it: which identity sources patients may use, which resource types a new patient account can read, and how the registration flow is protected. A basic setup with Medplum's built-in sign-in is a small configuration task on a working deployment. The larger share of effort goes into writing and testing the patient compartment policies, adding reCAPTCHA, and proving that one patient cannot reach another patient's data. Ask any partner to split its quote into the configuration work, the policy design and the testing, because those three parts scale differently.
Can our own staff set up patient registration without a partner?
Yes, a team with Medplum experience can configure registration and patient access policies in-house, and many do. The questions to answer honestly are whether anyone on the team has written and tested access policies before, whether someone can review them as a security engineer would, and whether clinical staff are available to sign off on what patients may see. If the answer to any of these is no, the work is not impossible, but it shifts risk onto the team. Medplum's documentation on access policies and the self-hosting guides are the starting points for an internal build.
What does the client need to provide before registration work starts?
Three things usually block the work if they are missing. The first is identity decisions: whether patients sign in with Medplum's own identity provider, with Google or Auth0 as listed in Medplum's integration catalog, or with a corporate identity provider, and who owns that choice. The second is clinical sign-off on what a patient may see, including which resource types, notes, results and documents are shown and whether minors or proxies need separate handling. The third is test patients: realistic records that exist in a non-production project so policies can be checked against data that looks like production without exposing real people.
How long does patient portal access take to set up?
Duration depends on scope, and no fixed timeline applies to every organization. A narrow scope, such as self-registration with a single sign-in method and read-only access to a short list of resource types on an existing deployment, is much shorter than a portal that adds multiple identity providers, appointment or messaging features, proxy access and an external security review. Plan separate time for policy testing and for clinical review, since both tend to wait on people outside the build team. Ask any partner for milestones tied to the written scope rather than a single total.
What drives the cost of a patient portal up?
Cost moves with the number of decisions and the amount of verification they need. The main drivers are the number of identity providers and sign-in methods, the number of resource types patients can read, the number of patient-facing features built on SMART scopes, the complexity of consent and proxy relationships, and the depth of testing required by your compliance or security teams. Hosting is a separate cost line. Medplum's pricing page lists hosted plans (Free, Production, Premium and custom Enterprise) and self-hosting options (a free Community option and custom-priced Enterprise Self-Hosted), and the choice affects who operates the infrastructure and which features are available.
Which costs are one-time and which recurring for a patient portal?
One-time costs cover design, initial configuration, policy writing, reCAPTCHA setup, test data and the first round of security testing. Recurring costs cover hosting, licenses or plan fees, identity provider subscriptions, reCAPTCHA usage if your account is metered, monitoring, and the ongoing review of policies whenever the data model or features change. Policy review is the cost teams most often forget. Each new resource type or SMART scope added later needs its own access check. When comparing quotes, ask which items are fixed, which are priced per release or per change, and which assume your staff perform the testing.
What should we ask a partner for in a patient registration quote?
Ask for the written scope first, because a fixed-scope quote is only as clear as its boundaries. Look for the list of identity providers and sign-in methods in scope, the resource types patients can access, the policy test cases and who writes them, the reCAPTCHA configuration and its key handling, the test patient data plan, the clinical review step and who signs it off, and the deliverables at the end, such as documented policies and a retest after fixes. Also ask who operates the deployment after launch and what support or retainer terms apply. DeployOpen plans and delivers this kind of work as fixed-scope engagements with scope, deliverables and timelines agreed in writing before work starts.
Does a patient portal need an external security test before launch?
The decision belongs to your risk owners, but the answer is usually yes for any portal that exposes health information to the public internet. Registration is an attack surface: automated sign-ups, account enumeration, weak identity checks and policy gaps can all expose records. DeployOpen runs security testing of applications and APIs and can test the registration flow and patient access policies before go-live, with a findings report and a retest. Ask your compliance team which evidence they need and whether an independent assessor must review it, since DeployOpen prepares evidence but does not issue audit reports or certifications.
What to confirm before going live with patient access
Patient access on a self-hosted Medplum deployment depends on the exact version, the identity and registration controls, the app scopes and the file handling behind the portal. Each check below is something to confirm in your own environment before any patient account is created, because availability and behavior can differ by deployment path and release.
Medplum version and deployment path
Record the exact Medplum server version, the self-hosting path (AWS with CDK and CloudFormation, Ubuntu, Docker, Kubernetes, DigitalOcean, source build, or a Beta Terraform path for GCP or Azure) and the patch level you run. Patient access rules, registration options and SMART behavior should be tested on that exact build. Confirm that every minor version between your starting point and the target has been applied in sequence, since skipped minors can cause startup failures. Ask your team how security patches will reach the deployment within the policy windows.
- Critical patch target
- 7 days
Identity provider availability
Confirm which sign-in options your deployment actually exposes for patients: Medplum as the identity provider, an external provider such as Google, Auth0 or AWS Cognito, or a domain-level corporate provider. Check whether multiple external providers are available on your plan or deployment, since the pricing page lists them as an enterprise feature. Test patient sign-in and password recovery end to end, including multi-factor authentication, before you publish the registration link.
Authentication docsreCAPTCHA on registration
The integration catalog lists reCAPTCHA as a way to protect patient registration, but confirm that it is configured and enforced on your deployment rather than assumed. Verify that a registration attempt without a valid challenge is rejected, and that the site and secret keys are stored outside source control. Ask whether your registration flow can be bypassed through direct API calls, and test that path as well as the browser form.
Integration docsPatient compartment policy testing
Open registration only protects records if the patient compartment policy limits each account to its own Patient and linked resources. Create two test patients and confirm that each test account can read its own records and cannot search, read or enumerate the other patient's Observations, Encounters, DocumentReferences or Communications. Include negative tests for search parameters, GraphQL queries and resources that reference the patient indirectly. Repeat these tests after every policy change or server upgrade.
Compliance docsSMART launch and offline scopes
If patient-facing apps connect through SMART on FHIR, decide which scopes each app needs before go-live. Launch context scopes control which patient the app opens with, and offline access scopes allow refresh behavior that keeps a session alive after the user leaves. Confirm that each app requests only what it uses, that offline access is granted deliberately, and that the granted scopes combine correctly with your access policies. Test revocation and token expiry from the patient's side.
Binary file protection
Binary resources can bypass compartment policies, so a patient's uploaded documents, images or lab attachments may be readable by other accounts unless each file is protected. Confirm that every Binary created by the portal carries a securityContext linked to the correct Patient, and check existing Binary resources for missing or incorrect links. Test file retrieval with a second patient account, including files reached by guessing or sharing the URL, before you allow uploads.
How to test patient access before opening registration
Before open registration goes live, prove that one patient cannot reach another patient's record. Build the test plan around synthetic patients and at least two patient accounts in a non-production Medplum project, each linked to its own Patient resource through the patient compartment policy. Seed a few synthetic patients with overlapping attributes, such as the same family name or date of birth, so that a loose search filter shows up as a failure rather than passing unnoticed. Then sign in as Patient A and attempt every path a patient could take to reach Patient B's data: direct reads by resource ID, FHIR search with and without parameters that name Patient B, _include and _revinclude requests, and GraphQL queries that traverse from Patient A to related resources. Each negative test should record the expected result (an empty bundle or an authorization error, not a partial record) and the actual response.
Cover the paths that most often leak data in a portal. Test the Binary resources that hold uploaded documents, because Binary access does not follow compartment rules unless securityContext is set and linked correctly, so confirm the attachments of Patient B cannot be fetched by Patient A. Test the SMART patient scopes that the portal's client application requests, and confirm the token issued to Patient A cannot widen access through scope strings. Repeat the full suite after every Medplum upgrade. Medplum ships patch versions weekly and targets security patches within 7 days for critical vulnerabilities and 14 days for high ones, according to its versions and release policy, so plan a regression run after each patch and document the version under test. Confirm with your Medplum contact or your own environment which upgrade path applies to your deployment before scheduling the retest.
How DeployOpen scopes and delivers patient portal access
DeployOpen plans, builds, tests and documents patient portal access in a self-hosted Medplum deployment inside the client's own infrastructure. The work covers open registration, patient compartment policies, reCAPTCHA on sign-up and SMART patient scopes, with evidence prepared for the client's own compliance and security reviews.
How we scope
- Written scope lists which registration flows, identity providers and patient-facing apps are in and out of the engagement.
- Scope names the Patient resources, compartment rules and SMART scopes each portal role may reach.
- Fixed-scope agreements set deliverables and timelines in writing before any configuration work starts.
How we build
- Registration is configured with reCAPTCHA and reviewed for abuse paths such as bulk account creation.
- Patient compartment access policies are written and tested so each patient reads only their own records.
- Binary and attachment handling is checked so uploaded files cannot bypass the patient compartment rules.
How we hand over
- Test evidence shows that a second patient account cannot read or search another patient's Patient, Observation or Binary data.
- Documentation covers the access policies, SMART scope grants, registration settings and the reasons behind each choice.
- The client's engineers and compliance reviewers receive a walkthrough and a runbook for changing portal access later.
How we support
- Ongoing support, upgrades and continuous testing of portal access are available as retainers.
- Policy changes are retested after each Medplum minor or major upgrade before they reach production.
- Confirm with DeployOpen which support hours, response commitments and retest frequency a retainer includes.

