annotate README.md @ 25:b0b7eb7cff73

fix encryption
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 07 Sep 2020 14:26:50 +0200
parents 968eb1c78aed
children 7ddd840563c9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
1 # README #
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
2
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
3 Orthanc object-storages plugin for main cloud providers (Google/Azure/AWS)
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
4
4
55ce49bf32b3 readme links to orthanc book doc
Alain Mazy <alain@mazy.be>
parents: 1
diff changeset
5 Check the [Orthanc book](https://book.orthanc-server.com/plugins/object-storage.html) for complete documentation.
1
fc26a8fc54d5 initial release
Alain Mazy <alain@mazy.be>
parents:
diff changeset
6
5
Alain Mazy
parents: 4
diff changeset
7 ## info for developers ##
Alain Mazy
parents: 4
diff changeset
8
Alain Mazy
parents: 4
diff changeset
9 Here's a sample configuration file of the `StorageEncryption` section of the plugins:
Alain Mazy
parents: 4
diff changeset
10
Alain Mazy
parents: 4
diff changeset
11 ```
Alain Mazy
parents: 4
diff changeset
12 {
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
13 "GoogleCloudStorage" : {
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
14 "StorageEncryption" : {
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
15 "Enable": true,
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
16 "MasterKey": [3, "/path/to/master.key"], // key id - path to the base64 encoded key
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
17 "PreviousMasterKeys" : [
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
18 [ 1, "/path/to/previous1.key"],
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
19 [ 2, "/path/to/previous2.key"]
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
20 ],
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
21 "MaxConcurrentInputSize" : 1024 // size in MB
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
22 }
5
Alain Mazy
parents: 4
diff changeset
23 }
Alain Mazy
parents: 4
diff changeset
24 }
Alain Mazy
parents: 4
diff changeset
25 ```
Alain Mazy
parents: 4
diff changeset
26
Alain Mazy
parents: 4
diff changeset
27 ### Compile Google plugin ###
Alain Mazy
parents: 4
diff changeset
28
Alain Mazy
parents: 4
diff changeset
29 * `./vcpkg install google-cloud-cpp`
Alain Mazy
parents: 4
diff changeset
30 * `./vcpkg install cryptopp`
Alain Mazy
parents: 4
diff changeset
31 * `hg clone ...`
Alain Mazy
parents: 4
diff changeset
32 * `mkdir -p build/google`
Alain Mazy
parents: 4
diff changeset
33 * `cd build/google`
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
34 * `cmake -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]\scripts\buildsystems\vcpkg.cmake ../../orthanc-object-storage/Google`
5
Alain Mazy
parents: 4
diff changeset
35
Alain Mazy
parents: 4
diff changeset
36 ### Google plugin configuration ###
Alain Mazy
parents: 4
diff changeset
37
Alain Mazy
parents: 4
diff changeset
38 ```
Alain Mazy
parents: 4
diff changeset
39 "GoogleCloudStorage" : {
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
40 "ServiceAccountFile" : "/.../googleServiceAccountFile.json",
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
41 "BucketName": "test-orthanc-storage-plugin",
20
968eb1c78aed Added 'RootPath' configuration
Alain Mazy
parents: 15
diff changeset
42 "RootPath": "", // optional: folder in which files are stored (ex: my/path/to/myfolder)
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
43 "StorageEncryption" : {...},
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
44 "StorageStructure" : "flat",
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
45 "MigrationFromFileSystemEnabled" : false
5
Alain Mazy
parents: 4
diff changeset
46 }
Alain Mazy
parents: 4
diff changeset
47
Alain Mazy
parents: 4
diff changeset
48 ```
Alain Mazy
parents: 4
diff changeset
49
Alain Mazy
parents: 4
diff changeset
50 ## Azure Blob Storage plugin ##
Alain Mazy
parents: 4
diff changeset
51
Alain Mazy
parents: 4
diff changeset
52 ### Prerequisites ###
Alain Mazy
parents: 4
diff changeset
53
Alain Mazy
parents: 4
diff changeset
54 * Install [vcpkg](https://github.com/Microsoft/vcpkg)
Alain Mazy
parents: 4
diff changeset
55
Alain Mazy
parents: 4
diff changeset
56 ### Compile Azure plugin ###
Alain Mazy
parents: 4
diff changeset
57
Alain Mazy
parents: 4
diff changeset
58 * `./vcpkg install cpprestsdk`
Alain Mazy
parents: 4
diff changeset
59 * `hg clone ...`
Alain Mazy
parents: 4
diff changeset
60 * `mkdir -p build/azure`
Alain Mazy
parents: 4
diff changeset
61 * `cd build/azure`
Alain Mazy
parents: 4
diff changeset
62 * `cmake -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]\scripts\buildsystems\vcpkg.cmake ../../orthanc-object-storage/Azure`
Alain Mazy
parents: 4
diff changeset
63
Alain Mazy
parents: 4
diff changeset
64 ### Azure plugin configuration ###
Alain Mazy
parents: 4
diff changeset
65
Alain Mazy
parents: 4
diff changeset
66 ```
Alain Mazy
parents: 4
diff changeset
67 "AzureBlobStorage" : {
Alain Mazy
parents: 4
diff changeset
68 "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=xxxxxxxxx;AccountKey=yyyyyyyy===;EndpointSuffix=core.windows.net",
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
69 "ContainerName" : "test-orthanc-storage-plugin",
20
968eb1c78aed Added 'RootPath' configuration
Alain Mazy
parents: 15
diff changeset
70 "RootPath": "", // optional: folder in which files are stored (ex: my/path/to/myfolder)
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
71 "StorageEncryption" : {...},
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
72 "StorageStructure" : "flat",
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
73 "MigrationFromFileSystemEnabled" : false
5
Alain Mazy
parents: 4
diff changeset
74 }
Alain Mazy
parents: 4
diff changeset
75 ```
Alain Mazy
parents: 4
diff changeset
76
Alain Mazy
parents: 4
diff changeset
77 ## AWS S3 Storage plugin ##
Alain Mazy
parents: 4
diff changeset
78
Alain Mazy
parents: 4
diff changeset
79 ### Prerequisites ###
Alain Mazy
parents: 4
diff changeset
80
Alain Mazy
parents: 4
diff changeset
81 * Install [vcpkg](https://github.com/Microsoft/vcpkg)
Alain Mazy
parents: 4
diff changeset
82
Alain Mazy
parents: 4
diff changeset
83 * compile the AWS C++ SDK
Alain Mazy
parents: 4
diff changeset
84
Alain Mazy
parents: 4
diff changeset
85 ```
Alain Mazy
parents: 4
diff changeset
86
Alain Mazy
parents: 4
diff changeset
87 mkdir ~/aws
Alain Mazy
parents: 4
diff changeset
88 cd ~/aws
Alain Mazy
parents: 4
diff changeset
89 git clone https://github.com/aws/aws-sdk-cpp.git
Alain Mazy
parents: 4
diff changeset
90
Alain Mazy
parents: 4
diff changeset
91 mkdir -p ~/aws/builds/aws-sdk-cpp
Alain Mazy
parents: 4
diff changeset
92 cd ~/aws/builds/aws-sdk-cpp
Alain Mazy
parents: 4
diff changeset
93 cmake -DBUILD_ONLY="s3;transfer" ~/aws/aws-sdk-cpp
Alain Mazy
parents: 4
diff changeset
94 make -j 4
Alain Mazy
parents: 4
diff changeset
95 make install
Alain Mazy
parents: 4
diff changeset
96 ```
Alain Mazy
parents: 4
diff changeset
97
Alain Mazy
parents: 4
diff changeset
98 ### Compile AWS S3 plugin ###
Alain Mazy
parents: 4
diff changeset
99
Alain Mazy
parents: 4
diff changeset
100 * `./vcpkg install cryptopp`
Alain Mazy
parents: 4
diff changeset
101 * `hg clone ...`
Alain Mazy
parents: 4
diff changeset
102 * `mkdir -p build/aws`
Alain Mazy
parents: 4
diff changeset
103 * `cd build/aws`
Alain Mazy
parents: 4
diff changeset
104 * `cmake -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]\scripts\buildsystems\vcpkg.cmake ../../orthanc-object-storage/Aws`
Alain Mazy
parents: 4
diff changeset
105
Alain Mazy
parents: 4
diff changeset
106 ### Azure plugin configuration ###
Alain Mazy
parents: 4
diff changeset
107
Alain Mazy
parents: 4
diff changeset
108 ```
Alain Mazy
parents: 4
diff changeset
109 "AwsS3Storage" : {
Alain Mazy
parents: 4
diff changeset
110 "BucketName": "test-orthanc-s3-plugin",
Alain Mazy
parents: 4
diff changeset
111 "Region" : "eu-central-1",
Alain Mazy
parents: 4
diff changeset
112 "AccessKey" : "AKXXX",
6
393fcf337462 AWS: added 3 configurations: Endpoint, ConnectionTimeout, RequestTimeout
Alain Mazy
parents: 5
diff changeset
113 "SecretKey" : "RhYYYY",
393fcf337462 AWS: added 3 configurations: Endpoint, ConnectionTimeout, RequestTimeout
Alain Mazy
parents: 5
diff changeset
114 "Endpoint": "", // optional: custom endpoint
393fcf337462 AWS: added 3 configurations: Endpoint, ConnectionTimeout, RequestTimeout
Alain Mazy
parents: 5
diff changeset
115 "ConnectionTimeout": 30, // optional: connection timeout in seconds
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents: 6
diff changeset
116 "RequestTimeout": 1200, // optional: request timeout in seconds (max time to upload/download a file)
20
968eb1c78aed Added 'RootPath' configuration
Alain Mazy
parents: 15
diff changeset
117 "RootPath": "", // optional: folder in which files are stored (ex: my/path/to/myfolder)
968eb1c78aed Added 'RootPath' configuration
Alain Mazy
parents: 15
diff changeset
118 "StorageEncryption" : {...}, // optional
968eb1c78aed Added 'RootPath' configuration
Alain Mazy
parents: 15
diff changeset
119 "StorageStructure" : "flat", // optional
968eb1c78aed Added 'RootPath' configuration
Alain Mazy
parents: 15
diff changeset
120 "MigrationFromFileSystemEnabled" : false // optional
5
Alain Mazy
parents: 4
diff changeset
121 }
Alain Mazy
parents: 4
diff changeset
122 ```