Sharing a single Orthanc study with secure links
A clinician often needs a referrer or patient to see one study without creating an Orthanc account. The practical answer is a time-limited publication link that grants access to that single study, enforced by the Orthanc advanced authorization plugin rather than by sharing the archive's own login. The plugin forwards the token carried by each REST request to an external web service, which decides whether the request is allowed and returns HTTP 403 when it is denied. That external service is where link logic lives, so the decision is made outside Orthanc and can be reviewed, changed and logged by your own team.
The orthanc-auth-service reference project implements this pattern with Keycloak-issued user tokens and is built around Orthanc Explorer 2. It is a reference, not a finished product: the link generation, the token scope that limits each link to one study, the expiry behavior and the audit trail all have to be confirmed in the exact versions and configuration you plan to run. Check that each publication token is bound to one study identifier and that a token cannot be replayed against other studies, the /tools/execute-script and export routes stay disabled as the Orthanc security FAQ advises, and the plugin version you test matches the Orthanc release you deploy. Ask the Orthanc Team or the project maintainers for the documented expiry and audit behavior, and verify both with a negative test: an expired link, a link for study A used against study B, and a request with no token should all return HTTP 403.
How a shared study link reaches the viewer
The flow starts in the reader's browser, which opens a publication link into the Stone Web or OHIF viewer. Each REST request the viewer makes carries a token through the reverse proxy into Orthanc, where the advanced authorization plugin forwards that token to the external authorization web service. The service checks it with the identity provider and returns an allow decision or HTTP 403. Check that the proxy is the only element on the internet side of the trust boundary and that every path to Orthanc passes through the authorization check.
Token-checked request path from the reader's browser to Orthanc.
When a study link fits better than a staff account
Choose a time-limited link for one study when the recipient needs to see that study once or briefly and will not need anything else from the archive. Choose a named account when the person works with Orthanc repeatedly, needs to search or browse, or belongs to your organization and must be managed like any other user. The first question to settle is whether recipients authenticate at all. An unauthenticated link is a bearer credential: whoever holds it can open the study until it expires. An authenticated link, where the recipient signs in through an identity provider before the viewer opens, ties each view to a person. That single choice determines the identity work, which viewer you can put in front of the recipient, and how much audit detail you must keep.
The recipients fall into groups with different needs. Referrers and outside clinicians usually want one study, quickly, in a browser, and may have a credential you can federate. Patients usually have no institutional account and no clinical training, so their access is almost always link-based and should be the most tightly scoped. Within your own organization, a staff member who needs a study from another site may be better served by a standing account with defined roles than by a series of links. Write down, for each recipient group, whether they can be identified reliably, what they will do with the study, and whether they need to return to it.
The expiry window should follow the clinical purpose, not a default. A referral review may need a few days, while a patient reviewing a result may need a shorter period. Confirm the expiry behavior with your Orthanc build and the publication component you plan to use, including whether a link can be revoked before it expires, and whether a link is bound to one study or can expose linked objects. A link to one study is narrower than a staff account only if the underlying authorization really restricts the token to that resource. Broad archive access lets a holder query, retrieve and sometimes modify many studies, so verify that the publication path cannot reach beyond the shared study, and test it with a second study before go-live.
Choosing the viewer, identity source and link model
This table compares the main choices for sharing one study: which viewer the recipient uses, where the user token comes from, how the link is issued, and how wide the access scope is. Read each row against your referral or patient workflow, then confirm the listed points with the viewer, plugin or identity project before you commit to a design.
| Decision | When it fits | What it requires from the team | What to confirm |
|---|---|---|---|
| Stone Web viewer for the recipient | Referrers or clinicians who already use Stone in your environment and need quick study review in a browser | Stone and DICOMweb enabled on Orthanc, a reverse proxy in front of both, and browser support checked for each recipient group | Which Stone features are available to external recipients and how the viewer is protected when the link is opened |
| OHIF viewer for the recipient | Recipients who expect a widely used open-source viewer and need multi-series review with standard tools | OHIF configured against the DICOMweb endpoint, the same token checks in front of it, and testing on the browsers recipients use | Which OHIF version is supported with your Orthanc release and which tools are enabled for shared sessions |
| Keycloak-issued user tokens | Organizations that already run Keycloak for workforce sign-in and want one identity source for staff and link holders | A Keycloak realm, clients for the viewers, token lifetimes set, and the authorization plugin configured to validate each token | Token claims the reference project expects, lifetime and refresh behavior, and how Keycloak HA and database replication are operated |
| Tokens from another identity provider | Organizations whose identity provider is already fixed by policy, such as an enterprise directory with OIDC support | Confirmed OIDC or JWT compatibility, claim mapping into the authorization rules, and a test of token expiry and revocation | Whether the orthanc-auth-service project and the authorization plugin accept its issuer, signing keys and claim format |
| Publication link from orthanc-auth-service | Time-limited, single-study access for a referrer or patient who should not need an account | A publication service in front of Orthanc, expiry settings, a way to issue and revoke links, and logs of each link use | Whether revocation, link reuse limits and audit output meet your policy, and how the project is maintained |
| Sign-in through Orthanc Explorer 2 | Staff who need broader search and administration in the Orthanc interface | Explorer 2 with authentication enabled, users defined and tied to roles, and HTTPS through a reverse proxy | Which roles the authorization plugin enforces in Explorer 2 and how users are provisioned and removed |
| Single-study scope | Referral reviews and patient access to one exam, where the least access is the goal | Scope rules that bind the token to one study identifier, and tests showing other studies return a denial | That the authorization plugin can enforce study-level scope for the viewer requests you use |
| Patient or archive scope | Staff or specialist groups who must browse prior studies for the same patient or a wider set of records | Broader role and patient rules, more review of who holds the permission, and stronger audit coverage | How patient-level filters are applied, whether they match your access policy, and what evidence your privacy office expects |
Setup sequence for study publication links
This sequence takes an Orthanc archive from a locked-down baseline to one where a referrer or patient can open a single study through a time-limited link, and every other request is refused. Each step ends with a check you can run before moving on. Confirm the exact plugin and identity provider versions against your own environment before you begin.
Confirm Orthanc and plugin versions
Your infrastructure or platform team records the Orthanc core version, the viewer plugin versions, the authorization plugin version and the identity provider version that will be used together. Check the Orthanc NEWS file for the release you run, and confirm with the vendor or project that the viewer and authorization plugin builds are compatible with that core. Keep this record with the change ticket. The step is done when every component has a version written down and the team has confirmed the combination is supported.
Lock down the Orthanc server configuration
Your Orthanc administrator edits the server configuration before any sharing feature is switched on. Enable RemoteAccessAllowed only when the server sits behind HTTPS and a reverse proxy, and set AuthenticationEnabled to true with users defined in RegisteredUsers. Confirm that the /tools/execute-script route and the export route stay disabled, since the Orthanc security documentation warns that they can run system commands or overwrite files. The check is a request from outside the trusted network that receives an authentication challenge, and a request to a disabled route that is refused.
Deploy the identity provider for sharing
Your identity team deploys the identity provider that will issue tokens for shared access. Keycloak is one option that the orthanc-auth-service reference project uses, and it runs on a production-grade database with a high availability design that you select up front. Create a realm and client for study sharing, and keep the link audience separate from staff accounts. The step is done when the identity provider issues a test token for a test account over HTTPS and the token contents match the claims your authorization design needs.
Install the authorization plugin and service
Your Orthanc administrator installs the advanced authorization plugin and deploys the authorization web service that it calls. The plugin forwards each REST request's token to that service, which decides access and returns HTTP 403 when access is denied. The service checks the token signature, the expiry and the study identifier in the request against the link being presented. The check is a token from a valid user being accepted for its own study and refused for another study in the same archive.
Configure the Stone or OHIF viewer
Your imaging team enables the Stone Web viewer or the OHIF viewer plugin and points it at the protected DICOMweb endpoint. Confirm that the viewer passes the user's token on every request, since the authorization plugin cannot decide access for a request it does not see. Publication links are generated by the authorization service for one study, and the viewer should open only that study. The check is that the link opens the study in the browser and that the viewer shows no study list or other study identifiers.
Test allowed and denied requests for one study
Your security or QA engineer runs a scripted set of requests against one test study. Requests with a valid link should return the study, requests for a second study with the same link should return HTTP 403, requests with an expired token should be refused, and requests with no token should fail authentication. Record each result with its timestamp and token identifier. The step is done when every expected result matches and the test record is attached to the change ticket for the auditor.
Verify expiry and audit logging before go-live
Your operations team confirms that links expire at the time the service has set and that the Orthanc and reverse proxy logs record each access with the study, the token subject and the outcome. Check that the log retention period meets your policy and that someone is responsible for reviewing denied requests. Confirm with your compliance lead which evidence an auditor will ask for, since DeployOpen prepares evidence but independent auditors and certification bodies make the assessment. The step is done when a sample link is shown to expire and its access records can be retrieved for a single study.
Security risks in shared study access
Sharing one study with a referrer or patient creates a short-lived path into an archive that holds identifiable images. The cards below cover the places where that path tends to leak, widen or outlive its purpose, and each names a control you can check before go-live.
Token exposure in links
A publication link that carries a bearer token gives anyone who receives or intercepts it the same access as the recipient. Treat the link as a credential: confirm that tokens are short-lived, single-study and signed by the identity provider, and that the authorization plugin rejects a token whose signature, issuer or audience does not match. Test by replaying a link after its expiry and after a logout.
Authorization plugin docsBrowser history and referrer leakage
Tokens placed in URLs end up in browser history, proxy logs, analytics scripts and the Referer header when a viewer loads external resources. Confirm that the viewer page sets a restrictive referrer policy, that the token is exchanged for a session cookie or header early, and that reverse proxy access logs redact query strings. Ask your team to inspect the network traffic of a real publication session.
Over-broad permissions in the authorization service
The authorization service decides what each token may read, so a permissive rule can expose the whole archive to a link meant for one study. Check that the service scopes every decision to the study identifier in the request, denies by default and returns HTTP 403 for anything outside that scope. Run a test where a valid token for study A is used to request study B, its instances and its series.
Disabled routes that must stay disabled
Two Orthanc routes deserve particular care. The /tools/execute-script route can run system commands for a malicious user, and the export route can overwrite files, so both should remain disabled on any server that receives shared links. Verify the live configuration rather than the template, and confirm that a shared-link token cannot reach either route through the viewer or a proxy path.
Orthanc security FAQPlain HTTP exposure outside localhost
By default Orthanc accepts HTTP connections only from localhost. When remote access is enabled, authentication must be turned on with registered users, and the docs recommend HTTPS through a reverse proxy for Internet exposure. Confirm that no publication link works over plain HTTP, that TLS terminates with a certificate you manage, and that the Orthanc port is not reachable from outside the proxy.
Orthanc security FAQOperational burden of revoking access
A link that cannot be revoked before its expiry is a risk until the clock runs out, and expiry alone does not cover a recipient who leaves an organization or a misdirected email. Ask who can revoke a link, how quickly the authorization service honors revocation, and whether each publication is logged with its creator, recipient and study. Rehearse a revocation and record the result in your audit trail.
Keycloak admin docsExpiry and audit of shared Orthanc study links
Expiry and audit are not automatic features of the advanced authorization plugin. The plugin forwards each REST request's token to an external web service, and it enforces whatever that service decides, returning HTTP 403 when access is denied. If the web service issues long-lived tokens, never checks expiry, or does not record its decisions, the plugin will faithfully enforce that weakness. Expiry and audit therefore belong to the design of the web service and the identity provider behind it, and they must be specified before a publication link goes to a referrer or patient. In the orthanc-auth-service reference project, user tokens are issued by Keycloak, so the lifetime, refresh behavior and revocation options of those tokens are the first settings to review.
Confirm the token lifetime and how it is set. Find the access token lifetime for the link-specific token, not only the default for interactive users, and confirm whether the link token can be refreshed. Ask who can change that setting, whether changes apply to tokens already issued, and how the value is tested. Then confirm how a link is revoked before it expires. A short lifetime limits exposure but does not stop a forwarded link, so you need a documented path to disable a user, session or publication immediately, and a test that proves a revoked token receives HTTP 403 from Orthanc on its next request.
Confirm where access decisions and Orthanc REST requests are logged, how long those logs are kept, and whether they record which study was opened. Orthanc's own log and the web service's decision log are separate sources, so ask for both and check that they share a timestamp and token or user identifier. A log that shows only that a request succeeded is not enough. It should show the study identifier, the requesting identity and the outcome. Set a retention period that your privacy and records policies require, and confirm that the logs are stored outside the Orthanc host so a compromised archive cannot erase them. Review the Orthanc security FAQ alongside these checks, since it covers the access settings that the audit depends on.
Questions teams ask before sharing studies by link
What drives the effort and cost of a study sharing build?
The cost is driven by how many parts of the chain have to be built and how many of them already exist. The main components are the publication link flow for Stone and OHIF, the token checks in the Orthanc authorization plugin, the identity provider configuration, expiry and revocation logic, and the logging you need for review. Each component is a one-time build cost, while patching, certificate renewal, identity provider upgrades and periodic access reviews recur. A quote should list each component separately, state which systems you already run (Orthanc version, identity provider, reverse proxy), and say who maintains the result after handover. Ask for the written scope before work starts, since engagements are fixed-scope.
Can our team build study sharing links internally?
Yes, if you have engineers who know Orthanc's authorization plugin, the REST API and your identity provider. The work spans three skill areas: Orthanc configuration and plugins, token issuance and validation, and reverse proxy and network controls. Teams without one of those areas often underestimate the testing load, because the access rules must be checked for every route the viewers call, not only the login page. Compare your staff's time against a written scope, and decide who will own upgrades of Orthanc and the identity provider after go-live. DeployOpen can plan, implement, harden and document this work in your infrastructure, or support your own team as an outside reviewer.
What does the work need from our identity and network teams?
The identity team typically provides or approves the identity provider, the client registrations for the viewers, token lifetimes and the user groups that may create links. The network team provides the HTTPS endpoint, reverse proxy rules, firewall paths to Orthanc and any restriction on which networks can open a link. Both teams should agree early on where tokens are signed, how keys rotate and which logs leave the network. Keycloak documents high availability designs that need a synchronously replicated database, so if you plan a clustered identity service, the database team should be involved from the start.
How long does a study sharing build take?
No duration is fixed by the sources for this work, so the timeline depends on the scope you agree. The main drivers are the number of viewers and user roles, whether an identity provider already exists and is configured for Orthanc, how many environments you need (test, staging, production), the number of approval and review steps, and the amount of security testing scheduled before go-live. A scope document should state the phases and the review gates. Ask for milestones tied to deliverables, and confirm what your own teams must provide and by when, since waiting on access or approvals often sets the schedule.
Can a shared link be limited to one study?
Yes, a link can be scoped to a single study when the authorization check compares the study identifier in the request with the identifier granted in the token. The Orthanc advanced authorization plugin forwards each REST request's token to an external service, which decides access and returns HTTP 403 when access is denied. That external service is where the study-level rule lives, so it must check the requested resource on every call, including the instance and series requests a viewer makes. Test that a token for one study cannot open another study, that it cannot list the patient's other studies, and that it fails on export or script routes. Keep the export and script routes disabled, as the Orthanc security guidance recommends.
How does revocation of a shared link work?
Revocation depends on how the token is designed. If tokens are short-lived and checked only by signature, a revoked link keeps working until expiry, so revocation needs a server-side check. A common pattern is to store a link record with an identifier, expiry and revoked flag, and have the authorization service consult that record on each request. Decide in the design phase which revocation window is acceptable for your risk profile, and whether the identity provider can revoke sessions that the viewer already holds. Test revocation as a release criterion: revoke a link, then confirm that the viewer, a direct API call and a cached browser session are all refused.
What audit evidence can we keep for shared links?
Keep records that show who created each link, for which study, with what expiry, when it was used, from which address, and when it was revoked or expired. Those records come from three places: the link service, the authorization plugin decisions (including denied requests), and the reverse proxy access log. Store them in a system the security team controls, with retention set by your policy. Note that DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports or certifications; an independent auditor or certification body makes that determination. Ask your auditor which evidence format they accept before the logging design is frozen.
Limits to confirm in your environment
The secure-link pattern depends on a reference project, an Orthanc release, a viewer token flow and an identity stack that each have their own limits. Confirm these before you commit to a design, because a working demo can hide gaps in version compatibility, operations and auditability.
Reference project maturity and compatibility
The orthanc-auth-service project is a reference implementation, not a supported product with a release promise. Ask the project maintainers which Orthanc versions and authorization plugin versions it was tested against, and compare that list with the Orthanc release you plan to run. Orthanc 1.13.0 is the latest release in the supplied facts, so check whether the reference project has been validated against it before you assume the flow works unchanged. Treat any mismatch as a patch and retest task in your plan.
Authorization plugin docsDependence on Orthanc Explorer 2
The reference flow is built around Orthanc Explorer 2 with Keycloak-issued user tokens. If your organization runs the legacy Orthanc interface or another front end, the token handling and login redirects will not carry over. Ask the project whether the publication link flow works without Orthanc Explorer 2, and if it does not, budget for the interface work and its testing as part of the scope.
Stone and OHIF token support
Stone Web and OHIF each handle authentication headers and token refresh in their own way, and the link a referrer opens may land in either viewer. Confirm with the viewer documentation and in a test browser that each viewer sends the bearer token on every DICOMweb request, handles expiry without a broken session and does not cache tokens in ways that outlive the link. Test both viewers with an expired and a revoked token before go-live.
Keycloak release and database choices
Keycloak releases are frequent, and the current release in the supplied facts is 26.8.1. Confirm which Keycloak version your security team has approved, how your operator update approval works and whether your database is on the supported list. Decide between automatic and manual schema migration before the first upgrade, and confirm that your high availability design uses a synchronously replicated database, because those choices change how often the link service can be upgraded safely.
Keycloak database guideDemo versus production audit trail
A demo proves that a link opens a study. It does not prove who opened it, from where, when the link was issued and who revoked it. Ask your security team which events must be recorded for each link, where the logs are stored, how long they are kept and who can read them. Confirm that Orthanc access logs, identity provider events and the publication service logs can be correlated by link or token ID, and test that the trail survives an Orthanc restart and a Keycloak upgrade.
How DeployOpen scopes and delivers study sharing
DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure, including the Orthanc deployments that sit behind study sharing. For single-study links, the work starts with a written scope that defines which viewers, which link lifecycle and which audit trail your organization needs.
How we scope
- Written scope lists which viewer serves shared links, such as Stone Web or OHIF, and who receives them.
- Scope defines link lifetime, revocation rules, and who may create publication links inside Orthanc.
- Scope names the identity provider, token checks, audit logging and the environment where everything runs.
How we build
- Build covers the orthanc-auth-service publication flow and the authorization plugin's token checks on each request.
- Testing confirms expired, altered and out-of-scope tokens are refused with HTTP 403 for other studies.
- Build includes verifying that disabled routes such as /tools/execute-script stay disabled in the deployed setup.
How we hand over
- Handover documents the link lifecycle, token settings, revocation steps and where audit records are kept.
- Deliverables include configuration records, a retest report and the runbook your operators will follow.
- Your team receives walkthroughs of how to investigate who opened a shared study and when.
How we support
- Ongoing support covers Orthanc, viewer and identity provider upgrades after go-live, available as a retainer.
- Retainers can include recurring testing of shared-link access after each platform change.
- Support scope is agreed in writing, so you know which upgrades and fixes fall inside the retainer.

