Written by Technical Team | Last updated 12.11.2026 | 23 minute read
Healthcare integration platforms routinely exchange clinical information between systems operated by different organisations, hosted in different environments and managed by different technical teams. An integration may connect an NHS trust’s Electronic Patient Record (EPR) to a cloud-hosted application, transmit HL7 messages between hospital systems, or retrieve patient information through a national NHS API.
Securing these connections requires more than enabling HTTPS. The integration must authenticate the systems communicating with one another, validate their permissions, protect cryptographic material and maintain those controls as certificates expire, credentials change and infrastructure is replaced.
Three mechanisms are central to this architecture: mutual Transport Layer Security (mTLS), certificate lifecycle management and secrets management. Their implementation needs to account for how healthcare interfaces actually operate, particularly long-lived connections, integration engines, asynchronous message processing and services that cannot tolerate an unexpected interruption.
Standard TLS authenticates the server to the client and establishes an encrypted connection. When a healthcare application connects to an HTTPS endpoint, it validates the server’s certificate against a trusted Certificate Authority (CA), verifies the requested hostname and negotiates the cryptographic parameters needed to protect subsequent traffic.
Mutual TLS extends this process by requiring the client to authenticate using its own X.509 certificate.
During the TLS handshake, the server requests a client certificate. The client supplies its certificate chain and proves possession of the corresponding private key by signing handshake data. The server validates the certificate against its configured trust policy before allowing the connection to proceed.
This gives both parties cryptographic evidence of the identity of the system at the other end of the connection.
Key security consideration: Implementing mutual TLS (mTLS) is only one part of securing healthcare system integrations. For NHS APIs, HL7 interfaces and FHIR-based services, organisations must also automate SSL/TLS certificate renewal, securely manage API credentials and private keys, and enforce service-level authorisation. Without effective certificate lifecycle management and secrets rotation, even an encrypted, authenticated connection can become a security risk or cause unexpected disruption to critical clinical data flows.
For an integration between a hospital EPR and a third-party clinical application, mTLS can establish that requests originate from an approved integration service rather than an unknown application with network access.
The implementation requires several decisions that are frequently overlooked.
A valid certificate does not automatically mean that a system should be trusted.
Suppose an API gateway accepts client certificates issued by an organisation’s internal CA. Validating the certificate chain proves that the certificate was issued by that CA, but it does not establish whether the certificate belongs to a service authorised to retrieve clinical information.
The gateway should additionally validate the certificate’s identity against an explicit policy.
For example, an integration service could have a certificate containing a URI Subject Alternative Name (SAN): spiffe://healthcare.example.org/integration/epr-connector.
A policy can allow this identity to access a defined set of integration endpoints while rejecting other certificates issued by the same CA.
DNS SANs can also represent service identities, although they need to be assigned and validated consistently. Certificate Common Names should not be used as the primary identity mechanism in new deployments.
For internal services, an effective design is to issue certificates against a controlled identity namespace, with separate identities for each application or workload. Sharing one client certificate across several integration engines makes incident investigation, access control and credential revocation considerably more difficult.
A common deployment places an API gateway or reverse proxy in front of an integration service. The gateway terminates external TLS connections, validates client certificates and applies authentication and authorisation policies before forwarding requests.
An illustrative NGINX configuration is:
server {
listen 443 ssl;
server_name integration.example.nhs.uk;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_certificate
/etc/nginx/tls/server.crt;
ssl_certificate_key
/etc/nginx/tls/server.key;
ssl_client_certificate
/etc/nginx/tls/trusted-clients.pem;
ssl_verify_client on;
ssl_verify_depth 2;
location /api/ {
proxy_pass http://integration-backend;
}
}
This configuration enables mandatory client certificate verification using the configured trust store.
It is only a starting point. Production deployments also need an explicit certificate identity allowlist, appropriate cipher configuration, certificate validity and revocation policies, and a secured connection between the gateway and the backend.
Where the gateway forwards the authenticated identity to another service, that identity must come from the validated TLS session rather than a client-supplied HTTP header.
For example, a gateway could inject a verified client identity into an internal header after removing any incoming header with the same name. The backend must only accept that header from the trusted gateway.
If the backend is directly reachable from another network path, an attacker may bypass the gateway and supply a forged identity header. Network restrictions, authenticated internal connections and application-level checks are therefore part of the implementation.
Integration architectures frequently terminate TLS at several points:
Each connection has its own security properties.
Successful client authentication at the first gateway does not automatically authenticate the client to the destination system. The original TLS session has terminated, and downstream services see a new connection originating from the gateway or integration engine.
If the receiving clinical system requires the original application’s identity, that identity must be propagated through a trusted, authenticated mechanism.
For systems exchanging sensitive clinical records, the design should identify exactly where TLS terminates, where traffic is decrypted, which components can inspect patient information and how each subsequent connection is authenticated.
This is particularly relevant when integrating cloud-hosted services with hospital networks through private connectivity, firewalls and integration appliances.
TLS 1.3 should be preferred wherever the participating systems support it. TLS 1.2 may remain necessary for older healthcare applications, provided that secure cipher suites and appropriate cryptographic configurations are enforced.
TLS 1.0, TLS 1.1 and obsolete cryptographic algorithms should not be retained merely to accommodate an undocumented legacy dependency.
When a legacy interface cannot support modern TLS, a controlled gateway can sometimes provide a secure boundary around it. That arrangement does not remove the weakness of the legacy connection, but it can constrain its exposure while the underlying application is upgraded.
Certificate verification must include the trust chain, validity period, appropriate key usage and extended key usage, and the relevant server hostname or client identity.
Revocation checking requires deliberate configuration. Depending on the certificate infrastructure, this may involve Certificate Revocation Lists (CRLs), the Online Certificate Status Protocol (OCSP), short-lived certificates or centrally maintained identity policies.
The selected mechanism should have defined behaviour when revocation information is unavailable. A system that silently stops checking revocation after an infrastructure failure may continue trusting a compromised certificate.
For NHS integrations, the applicable authentication requirements must be taken from the individual service specification. Some national services use OAuth 2.0 with signed JWT client authentication, while certain legacy services use TLS mutual authentication. GP Connect and Spine-connected components may also impose specific certificate trust and identity requirements.
Implementing mTLS independently of those requirements can produce an integration that is cryptographically secure but incompatible with the intended NHS service.
Certificate expiration is a predictable operational event, yet expired certificates continue to cause integration failures because renewal is often treated as an administrative task rather than an engineered service capability.
Healthcare interfaces are particularly exposed to this problem because some connections remain active for long periods, and their configuration may be distributed across multiple integration engines, gateways, virtual machines and application containers.
A certificate replacement process needs to update the relevant systems without creating an interval during which either party rejects the other’s identity.
Every production certificate should have a defined owner, issuing authority, service identity, deployment location, renewal mechanism and expiry-monitoring policy.
The operational record should also identify whether the certificate is used for server authentication, client authentication, message signing or another purpose.
These functions should not be combined unnecessarily. A certificate used to establish an mTLS connection is not automatically suitable for signing application-level messages, and rotating one must not unexpectedly invalidate the other.
Certificate renewal should generate a new private key wherever practicable, rather than repeatedly issuing new certificates against the same key.
This limits the consequences of a previously exposed key and gives each rotation a distinct cryptographic identity.
A certificate management platform can automate the generation of key pairs, submission of Certificate Signing Requests (CSRs), issuance, installation and renewal.
Common approaches include ACME-compatible certificate authorities, enterprise Public Key Infrastructure (PKI), managed cloud certificate services and Kubernetes certificate controllers such as cert-manager.
The right implementation depends on where certificates are used. A certificate installed in a Java application keystore requires a different deployment mechanism from one mounted into a Kubernetes pod or referenced by a managed API gateway.
Consider an integration engine authenticating to a clinical API using a client certificate.
The existing certificate expires on 30 June. A replacement is issued on 1 June, but the receiving system maintains an allowlist of client certificate identities or fingerprints.
Replacing the certificate on the integration engine before updating the receiving system may cause authentication failures.
A safer rotation sequence is:
This requires the receiving system to support a period during which both certificates are accepted.
When trust is based on a CA and a stable SAN identity, the receiving application may not require a configuration change for every renewed leaf certificate. However, systems using certificate fingerprint allowlists or explicit certificate registration will require coordinated updates.
Rotating an issuing CA introduces another layer of complexity. Both the old and new CA chains may need to be trusted during the migration, with careful control over which identities each CA is permitted to issue.
Replacing certificate files does not necessarily replace the certificates being used by existing network connections.
Many HTTP clients maintain connection pools. Integration engines may hold persistent outbound connections, while message brokers and other healthcare middleware can maintain authenticated sessions for extended periods.
In TLS, the client certificate is normally presented during the handshake, not with every HTTP request.
An existing connection may therefore continue using a session established with the previous certificate after new credentials have been installed.
Certificate rotation logic must account for this behaviour.
Depending on the application, it may be necessary to rebuild the TLS context, recreate the HTTP connection pool, reload the service configuration or perform a controlled restart.
Java applications using custom SSLContext instances are a common example. Updating a PKCS#12 keystore on disk does not automatically cause an already constructed SSLContext to load the new certificate.
The application must explicitly rebuild its cryptographic configuration or restart the relevant component.
For high-availability services, certificate changes should be deployed sequentially across instances so that healthy capacity remains available.
Connection draining is preferable to abruptly terminating active requests, especially where an integration is processing clinical updates that cannot simply be repeated without considering their side effects.
Monitoring certificate expiry alone is insufficient.
A certificate might have been renewed successfully but never loaded into the running application. Another certificate may have been deployed correctly but rejected because its SAN does not match the expected service identity.
Operational monitoring should examine both certificate metadata and actual connection behaviour.
Useful signals include certificate expiry dates, renewal job outcomes, the certificate fingerprint currently served or presented by the running service, TLS handshake failures, validation errors and the success rate of authenticated application requests.
Certificate monitoring should cover outbound client certificates as well as externally visible server certificates. Public HTTPS monitoring tools generally cannot discover client certificates stored inside integration engines.
Synthetic connection tests are especially useful. A monitoring service can establish a real authenticated connection with an approved test identity and perform a harmless application-level operation.
This confirms that certificate selection, trust validation, network connectivity and endpoint authorisation continue to operate together.
Rotation procedures should also be tested against malformed certificates, expired certificates, unknown issuers, incorrect SANs and unavailable revocation services.
An automation process that handles successful renewal but cannot recover from partial deployment is not sufficiently reliable for a critical clinical interface.
Mutual TLS protects the connection between systems, but the security of that connection depends on protecting the private keys used to establish it.
Healthcare integration applications also require other credentials, including OAuth client secrets, JWT signing keys, database passwords, service account credentials and vendor-specific API tokens.
These credentials should not be treated as ordinary application configuration.
Integration engines frequently store interface settings in configuration repositories, exported deployment packages or local property files. If credentials are embedded in those artefacts, they can spread into source control, development environments, support archives and backup systems.
Removing a secret from the original configuration does not remove copies that have already been distributed.
A secrets management service provides controlled storage and retrieval of sensitive configuration.
Examples include Azure Key Vault, AWS Secrets Manager, HashiCorp Vault and managed secret stores integrated with Kubernetes environments.
A typical healthcare application retrieves secrets at runtime using its workload identity rather than storing a long-lived vault password alongside the application.
For example, an integration service hosted in Azure can authenticate to Key Vault using a managed identity.
The service is granted permission to retrieve only the secrets required for its operation.
When it starts, the application obtains an access token through the managed identity mechanism and requests the necessary secret or certificate material from Key Vault.
No separately managed client secret is needed to authenticate the workload to Key Vault.
Equivalent patterns can be implemented using AWS IAM roles for workloads or Kubernetes workload identities.
The important property is that the application’s right to retrieve secrets is derived from its deployed identity and controlled permissions.
A single vault containing every credential for an NHS organisation creates an unnecessarily broad security boundary if all integration services can access it.
Permissions should be scoped to individual workloads and operational environments.
A pathology integration service should not be able to retrieve the private keys used by a patient-facing application simply because both applications run within the same integration platform.
Similarly, test environments must not have routine access to production credentials.
This separation reduces the consequences of application compromise and prevents accidental use of production interfaces during testing.
Secret names should be predictable enough for automation but should not contain patient information or sensitive operational details that do not need to be exposed.
Access policies should distinguish between retrieving a secret, updating it, deleting it and managing permissions.
The identity used by a running integration should normally be able to retrieve approved values but not modify its own access policy or arbitrarily replace credentials.
A secret is not automatically safe once it has been retrieved from a vault.
An application may accidentally expose it through debug logging, exception handling, process arguments, temporary files or diagnostic endpoints.
Secrets held in environment variables are convenient, but they remain accessible to processes and operators with sufficient permissions in the execution environment.
Mounted files can provide better control in some deployments, particularly when permissions and filesystem isolation are configured appropriately.
For private keys, hardware-backed key storage may offer stronger protection.
Hardware Security Modules (HSMs) and supported managed key services can perform cryptographic operations without exporting private key material to the application.
This is especially useful for signing operations and other workflows where the key can remain within the cryptographic service.
For mTLS, the application or TLS proxy must support using the non-exportable key through the relevant cryptographic provider or signing interface. Simply storing a certificate in an HSM-backed service does not mean that every HTTP client can use it directly.
Where private keys must be loaded into application memory, their exposure should be minimised through process isolation, restricted diagnostic access and controlled handling of crash dumps.
Secrets should also be excluded from routine application logs and distributed tracing attributes.
In a healthcare integration environment, this includes checking whether middleware error handlers record HTTP Authorization headers or complete message payloads when outbound requests fail.
Certificate rotation and secrets rotation have similar operational objectives but different implementation constraints.
Rotating a certificate generally involves issuing new cryptographic material and ensuring that both communicating systems accept it.
Rotating a database password or API secret requires updating the credential at the authority that validates it and then updating every dependent application.
The order of these operations determines whether the service remains available.
A secrets manager should maintain identifiable versions of credentials.
For instance, an integration application’s database credentials might be represented by a current version and a pending replacement.
A rotation workflow creates a new credential, configures it on the target system, tests authentication and only then promotes the new secret for application use.
If the target system supports multiple valid credentials, the old credential can remain active temporarily while application instances migrate.
If only one password can exist for an account, uninterrupted rotation becomes harder. The design may require separate database accounts, a credential broker, coordinated application reloads or another mechanism that allows the application to transition without an authentication gap.
For credentials that support overlapping validity, the system should verify the replacement before disabling the old credential.
This also makes rollback possible without immediately restoring a potentially compromised secret.
Retrieving every credential from a vault for every API call introduces avoidable latency and a dependency on vault availability.
Most applications therefore cache secrets for some period.
However, an indefinitely cached secret defeats the purpose of automated rotation.
A practical implementation combines controlled caching with a refresh mechanism.
The application can retrieve a secret at startup, associate it with its version identifier and periodically check whether a newer version is available.
Alternatively, a deployment controller can watch for changes and trigger a controlled application reload.
The exact strategy depends on the credential type and client library.
Database connection pools may need to be rebuilt when passwords change. OAuth clients may need to reconfigure token acquisition. TLS clients may need to recreate their SSL context.
Credential refresh should also be separated from the processing of individual clinical messages.
If an integration is transforming and delivering a batch of pathology results, it should not unexpectedly lose access to the destination system halfway through processing because one worker reloaded its credentials before another.
Controlled connection replacement, message acknowledgement and retry behaviour must work together.
In Kubernetes environments, cert-manager can automate certificate issuance and renewal using supported issuers.
Applications can consume issued certificates through mounted Kubernetes Secrets, while additional controllers may synchronise credentials from external vaults.
However, mounting a refreshed Secret into a pod does not guarantee that the application reloads it.
Some runtimes monitor certificate files and rebuild their TLS configuration. Others load the certificate once when the process starts.
Secrets provided through environment variables generally require a container restart to pick up changed values.
Applications using mounted secrets should also support the filesystem update mechanism used by Kubernetes. File replacement can occur through atomic updates and symlink changes rather than an ordinary write to an existing file.
A robust deployment design tests these behaviours using the actual runtime and application libraries, rather than assuming that automatic secret synchronisation provides automatic credential rotation.
Where a service mesh provides mTLS between workloads, workload certificate issuance and renewal may be handled by the mesh control plane.
That arrangement can reduce application-level certificate management for internal traffic, but it does not automatically satisfy external partner certificate requirements.
A healthcare application may still require a separately registered client certificate to connect to an NHS service or third-party EPR.
Deployment pipelines should deploy references to credentials rather than carrying their values.
Infrastructure-as-code can define vaults, secret access policies, certificate issuers and workload identities. The actual private keys and production secret values should remain outside ordinary source repositories and build artefacts.
A deployment pipeline can verify that required secrets exist and that the application identity has the necessary permissions without exposing their contents.
Secrets must also be protected from accidental inclusion in infrastructure state files, generated manifests and pipeline logs.
Where an automation account is permitted to rotate credentials, its privileges should be distinct from those of the application consuming them.
Rotation events should generate an audit record containing the affected credential identifier, version, initiating identity, deployment environment and operation result.
The audit record should not contain the secret itself.
Authentication failures are not always reported clearly by integration software.
A failed mTLS handshake may appear as an HTTP connection error, a Java SSLHandshakeException, an integration engine timeout or a generic failure to connect to the destination endpoint.
The correct diagnosis depends on identifying which stage of the connection failed.
If the server certificate is not trusted, a Java client may report an error such as: PKIX path building failed.
This usually indicates that the client cannot construct a valid trust path to a trusted CA, although related certificate validation failures can have other causes.
The appropriate response is to inspect the server’s presented certificate chain and the client’s configured trust store.
Disabling certificate verification is not an acceptable permanent fix.
An incorrect server hostname may produce an error such as: No subject alternative DNS name matching … found.
This indicates that the server’s certificate identity does not match the hostname being requested.
The integration may be connecting through an alias, using an incorrect endpoint or encountering a proxy configured with the wrong certificate.
Certificate hostname validation should remain enabled while the endpoint or certificate configuration is corrected.
Client authentication failures can be more difficult to diagnose because the server may terminate the handshake without returning a detailed application error.
A TLS client can inspect the server’s certificate request and attempt authentication using a specific client certificate.
For example:
openssl s_client \
-connect integration.example.nhs.uk:443 \
-servername integration.example.nhs.uk \
-cert client.crt \
-key client.key \
-CAfile trusted-server-ca.pem \
-verify_return_error
This is useful for inspecting certificate chains and TLS behaviour, but it does not by itself prove that an application request will be authorised.
The diagnostic client must also support a TLS version and signature algorithm compatible with the server, and the correct client certificate chain must be supplied.
Application-level authorisation should be tested separately using a permitted endpoint and an appropriately scoped identity.
A successfully established mTLS connection may still produce an HTTP 401 or 403 response.
This normally indicates that transport authentication succeeded but an application-level authentication or authorisation condition was not met.
For example, an integration might present a trusted client certificate but provide an expired OAuth access token.
Alternatively, the application identity may be recognised but lack permission to retrieve a particular FHIR resource.
A third possibility is that the connection has reached the wrong API environment, where the application is not registered or its credentials are not recognised.
The diagnostic process should distinguish failures at the network, TLS, token validation and application authorisation layers.
This separation is particularly useful with NHS APIs, where application authentication, healthcare worker authentication and resource-level authorisation may be independent processes.
For user-restricted services, a valid system credential does not replace the required user authentication and authorisation flow.
Healthcare integration logging should record enough information to reconstruct a failed request without collecting unnecessary sensitive data.
Useful diagnostic fields include the integration route identifier, destination service, TLS protocol version, certificate identity, certificate fingerprint, correlation identifier and failure classification.
Certificate fingerprints are useful for operational correlation, but log access still needs appropriate controls because these identifiers can expose information about internal systems.
Private keys, API secrets, access tokens and complete authentication headers should never be written to routine logs.
Clinical message bodies should also be excluded from general-purpose infrastructure telemetry unless a specific, controlled diagnostic process requires them.
A correlation identifier can link an inbound clinical message to an outbound API request, retry attempt and final acknowledgement without requiring the full patient record to be copied into every monitoring system.
Security configuration changes can interrupt an integration while clinical messages are in transit.
Consider a pathology integration that receives an HL7 ORU message, transforms it into a FHIR DiagnosticReport and submits it to an EPR.
If the outbound client certificate expires after transformation but before delivery, the interface may be unable to establish its next authenticated connection.
The message should remain available for recovery rather than being discarded.
Durable queues, controlled retries and dead-letter processing can support this, but the retry design must account for clinical transaction semantics.
A connection failure does not always prove that the destination system failed to process the request. The receiving application may have committed an update before the client lost the connection or timed out.
Blindly repeating the request could therefore create duplicate clinical observations, orders or documents.
Integrations should use stable business identifiers, conditional operations or other idempotency controls where supported.
When delivery status remains uncertain, the integration may need to query the destination system before resubmitting a message.
Authentication failures should also be classified differently from transient network failures.
Repeatedly retrying a connection rejected because of an expired certificate does not resolve the problem. It can instead overload monitoring systems, consume worker capacity and obscure the original cause.
A better approach is to suspend or back off affected outbound delivery, preserve queued messages and generate an actionable alert identifying the failed credential or trust relationship.
Once the certificate or secret is corrected, processing can resume under controlled conditions.
Healthcare integrations often cross organisational boundaries. The application provider may own the client certificate, an NHS trust may operate the integration engine, and another supplier may control the receiving endpoint.
Certificate rotation and incident recovery should therefore have an explicit ownership model.
The responsible teams need to know who can issue replacement credentials, who approves certificate identities, who maintains trust stores, who can deploy changes and who is authorised to revoke a compromised credential.
Emergency revocation needs a separate procedure from routine renewal.
If a private key is suspected to have been compromised, maintaining an overlap period solely to preserve connectivity may be inappropriate. The affected identity may need to be disabled immediately, with a replacement credential provisioned through a trusted process.
That decision can cause temporary service disruption, so the integration architecture should provide a way to preserve undelivered messages and recover safely afterwards.
For NHS trust integration environments, these procedures should be reflected in operational runbooks, supplier agreements and change management processes. Certificate inventory and expiry monitoring should cover both centrally managed infrastructure and credentials embedded in individual integration routes.
A production-ready implementation is one in which a certificate can be renewed, a secret can be replaced and a compromised identity can be revoked without requiring engineers to discover undocumented dependencies during an incident.
Mutual TLS establishes authenticated transport connections; certificate automation maintains those identities over time; and secrets management controls access to the cryptographic material that makes them possible. Their effectiveness ultimately depends on the surrounding engineering: explicit identity policies, safe credential transitions, reliable connection handling, adequate monitoring and recoverable clinical message processing.
In a well-designed healthcare integration platform, these capabilities are built into the deployment and operation of each interface, rather than handled as exceptional maintenance activities.
Is your team looking for help with healthcare integration security? Click the button below.
Get in touch