comparison Sphinx/source/plugins/authorization.rst @ 878:2e3493d618ad

auth 0.3.0
author Alain Mazy <am@osimis.io>
date Mon, 26 Sep 2022 19:13:45 +0200
parents f282da89c1c1
children 8b48d42665c4
comparison
equal deleted inserted replaced
877:900033cffeb2 878:2e3493d618ad
50 [...] 50 [...]
51 "Plugins" : [ 51 "Plugins" : [
52 "/home/user/OrthancAuthorization/Build/libOrthancAuthorization.so" 52 "/home/user/OrthancAuthorization/Build/libOrthancAuthorization.so"
53 ], 53 ],
54 "Authorization" : { 54 "Authorization" : {
55 "WebService" : "http://localhost:8000/" 55 "WebService" : "http://localhost:8000/",
56 "WebServiceUsername": "my-user",
57 "WebServicePassword": "my-password",
58 "WebServiceIdentifier": "my-id"
56 } 59 }
57 } 60 }
58 61
59 Orthanc must of course be restarted after the modification of its 62 Orthanc must of course be restarted after the modification of its
60 configuration file. 63 configuration file.
84 87
85 { 88 {
86 "dicom-uid" : "123ABC", 89 "dicom-uid" : "123ABC",
87 "level" : "patient", 90 "level" : "patient",
88 "method" : "get", 91 "method" : "get",
89 "orthanc-id" : "6eeded74-75005003-c3ae9738-d4a06a4f-6beedeb8" 92 "orthanc-id" : "6eeded74-75005003-c3ae9738-d4a06a4f-6beedeb8",
93 "identifier": "my-id"
90 } 94 }
91 95
92 In this example, the user is accessing an URI that is related to some 96 In this example, the user is accessing an URI that is related to some
93 DICOM resource, namely a patient whose DICOM identifier is 97 DICOM resource, namely a patient whose DICOM identifier is
94 ``123ABC``. In such a case, the following fields will be set in the 98 ``123ABC``. In such a case, the following fields will be set in the
107 tag. For a study, it contains its ``StudyInstanceUID``. For a 111 tag. For a study, it contains its ``StudyInstanceUID``. For a
108 series, it contains its ``SeriesInstanceUID``. For an instance, it 112 series, it contains its ``SeriesInstanceUID``. For an instance, it
109 contains its ``SOPInstanceUID``. 113 contains its ``SOPInstanceUID``.
110 * The ``orthanc-id`` field gives the :ref:`Orthanc identifier 114 * The ``orthanc-id`` field gives the :ref:`Orthanc identifier
111 <orthanc-ids>` of the resource. 115 <orthanc-ids>` of the resource.
116 * The ``identifier`` field contains the value of the ``WebServiceIdentifier``
117 configuration or ``null`` if this configuration is not defined. This allows
118 the WebService to identity which Orthanc instance is calling it (new in v 0.3.0).
112 119
113 When the user accesses a lower-level resource in the DICOM hierarchy 120 When the user accesses a lower-level resource in the DICOM hierarchy
114 (a study, a series or an instance), the authorization plugin will 121 (a study, a series or an instance), the authorization plugin will
115 issue one separate call to the Web service for each level of the 122 issue one separate call to the Web service for each level of the
116 hierarchy. For instance, here are the 3 successive requests that are 123 hierarchy. For instance, here are the 3 successive requests that are
271 { 278 {
272 "Name" : "MyOrthanc", 279 "Name" : "MyOrthanc",
273 [...] 280 [...]
274 "Authorization" : { 281 "Authorization" : {
275 "WebService" : "http://localhost:8000/", 282 "WebService" : "http://localhost:8000/",
283 "WebServiceUsername": "my-user", // new in v 0.3.0
284 "WebServicePassword": "my-password", // new in v 0.3.0
285 "WebServiceIdentifier": "my-id", // new in v 0.3.0
276 "TokenGetArguments" : [ "user" ], 286 "TokenGetArguments" : [ "user" ],
277 "TokenHttpHeaders" : [ "hello" ], 287 "TokenHttpHeaders" : [ "hello" ],
278 "UncheckedResources" : [ 288 "UncheckedResources" : [
279 "/series", 289 "/series",
280 "/instances", 290 "/instances",