How to configure authorizing storage by an external service

vrindanayak edited this page Oct 11, 2016 · 12 revisions
Clone this wiki locally

Overview

This new feature when configured would query an external RESTful service for storage permission before objects are stored on archive. Objects would be stored only if regular expression configured matches with the response received back from the Store Permission Provider.

authorize-storage.puml

Configuration

You may either

  • create a LDIF file (e.g.):

    version: 1
    dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    changetype: modify
    add: dcmStorePermissionServiceURL
    dcmStorePermissionServiceURL: http://host.name/storage-permission/study/{0020000D}?patientId={00100020}&patientIdIssuer={00100021}&studyDescription={00081030}
    -
    
    dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    changetype: modify
    add: dcmStorePermissionServiceResponsePattern
    dcmStorePermissionServiceResponsePattern: "validation"\s*:\s*"true"
    -
    
    dn: dicomAETitle=DCM4CHEE,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    changetype: modify
    add: dcmStorePermissionServiceExpirationDatePattern
    dcmStorePermissionServiceExpirationDatePattern: "expirationdate"\s*:\s*"([0-9]{8})"
    -
    
    dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    changetype: modify
    add: dcmStorePermissionServiceErrorCodePattern
    dcmStorePermissionServiceErrorCodePattern: "errorcode"\s*:\s*"(\p{XDigit}{4})"
    -
    
    dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    changetype: modify
    add: dcmStorePermissionServiceErrorCommentPattern
    dcmStorePermissionServiceErrorCommentPattern: "errorcomment"\s*:\s*"(.*)"
    -
    
    dn: dicomAETitle=DCM4CHEE,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    changetype: modify
    add: dcmStorePermissionCacheStaleTimeout
    dcmStorePermissionCacheStaleTimeout: PT5M
    -
    
    dn: dicomAETitle=DCM4CHEE,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    changetype: modify
    add: dcmStorePermissionCacheSize
    dcmStorePermissionCacheSize: 10
    -
    

    and import it to the LDAP Server by using the ldapmodify command line utility.

  • or use the Add Attribute... and Add Value... function of Apache Directory Studio to add first 5 attributes on Device Level (e.g.: dicomDeviceName=dcm4chee-arc) or on Application Entity Level (e.g: dicomAETitle=DCM4CHEE) of the Archive Configuration. Note that the last 2 attributes can be added only on Device Level.

One may refer to Archive Device to understand the description of attributes.

Refer ISO-8601 Duration format for more know-how on Durations.