Multi-Tenant DICOM Architecture in the Cloud
- DICOM network handshakes carry no tenant metadata, unlike HTTP headers, subdomains, or API tokens.
- Calling AE titles and sender IP addresses are unreliable for identifying which hospital sent a study.
- DICOM patient and institution tags are locally scoped and inconsistent, so they should not be used to route tenants.
- Three isolation patterns exist: port-per-tenant listeners, hostname-based routing via TLS SNI, and mutual TLS client certificates.
- Mutual TLS lets a service validate sender identity before accepting or parsing any DICOM data.
When building multi-tenant web applications, tenant isolation is familiar territory. You check an incoming Authorization header, inspect a subdomain, or query a tenant table. Every request identifies who sent it before your application executes business logic.
Building a cloud platform that receives medical imaging directly from hospital scanners or PACS turns this model upside down. Classic DICOM network communication relies on DIMSE protocols over raw TCP sockets on port 104 or 11112. The protocol has no concept of HTTP headers, tenant subdomains, or API tokens.
If your product receives imaging from twenty hospital networks at once, you must know with absolute certainty which hospital sent each image. Mixing up imaging data between clinical sites is an immediate patient safety hazard and a catastrophic privacy breach.
Architecting safe multi-tenancy for DICOM requires shifting your isolation boundary from application code down to the network connection itself.
Why standard web multi-tenancy fails for DICOM
In web software, multi-tenancy relies on explicit metadata in the transport wrapper. An HTTP client connects to hospital-a.yourcloud.com or attaches a signed token that maps directly to an organization ID.
DICOM network traffic operates on raw TCP sockets defined in DICOM Part 8 (PS3.8). A sending modality initiates an association by sending an A-ASSOCIATE-RQ packet. This handshake contains three network identifiers: the Called Application Entity (AE) title, the Calling AE title, and the IP address of the sender.
None of these fields provide reliable tenant isolation.
Calling AE titles are 16-character ASCII strings configured manually on hospital consoles. Modality technicians often leave them set to generic vendor defaults like STORESCU, SCANNER1, or ORTHANC. Two completely unrelated hospitals will frequently send data using the exact same Calling AE title. Relying on the Calling AE title to decide which customer account owns an incoming study leads directly to data collisions.
Relying on sender IP addresses is equally fragile. Hospitals connect to the internet through outbound corporate firewalls and network address translation (NAT) gateways. Multiple clinics within a regional health system often share a single public IP pool. Worse, public IP addresses change whenever hospital IT reconfigures WAN routing or migrates internet service providers.
Why you cannot rely on DICOM tags to identify tenants
When engineers discover that the DICOM network handshake lacks tenant metadata, the most tempting workaround is parsing the imaging payload. The reasoning seems simple: wait for the C-STORE command, read the patient or institution tags inside the DICOM header, and route the study to the matching customer account.
This approach is dangerous in production.
First, standard clinical identifiers are locally scoped, not globally unique. While SOP Instance UIDs and Study Instance UIDs are globally unique, clinical identifiers like Patient ID (0010,0020) and Accession Number (0008,0050) are assigned independently by each hospital’s local information system. Hospital A and Hospital B will both have a patient with ID 10042 or an accession number 2026-001. If your ingestion layer routes or indexes studies by clinical tags, studies from separate hospitals will collide.
Second, institution tags are inconsistent. Tags such as Institution Name (0008,0080) and Institutional Department Name (0008,0082) are free-text strings typed into modality configuration screens by human technicians. A single hospital site might submit images labelled Memorial Hospital, MEMORIAL HOSP, Main Campus Radiology, or leave the tag blank. Writing string-matching rules to resolve tenant identity creates brittle pipelines that fail silently on new modalities.
Most critically, inspecting payload tags violates the principle of least privilege. To read a DICOM tag, your service must accept the TCP connection, negotiate the association, buffer untrusted binary data, and parse the data element stream. If an unauthorized system connects to your listener, you have already accepted and parsed untrusted patient health information before verifying who sent it.
How do you isolate hospital senders in a multi-tenant cloud architecture?
Safe multi-tenant ingestion requires isolating senders before parsing any DICOM dataset. There are three architectural patterns engineers use to achieve this, each with distinct operational trade-offs.
Pattern 1: Port-per-tenant listeners
The simplest conceptual model allocates a unique TCP port to each tenant. Hospital A sends to dicom.yourcloud.com:11101, while Hospital B sends to dicom.yourcloud.com:11102. Your ingress listener checks the destination port of the incoming TCP socket and immediately maps the connection to the correct tenant context.
This pattern works in small pilot projects, but it breaks down quickly as you scale. Managing hundreds of open TCP ports across cloud load balancers and container clusters creates operational overhead. Every new customer requires allocating a new port, updating firewall rules, and reconfiguring ingress controllers. Furthermore, many hospital outbound firewalls restrict outgoing traffic to standard port numbers like 104, 11112, or 443, refusing to connect to arbitrary high-numbered ports.
Pattern 2: Dedicated hostnames with SNI
A cleaner approach uses standard port 11112 or 443 and assigns each tenant a unique Fully Qualified Domain Name (FQDN), such as hospital-a.dicom.yourcloud.com and hospital-b.dicom.yourcloud.com.
When the hospital sender connects over TLS, it transmits the requested hostname in the Server Name Indication (SNI) extension during the TLS handshake, as standardized in RFC 8446. Your edge reverse proxy reads the SNI header and routes the raw TCP stream directly to that tenant’s dedicated processing pipeline.
The limitation here lies with legacy hospital hardware. Modern PACS and modern DICOM routers support TLS with SNI. However, older scanners and modalities often run outdated embedded network stacks that do not send the SNI extension during TLS negotiation. If a modality connects without SNI, the edge proxy cannot determine which tenant hostname was requested.
Pattern 3: Cryptographic identity via mutual TLS
The most reliable production pattern uses mutual TLS for DICOM connections, defined in DICOM Part 15 (PS3.15 Annex B) and profiled by the IHE Audit Trail and Node Authentication (ATNA) framework.
In mutual TLS, the client does not just verify the server. The hospital sender must present its own X.509 client certificate during the TLS handshake.
This gives your ingestion layer an unforgeable, cryptographic identity before any DICOM association begins. When a hospital modality initiates a connection, your TLS termination layer validates the client certificate against an authorized registry. By inspecting the certificate identity—such as a dedicated serial number or subject identifier—your edge layer maps the incoming connection to the exact tenant and facility that owns that certificate.
If the certificate is unknown or expired, the TLS handshake terminates immediately with an alert. The remote client never reaches the DICOM application layer, and your cloud service never receives or parses unauthenticated bytes.
Hospital A (Cert A) ──TLS Handshake──► Validate Cert A ──► Tenant A Pipeline
Hospital B (Cert B) ──TLS Handshake──► Validate Cert B ──► Tenant B Pipeline
Unknown Sender ──TLS Handshake──► Handshake Abort (TCP Drop)
The real cost is not the handshake, it is running it for years
Once a connection is authenticated, the isolation problem does not end. Every downstream step has to carry the tenant identity forward correctly. That includes writing the object, indexing its metadata, and notifying a worker. One missed tag on one code path is how a study from Hospital A ends up visible to Hospital B’s account. That is not a bug report; it is a breach notification.
The three connection-level patterns above are not a one-time choice either. Port-per-tenant means a growing list of open sockets and firewall rules to keep straight. SNI-based routing means a fallback path for every hospital whose old scanner firmware skips the extension. mTLS is the right technical call. But it also means you now run certificate issuance, rotation, and revocation for every facility you serve, for as long as they stay a customer.
None of this is DICOM’s fault. The standard gives you a correct way to authenticate a sender. It says nothing about how many hospitals you will onboard next year, or who gets paged when a certificate expires on a Sunday.
That gap, between “the protocol works” and “the ingress survives five years of real hospitals,” is what a managed gateway such as Dicomly is built to close. It issues and rotates the per-facility certificate and terminates the TLS handshake. Your product gets one dedicated endpoint per sending facility, already resolved to the right tenant, delivered as a plain DICOMweb STOW-RS POST to your own HTTPS URL. You still decide how to store and index what arrives; you no longer run the socket layer or the certificate lifecycle behind it. The trade-off is real too: you give up low-level control over the connection, and you pay a per-endpoint fee for it.
If you would rather keep that control and own the full stack, the comparison of a custom DICOM listener versus a managed gateway lays out what that costs in practice.
Next steps
Start at the connection boundary, not the storage schema. Pull the DICOM Conformance Statement for the first modality or PACS you plan to onboard. Check whether it even supports TLS with client certificates — plenty of older hardware does not, and that one constraint decides more of your architecture than any pattern above. Then read why mutual TLS is the right fit for DICOM over the internet before you pick a certificate strategy for more than one hospital.
Dicomly builds infrastructure for healthcare software teams that receive DICOM studies from hospitals. Why we built Dicomly →