dcm4che-dockerfiles / dcm4chee-arc-psql

35 stars 50 forks source link

Configuration of web service URL path #11

Closed hackermd closed 3 years ago

hackermd commented 3 years ago

When the archive sits behind a reverse proxy, the values of the RetrieveURL attributes included in search results may be incorrect and bulk data cannot be retrieved.

How can the path of the Service URL be configured to use an alternative path (e.g., /dicomweb instead of /dcm4chee-arc/aets/DCM4CHEE/rs)? It would be great if this would be configurable via an environment variable (e.g., DICOM_WEB_SERVICE_URL_PATH)

gunterze commented 3 years ago

s. Archive Device attribute:

Name Type Description (LDAP Attribute)
Remap Retrieve URL string Remap Retrieve URL used in QIDO-RS and WADO-RS Metadata responses. Optionally prefixed with “[]”. E.g.: “[cache-proxy]http://cache-proxy:8080”. If absent or if the specified does not match, scheme and server authority of the QIDO-RS or WADO-RS request URL are used. (dcmRemapRetrieveURL)
hackermd commented 3 years ago

Thanks @gunterze. I was wondering whether this attribute (and potentially other archive device attributes) could be configured during the container build process, for example via an environment variable? Having to go through LDAP, one has to wait until the entire system is up and running (including the LDAP container), which complicates container orchestration.

gunterze commented 3 years ago

You may provide a LDIF file which set this attribute to a particular value, map it into the LDAP container - or build your own LDAP docker image based on the provided one, including the LDIF file already into the docker image - and append the file path to passed LDAP_INIT_CONFIG.

hackermd commented 2 years ago

@gunterze could you please provide a concrete example for the LDIF file?

What dn do I need to use to change the attribute?

dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
changeType: modify
replace: dcmRemapRetrieveURL
dcmRemapRetrieveURL: http://localhost:8008/dicomweb

Gives me ldap_modify: No such object (32)

hackermd commented 2 years ago

Never mind @gunterze. I forgot to provide the default configuration.

hackermd commented 2 years ago

However, the dcm4chee-arc/aets/DCM4CHEE/rs path remains in metadata values of QIDO-RS and WADO-RS response message payloads. In this case, the values have prefix http://localhost:8008/dicomweb/dcm4chee-arc/aets/DCM4CHEE/rs/studies. I need that prefix to be http://localhost:8008/dicomweb/studies instead. What am I missing?

hackermd commented 2 years ago

I tried setting dcmWebServicePath:

dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
changeType: modify
replace: dcmWebServicePath
dcmWebServicePath: /

But that doesn't work.

@gunterze it would be great if you could provide a complete example.