Mercurial > hg > orthanc-book
comparison Sphinx/source/plugins/google-cloud-platform.rst @ 260:f9e7036d81d0
updating DICOMweb documentation
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 27 Jun 2019 09:46:04 +0200 |
parents | c2c436ce92d6 |
children | d1ef8472b711 |
comparison
equal
deleted
inserted
replaced
259:c2c436ce92d6 | 260:f9e7036d81d0 |
---|---|
14 <https://bitbucket.org/osimis/orthanc-gcp/src>`__ of a plugin to | 14 <https://bitbucket.org/osimis/orthanc-gcp/src>`__ of a plugin to |
15 interface Orthanc with the Healthcare API of `Google Cloud Platform | 15 interface Orthanc with the Healthcare API of `Google Cloud Platform |
16 (GCP) <https://en.wikipedia.org/wiki/Google_Cloud_Platform>`__ through | 16 (GCP) <https://en.wikipedia.org/wiki/Google_Cloud_Platform>`__ through |
17 `DICOMweb <https://www.dicomstandard.org/dicomweb/>`__. | 17 `DICOMweb <https://www.dicomstandard.org/dicomweb/>`__. |
18 | 18 |
19 This GCP plugin notably enables the upload of DICOM images using | 19 This GCP plugin turns Orthanc into a DICOMweb client connected to GCP |
20 STOW-RS, the querying of the cloud content using QIDO-RS, and the | 20 servers, enabling the upload of DICOM images using STOW-RS, the |
21 retrieval of remote content using WADO-RS. These operations can be | 21 querying of the cloud content using QIDO-RS, and the retrieval of |
22 possibly scripted thanks to the REST API of Orthanc. | 22 remote content using WADO-RS. These operations can be possibly |
23 | 23 :ref:`scripted <dicomweb-client>` thanks to the REST API of Orthanc. |
24 Concretely, the GCP plugin manages the credentials to Google Cloud | 24 |
25 Concretely, the role of the GCP plugin is to `manage the credentials | |
26 <https://cloud.google.com/docs/authentication/>`__ to Google Cloud | |
25 Platform. It requires the official :ref:`DICOMweb plugin <dicomweb>` | 27 Platform. It requires the official :ref:`DICOMweb plugin <dicomweb>` |
26 to be installed. As soon as Orthanc is started, the GCP plugin | 28 to be installed, as all the user interactions are done through the |
27 automatically acquires and refreshes the `access tokens | 29 latter plugin. As soon as Orthanc is started, the GCP plugin |
28 <https://cloud.google.com/docs/authentication/>`__, transparently | 30 automatically acquires then periodically refreshes the access tokens, |
29 updating the remote :ref:`DICOMweb servers <dicomweb-client-config>` | 31 transparently updating the remote :ref:`DICOMweb servers |
30 that are known to the DICOMweb plugin. The access tokens can | 32 <dicomweb-client-config>` that are known to the DICOMweb plugin. The |
31 be derived either from service accounts, or from user accounts. | 33 access tokens can be derived either from service accounts, or from |
34 user accounts. | |
32 | 35 |
33 This page makes the assumption that you have created a Google Cloud | 36 This page makes the assumption that you have created a Google Cloud |
34 Platform project, in which you have enabled the `Healthcare API | 37 Platform project, in which you have enabled the `Healthcare API |
35 <https://cloud.google.com/healthcare/>`__, and in which you have | 38 <https://cloud.google.com/healthcare/>`__, and in which you have |
36 created a `DICOM store | 39 created a `DICOM store |
37 <https://cloud.google.com/healthcare/docs/how-tos/dicom>`__. | 40 <https://cloud.google.com/healthcare/docs/how-tos/dicom>`__. |
38 | |
39 Under the hood, the GCP plugin is built on the top of the official | |
40 `Google Cloud Platform C++ Client Libraries | |
41 <https://github.com/googleapis/google-cloud-cpp>`__. | |
42 | 41 |
43 | 42 |
44 | 43 |
45 Compilation | 44 Compilation |
46 ----------- | 45 ----------- |
61 plugin. Pre-compiled binaries for Microsoft Windows `are available | 60 plugin. Pre-compiled binaries for Microsoft Windows `are available |
62 <http://www.orthanc-server.com/browse.php?path=/plugin-google-cloud>`__, | 61 <http://www.orthanc-server.com/browse.php?path=/plugin-google-cloud>`__, |
63 and are included in the `Windows installers | 62 and are included in the `Windows installers |
64 <https://www.orthanc-server.com/download-windows.php>`__. | 63 <https://www.orthanc-server.com/download-windows.php>`__. |
65 | 64 |
65 Under the hood, the GCP plugin is built on the top of the official | |
66 `Google Cloud Platform C++ Client Libraries | |
67 <https://github.com/googleapis/google-cloud-cpp>`__. | |
68 | |
66 | 69 |
67 | 70 |
68 Configuration | 71 Configuration |
69 ------------- | 72 ------------- |
70 | 73 |
74 Dependencies | |
75 ^^^^^^^^^^^^ | |
76 | |
77 As explained above, the GCP plugin requires Orthanc (with version | |
78 above 1.5.4), and the :ref:`official DICOMweb plugin <dicomweb>` to be | |
79 installed (with version above 1.0). All the communications with Google | |
80 Cloud Platform are done using the DICOMweb plugin, and the | |
81 responsibility of the GCP plugin is to aquire and periodically refresh | |
82 the access tokens whose lifetime is limited. | |
83 | |
71 | 84 |
72 Common parameters | 85 Common parameters |
73 ^^^^^^^^^^^^^^^^^ | 86 ^^^^^^^^^^^^^^^^^ |
74 | 87 |
75 As explained above, the GCP plugin requires the :ref:`official | 88 There are some common parameters to be set. Firstly, the ``Plugins`` |
76 DICOMweb plugin <dicomweb>` to be installed (with version above | 89 :ref:`configuration option <configuration>` of Orthanc must contain |
77 1.0). All the communications with Google Cloud Platform are done using | 90 the path that contains the ``OrthancGoogleCloudPlatform`` shared |
78 the DICOMweb plugin, and the responsibility of the GCP plugin is to | 91 library. |
79 aquire and periodically refresh the access tokens whose lifetime is | 92 |
80 limited. | 93 Secondly, obtaining the access tokens for Google Cloud Platform |
81 | 94 necessitates a sequence of HTTPS requests. As a consequence, the |
82 Obtaining the access tokens for Google Cloud Platform necessitates a | 95 Orthanc configuration must specify how the authenticity of the Google |
83 sequence of HTTPS requests. As a consequence, the Orthanc | 96 servers is verified. You have two possibilities to that end: |
84 :ref:`configuration options <configuration>` must specify how the | |
85 authenticity of the Google servers is verified. You have two | |
86 possibilities to that end: | |
87 | 97 |
88 1. Disabling the verification of the remote servers (**not recommended | 98 1. Disabling the verification of the remote servers (**not recommended |
89 in production**). This is done by setting option ``HttpsVerifyPeers`` | 99 in production**). This is done by setting option ``HttpsVerifyPeers`` |
90 to ``false``. | 100 to ``false``. |
91 | 101 |
97 containing a store of CA certificates. Depending on your operating | 107 containing a store of CA certificates. Depending on your operating |
98 system, this file can be found as follows: | 108 system, this file can be found as follows: |
99 | 109 |
100 * On Debian-based system, the standard file | 110 * On Debian-based system, the standard file |
101 ``/etc/ssl/certs/ca-certificates.crt`` can be used. | 111 ``/etc/ssl/certs/ca-certificates.crt`` can be used. |
102 * On other systems, the cURL project provides `CA certificates | 112 * On other systems (including Microsoft Windows), the cURL project |
113 provides `CA certificates | |
103 <https://curl.haxx.se/docs/caextract.html>`__ that are extracted | 114 <https://curl.haxx.se/docs/caextract.html>`__ that are extracted |
104 from Mozilla. | 115 from Mozilla. |
105 | 116 |
106 Note that to debug HTTPS communications, you have the possibility of | 117 Note that to debug HTTPS communications, you have the possibility of |
107 setting the ``HttpVerbose`` configuration option of Orthanc to | 118 setting the ``HttpVerbose`` configuration option of Orthanc to |
108 ``true``. It is also useful to run Orthanc in ``--verbose`` mode | 119 ``true``. It can also be useful to run Orthanc in ``--verbose`` mode |
109 (check out :ref:`this page <log>`). | 120 (check out :ref:`this page <log>`). |
110 | 121 |
111 | 122 |
112 | 123 |
113 Service account | 124 Service account |
184 $ gcloud auth print-access-token --format json | 195 $ gcloud auth print-access-token --format json |
185 | 196 |
186 | 197 |
187 .. highlight:: json | 198 .. highlight:: json |
188 | 199 |
189 This command produces JSON file containing all the required | 200 This command generates a JSON file containing all the required |
190 information, that can be written to a file (say, | 201 information, that can be written to a file (say, |
191 ``dicom-user.json``). Given this file, here is a sample, minimalist | 202 ``dicom-user.json``). Given this file, here is a sample, minimalist |
192 configuration of Orthanc:: | 203 configuration of Orthanc:: |
193 | 204 |
194 { | 205 { |