Mutual TLS client authentication for Medplum integrations

Mutual TLS lets Medplum verify which trading partner or payer is calling by checking an X.509 client certificate on every connection. This page explains the configuration choices, build sequence, trade-offs and what to confirm before you commit.

On this page

When Medplum mutual TLS client authentication is required

Mutual TLS (mTLS) is required when a payer or trading partner tells you to present an X.509 client certificate before they will exchange prior authorization or other FHIR traffic with Medplum. In practice, the requirement comes from the counterparty's security policy or from the specification they follow, not from a Medplum default. Medplum's own mTLS documentation describes mTLS as optional but increasingly expected under the Da Vinci Prior Authorization Support specification and HTI-4 electronic prior authorization rules, and notes that some payers now make it mandatory. Treat the question as a per-counterparty decision, and ask each payer or partner for their exact requirement in writing before you plan the build.

mTLS adds a layer that bearer tokens and client secrets do not provide. With a client secret or a signed JWT, the server confirms that the caller knows a credential. With mTLS, the TLS handshake itself requires the client to prove possession of a private key whose certificate chains to a certificate authority your server trusts. That gives the receiving side a transport-level check on the caller's identity before any token is processed. Confirm with each counterparty whether they want mTLS in addition to OAuth tokens, as a replacement for them, or only for specific endpoints, because those choices change which certificates you must issue, rotate and store.

Ask each counterparty five questions: which certificate authority they will accept, whether they require a specific certificate profile or key algorithm, how revocation is checked, which hostnames or subject values must appear in the certificate, and who owns certificate renewal on each side. Their answers determine whether the work is a short configuration change or a larger project that also involves your load balancer, trust store and certificate lifecycle process.

Configuration options and when each fits

This table compares the four main decisions a team makes when adding client certificates to a Medplum integration: where TLS ends, how strictly certificates are checked, how the trust store is scoped, and what kind of token is issued. Read each row for the conditions that favor it and the operational work it adds, then confirm the Medplum version and hosting path before choosing.

DecisionOptionWhen it fitsOperational cost
TLS terminationTerminate TLS at the load balancer and forward plain requestsYour load balancer is the only path to Medplum and you do not need the application to inspect the client certificateMedplum cannot read the partner identity, so partner checks depend on the balancer configuration and its logs
TLS terminationPass the client certificate through to MedplumPartner identity must be evaluated by Medplum or recorded in its audit trail, such as AWS ALB passthrough setupsThe team must confirm the balancer forwards certificate details in the expected header format and test that path after every infrastructure change
Verify modeRequire a client certificate on every connectionOnly known trading partners or payers should reach the endpoint at allAny partner without a valid certificate is blocked, so onboarding and certificate renewal need a clear owner and schedule
Verify modeRequest a certificate optionallySome routes must stay open for public or unauthenticated traffic while others need partner identityEach protected route needs its own check in application logic, and misconfiguration can leave a route open without warning
Trust storeOne trusted certificate authority or certificate for a single partnerA single partner with a dedicated connection and a small, stable set of certificatesLow maintenance, but each new partner means a new trust store entry and a separate review
Trust storeA shared trust store covering many partnersSeveral partners or payers connect through a common certificate authority or public trust frameworkTrust scope is broader, so the team must confirm which issuers are included and remove revoked or retired entries promptly
Token typePlain bearer tokensLower-risk integrations where a stolen token is acceptable under your controls and the specification does not require bindingSimpler client code, but a token copied from one connection can be replayed from another
Token typeCertificate-bound tokensPayer or prior authorization workflows where the specification or payer expects the token tied to the client certificateClients must present the same certificate on every token request and API call, so certificate rotation and proxy behavior need testing

Setting up mTLS for a Medplum integration

This sequence takes a trading partner or payer from an agreed certificate authority to a tested mTLS connection into a self-hosted Medplum server. Each step closes with a check, so the team knows which layer is working before it moves to the next.

  1. Agree the certificate authority and onboarding terms

    Your security lead and the partner's technical contact agree which certificate authority signs client certificates, which certificate fields identify each client, how certificates are renewed, and how a compromised certificate is reported and revoked. Your compliance and integration owners sign off on the terms in writing. Check: the agreed CA, validity process, revocation contact and onboarding owner are written into the partner's integration record before any certificate is issued.

  2. Issue and record client certificates

    The approved authority issues a client certificate to each partner system, and the partner keeps the private key on its own side. Your team records each certificate's subject, serial number, issue date, expiry date and the Medplum project and client it will map to in a register you control. Check: every certificate in use appears in the register with an owner, and no private key has been shared with your team or stored in a ticket or email thread.

  3. Build the trust store

    Assemble a trust store that contains only the root and intermediate certificates the agreed authority uses to sign partner clients, and store it in the location your load balancer reads. Remove any test or legacy authority that the integration does not need. Check: a certificate chained to the approved authority validates against the trust store, and a certificate from an unlisted authority fails validation when the load balancer checks it in a test environment.

  4. Configure the load balancer listener and passthrough

    Configure the listener that accepts partner traffic to request client certificates and validate them against the trust store. Confirm whether the load balancer terminates TLS or passes the client certificate through to Medplum, because Medplum must receive enough certificate detail to make its own decision. Confirm the verify mode and passthrough behavior against the load balancer vendor's documentation and your chosen Medplum deployment guide. Check: a handshake from a test client with a valid certificate completes, and the backend receives the certificate information the Medplum configuration expects.

  5. Configure Medplum's mTLS settings

    Following the Medplum mTLS documentation, enable mTLS on the server and set the certificate handling that matches the load balancer design from the previous step. Record every setting and the version of Medplum in your change log, and confirm the exact configuration keys in the version you run, since they can change between releases. Restart or redeploy according to the upgrade guidance for your deployment. Check: the server starts cleanly, the health endpoint responds, and logs show the mTLS setting active without errors.

  6. Bind the client to an access policy

    Create a ClientApplication for the partner in the correct Medplum project and attach an access policy that limits the resource types, operations and compartments the partner needs. Map the certificate identity to that client so that a valid certificate can only act within the scope you approved. Keep the policy narrow and review it whenever the partner's use case changes. Check: a token request made with the certificate returns a token for the intended client, and a read attempt on a resource type outside the policy is denied.

  7. Test with a valid certificate

    Using a test certificate from the agreed authority, run the partner's expected calls against a non-production Medplum environment. Cover the token request, the core read and write operations, and any bulk or subscription flow the integration depends on. Record response codes, token lifetimes and audit log entries for each call. Check: all expected calls succeed, the audit log attributes each request to the correct client, and no request succeeds without the certificate.

  8. Test revoked, unknown and missing certificates

    Repeat the connection with three cases: a certificate you have revoked or removed from the trust path, a certificate issued by an authority outside the trust store, and a request with no client certificate at all. Each should be refused at the correct layer, with the refusal logged. Share the results with the partner and keep them with the integration record for later review. Check: each of the three cases is rejected before any Medplum resource is returned, and the logs show the refusal reason for each one.

Security and operational risks to plan for

Mutual TLS adds a credential layer that someone has to issue, store, rotate and revoke for every trading partner and payer. The cards below cover the failure points that tend to surface after go-live, and the control that addresses each one.

Certificate expiry and rotation

Client certificates expire on a fixed date, and an expired certificate fails the handshake before any request reaches Medplum. Record each partner's certificate validity dates in a register, alert well before expiry, and agree a rotation procedure with each partner that includes overlapping validity so both sides can switch without an outage. Confirm who on each side owns the renewal request.

Revocation handling

When a partner key is compromised or a partner leaves, you need to block that certificate quickly. Confirm whether your load balancer or gateway checks revocation status and how it is configured, because a trust store that accepts a certificate issued by a trusted authority will continue to accept it until you remove it or the issuing authority revokes it. Document the steps and the person who can execute them out of hours.

Private key storage

The private key behind each client certificate is the credential that matters most. Keep keys out of shared repositories, tickets and chat, and restrict who can read them on the partner and on your side. Where your team issues certificates, a managed secrets or PKI service with access logging is a better home for keys than a file on a build server. Confirm this with your security team before onboarding.

Trust store drift across environments

Development, test and production often hold different trust stores, so a partner certificate can pass in test and fail in production. Keep the trust bundle under version control, promote it through the same pipeline as other configuration, and compare checksums across environments during each release. Drift is most common after manual edits made during an incident.

Logging subject and serial for audit

When an access question arises, the audit trail needs to show which certificate was presented, not just which IP address connected. Configure the terminating layer to log the client certificate subject, serial number and issuer for every connection, and keep those logs under the same retention rules as your other access records. Confirm that the log format reaches Medplum audit or your SIEM in a form your team can search.

Shared responsibility for compliance evidence

Medplum's compliance documentation states that compliance is a shared responsibility between Medplum and its customers, so the controls around certificate issuance, storage and revocation sit with your organization and any partner you hire. DeployOpen can implement and document these controls and prepare evidence for assessors, but independent auditors issue any audit report or certification. Ask your assessor early which evidence they expect for certificate lifecycle.

Medplum compliance docs

Request flow from partner certificate to Medplum access policy

A partner system starts the request by presenting its X.509 client certificate during the TLS handshake. Your load balancer either validates the certificate or forwards it to Medplum, depending on the verify mode you configure. Medplum then checks the certificate against its trust store and maps it to a known client. Only a trusted, mapped client receives a token, and the access policy attached to that client decides which resources the token can reach. Check each trust boundary separately, because a rejection can happen at the edge or inside Medplum.

Shows where a partner certificate is checked, mapped and turned into an access decision.

Questions buyers ask before hiring help with Medplum mTLS

What drives the cost of an mTLS build for Medplum?

The cost depends mainly on how many trading partners and payers connect, how many certificate authorities and trust stores you must manage, and how much of the load balancer and server configuration has to change. The cost has two parts. You pay for the one-time design and build: certificate trust model, load balancer listener and passthrough settings, Medplum server configuration, and partner onboarding tests. You also pay for recurring work: certificate renewal, trust store updates when partners rotate certificates, and retesting after Medplum upgrades. Ask any provider for a quote that lists these items separately, names who owns each certificate authority, and states what happens when a partner changes its certificate. A fixed-scope quote is easier to compare when the partner count and environments are written down.

How long does an mTLS implementation take?

Duration follows the number of partners, the number of environments and whether your load balancer already passes client certificate details to the application. A single partner on a well-understood load balancer setup is a much smaller job than several payers, each with its own certificate chain, verification rules and test schedule. Partner test cycles are usually the longest step because they depend on other organizations' availability, not on your team. No fixed duration is supplied for this work, so ask the provider to tie the timeline to named partners, named environments and named dependencies, and to flag which steps wait on a partner's response.

What must our team supply before an mTLS project starts?

Most delays come from missing inputs rather than from configuration work. You will typically need:

  • Cloud or data center access to the load balancer, DNS, Medplum server and logging, with change approval where required.
  • A decision on the certificate authority: whether partners' existing CAs are trusted, whether you issue client certificates, and who holds the private keys and renewal process.
  • Named technical and operational contacts at each partner, plus their certificate chains and expected subject or issuer values.
  • Non-production test environments that mirror the production listener and certificate handling, so partner tests reflect production behavior.

Ask the provider to confirm these inputs in writing before the schedule is agreed.

Can our own team set up mTLS using the Medplum documentation?

A capable platform team can work from the Medplum mTLS documentation, but the hard part is usually the surrounding infrastructure rather than the Medplum settings. Your team must confirm how the load balancer terminates TLS, whether it forwards client certificate information, how the Medplum server reads it, and how verification modes behave in your environment. Testing with real partner certificates is also outside what a single team can finish alone. Consider whether you have engineers who have run TLS termination, certificate lifecycle and partner onboarding before. If not, a fixed-scope engagement can cover the design, build, test and handover while your team keeps ownership of the running system.

What changes when a payer makes mTLS mandatory?

Medplum's documentation notes that mTLS is optional but increasingly expected under the Da Vinci Prior Authorization Support specification and electronic prior authorization under HTI-4, and that some payers are making it mandatory. When a payer makes it mandatory, the change is no longer a preference for your team. You must support client certificate authentication for that payer's traffic, meet its deadline and accept its trust model. Confirm with each payer which certificate authority it accepts, which certificate fields it checks, how it handles revocation and renewal, and what test it requires before go-live. Plan for the payer's schedule, which you do not control, and keep a separate rollback path for that payer's traffic.

Does mTLS replace OAuth tokens or client credentials in Medplum?

No. mTLS authenticates the connection, meaning the client proves its identity with an X.509 certificate during the TLS handshake. Medplum still issues and checks access tokens for the API calls that follow. Medplum's authentication documentation also covers client credentials for server-to-server access and signed JWT client assertions, so the right combination depends on what each partner or payer specifies. Ask the provider to map each partner to its required method and confirm whether certificate-bound tokens are needed for that partner, since that choice changes how tokens are issued and checked.

Who is responsible for certificate renewal and revocation after go-live?

Responsibility stays with the organization that runs the certificates, and this must be written down before go-live. Certificates expire, partners rotate keys, and revocation requests arrive at inconvenient times. Each certificate needs an owner, a renewal date, a documented trust store update procedure and a tested way to revoke access for a compromised client. Ask whether the provider will hand over runbooks and alerts for expiry, and whether ongoing support is included or handled under a separate retainer. Recurring costs come from these tasks, so include them when comparing offers.

Does DeployOpen issue mTLS certificates or audit reports for us?

DeployOpen plans, implements, hardens and documents self-hosted open-source platforms in your own infrastructure, including the mTLS setup and the evidence your compliance team needs. DeployOpen does not issue audit reports, attestations or certifications. Independent auditors and certification bodies do that work. Certificate authority decisions remain yours or your partners', and DeployOpen does not act as a public certificate authority. Confirm in the written scope which certificate authority, which keys and which partner tests the engagement covers before work starts.

Who owns each part of an mTLS rollout

The partner's engineering team owns the client side of the handshake. They generate or obtain the X.509 client certificate, configure their outbound HTTP client to present it, and send requests to the Medplum endpoint agreed with the client. Their work is only verifiable once the client's infrastructure accepts the certificate, so they should expect to run test calls against a non-production endpoint before any production cutover.

  • Key and certificate handling: Keep the private key on the partner's own systems, record which certificate authority issued the client certificate, and track its expiry date so rotation does not interrupt traffic.
  • Client configuration: Set the TLS client certificate and key in the HTTP client used for FHIR calls, and confirm the certificate chain sent matches what the client's trust store expects.
  • Token request flow: Confirm how the partner obtains and refreshes tokens after the TLS handshake succeeds, including any certificate-bound token behavior the client has enabled.
  • Test evidence: Capture handshake logs, rejected-certificate responses and successful FHIR calls, and keep them with the change record.
  • Incident contacts: Name an on-call owner who can replace a compromised certificate within the window the client's security policy requires.

Before go-live, check that the partner can reproduce a failed handshake on purpose and that the error they see matches the one the client's operations team documented.

How DeployOpen scopes and delivers Medplum mTLS work

DeployOpen plans, implements, hardens and documents self-hosted Medplum inside your own infrastructure, so the client certificate chain, trust store, load balancer settings and token behavior all run in the cloud accounts or data centers you control. The work is delivered as a fixed-scope engagement. Before anything is built, the scope, deliverables and timeline are agreed in writing, and a quote follows from that written scope. For mTLS, the scope usually needs to name each trading partner or payer that will present a certificate, which certificate authorities you will trust, how revocation will be handled, and whether certificate-bound tokens are in scope or deferred.

Because mTLS sits in front of PHI-bearing FHIR endpoints, DeployOpen can also test the finished setup. The security testing covers whether a client without a trusted certificate is rejected, whether a valid certificate from an untrusted issuer is refused, whether tokens are bound to the presenting certificate, and whether certificate details reach Medplum in the form the access logic expects. Testing ends with a findings report, fixes agreed with your team, and a retest to confirm the fixes hold. Ask for the test cases and their pass criteria in the written scope so your own security and compliance teams can review them.

After go-live, ongoing support is available as a retainer. Covered work typically includes Medplum version upgrades, certificate rotation runbooks, trust store updates as partners change, and periodic retesting. Before you request a quote, confirm which partners and payers will connect, which Medplum version you run, and who on your side owns certificate issuance. Those answers determine the scope, and the scope determines the quote.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.