Mercurial > hg > orthanc-authorization
annotate Plugin/DefaultConfiguration.json @ 83:23afe0f2b62b
doc
author | Alain Mazy <am@osimis.io> |
---|---|
date | Fri, 17 Mar 2023 16:55:58 +0100 |
parents | 94c5388ed30b |
children | 50e4d01eb263 |
rev | line source |
---|---|
71 | 1 { |
2 "Authorization" : { | |
72
e381ba725669
new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents:
71
diff
changeset
|
3 // The Base URL of the auth webservice. This is an alias for all 3 next configurations: |
e381ba725669
new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents:
71
diff
changeset
|
4 // // "WebServiceUserProfileUrl" : " ROOT /user/get-profile", |
e381ba725669
new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents:
71
diff
changeset
|
5 // // "WebServiceTokenValidationUrl" : " ROOT /tokens/validate", |
e381ba725669
new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents:
71
diff
changeset
|
6 // // "WebServiceTokenCreationBaseUrl" : " ROOT /tokens/", |
79 | 7 // // "WebServiceTokenDecoderUrl" : " ROOT /tokens/decode", |
73
512247750f0a
new ValidityDuration arg in create token API
Alain Mazy <am@osimis.io>
parents:
72
diff
changeset
|
8 // You should define it only if your auth webservice implements all 3 routes ! |
72
e381ba725669
new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents:
71
diff
changeset
|
9 // "WebServiceRootUrl" : "http://change-me:8000/", |
e381ba725669
new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents:
71
diff
changeset
|
10 |
e381ba725669
new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents:
71
diff
changeset
|
11 // The URL of the auth webservice route implementing user profile (optional) |
e381ba725669
new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents:
71
diff
changeset
|
12 // (this configuration was previously named "WebService" and its old name is still accepted |
e381ba725669
new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents:
71
diff
changeset
|
13 // for backward compatibility) |
e381ba725669
new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents:
71
diff
changeset
|
14 // "WebServiceUserProfileUrl" : "http://change-me:8000/user/profile", |
e381ba725669
new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents:
71
diff
changeset
|
15 |
e381ba725669
new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents:
71
diff
changeset
|
16 // The URL of the auth webservice route implementing resource level authorization (optional) |
e381ba725669
new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents:
71
diff
changeset
|
17 // "WebServiceTokenValidationUrl" : "http://change-me:8000/tokens/validate", |
e381ba725669
new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents:
71
diff
changeset
|
18 |
e381ba725669
new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents:
71
diff
changeset
|
19 // The Base URL of the auth webservice route to create tokens (optional) |
e381ba725669
new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents:
71
diff
changeset
|
20 // "WebServiceTokenCreationBaseUrl" : "http://change-me:8000/tokens/", |
71 | 21 |
79 | 22 // The URL of the auth webservice route implementing token decoding (optional) |
23 // "WebServiceTokenDecoderUrl": "http://change-me:8000/tokens/decode" | |
24 | |
71 | 25 // The username and password to connect to the webservice (optional) |
26 //"WebServiceUsername": "change-me", | |
27 //"WebServicePassword": "change-me", | |
28 | |
29 // An identifier added to the payload of each request to the auth webservice (optional) | |
30 //"WebServiceIdentifier": "change-me" | |
31 | |
32 // The name of the HTTP headers that may contain auth tokens | |
33 //"TokenHttpHeaders" : [], | |
34 | |
83 | 35 // The name of the GET arguments that may contain auth tokens |
71 | 36 //"TokenGetArguments" : [], |
37 | |
38 // A list of predefined configurations for well-known plugins | |
39 // "StandardConfigurations": [ // new in v 0.4.0 | |
40 // "osimis-web-viewer", | |
41 // "stone-webviewer", | |
42 // "orthanc-explorer-2" | |
43 // ], | |
44 | |
45 //"UncheckedResources" : [], | |
46 //"UncheckedFolders" : [], | |
47 //"CheckedLevel" : "studies", | |
48 //"UncheckedLevels" : [], | |
49 | |
50 // Definition of required "user-permissions". This can be fully customized. | |
72
e381ba725669
new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents:
71
diff
changeset
|
51 // You may define other permissions yourself as long as they match the permissions |
71 | 52 // provided in the user-profile route implemented by the auth-service. |
53 // You may test your regex in https://regex101.com/ by selecting .NET (C#) and removing the leading ^ and trailing $ | |
54 // The default configuration is suitable for Orthanc-Explorer-2 (see TBD sample) | |
55 "Permissions" : [ | |
75 | 56 ["post", "^/auth/tokens/decode$", ""], |
77
94a9484d7f8f
fix security issues allowing to browse remote dicom servers + introduced UnitTests
Alain Mazy <am@osimis.io>
parents:
75
diff
changeset
|
57 ["post", "^/tools/lookup$", ""], // currently used to authorize downloads in Stone (to map the StudyInstanceUID into an OrthancID. Not ideal -> we should define a new API that has the resource ID in the path to be able to check it at resource level) but, on another hand, you do not get any Patient information from this route |
75 | 58 |
71 | 59 // elemental browsing in OE2 |
60 ["post", "^/tools/find$", "all|view"], | |
75 | 61 ["get" , "^/(patients|studies|series|instances)/([a-f0-9-]+)$", "all|view"], |
62 ["get" , "^/(patients|studies|series|instances)/([a-f0-9-]+)/(studies|study|series|instances)$", "all|view"], | |
71 | 63 ["get" , "^/instances/([a-f0-9-]+)/(tags|header)$", "all|view"], |
64 ["get" , "^/statistics$", "all|view"], | |
65 | |
75 | 66 // create links to open viewer or download resources |
67 ["put", "^/auth/tokens/(viewer-instant-link|meddream-instant-link)$", "all|view"], | |
68 ["put", "^/auth/tokens/(download-instant-link)$", "all|download"], | |
69 | |
70 // share a link to open a study | |
71 ["put", "^/auth/tokens/(stone-viewer-publication|meddream-viewer-publication|osimis-viewer-publication)$", "all|share"], | |
72 | |
73 // uploads | |
74 ["post", "^/instances$", "all|upload"], | |
75 | |
71 | 76 // monitor jobs you have created |
77 ["get" , "^/jobs/([a-f0-9-]+)$", "all|send|modify|anonymize|q-r-remote-modalities"], | |
78 | |
79 // interacting with peers/modalities/dicomweb | |
80 ["post", "^/(peers|modalities)/(.*)/store$", "all|send"], | |
81 ["get" , "^/(peers|modalities)$", "all|send|q-r-remote-modalities"], | |
82 ["post", "^/modalities/(.*)/echo$", "all|send|q-r-remote-modalities"], | |
83 ["post", "^/modalities/(.*)/query$", "all|q-r-remote-modalities"], | |
84 ["get", "^/queries/([a-f0-9-]+)/answers$", "all|q-r-remote-modalities"], | |
85 ["post", "^/modalities/(.*)/move$", "all|q-r-remote-modalities"], | |
75 | 86 ["get" , "^/DICOM_WEB_ROOT/servers$", "all|send|q-r-remote-modalities"], |
71 | 87 ["get" , "^/DICOM_WEB_ROOT/(servers)/(.*)/stow$", "all|send"], |
88 | |
89 // modifications/anonymization | |
90 ["post", "^/(patients|studies|series|instances)/([a-f0-9-]+)/modify(.*)$", "all|modify"], | |
77
94a9484d7f8f
fix security issues allowing to browse remote dicom servers + introduced UnitTests
Alain Mazy <am@osimis.io>
parents:
75
diff
changeset
|
91 ["post", "^/(patients|studies|series|instances)/([a-f0-9-]+)/anonymize(.*)$", "all|anonymize"], |
94a9484d7f8f
fix security issues allowing to browse remote dicom servers + introduced UnitTests
Alain Mazy <am@osimis.io>
parents:
75
diff
changeset
|
92 |
94a9484d7f8f
fix security issues allowing to browse remote dicom servers + introduced UnitTests
Alain Mazy <am@osimis.io>
parents:
75
diff
changeset
|
93 // deletes |
94a9484d7f8f
fix security issues allowing to browse remote dicom servers + introduced UnitTests
Alain Mazy <am@osimis.io>
parents:
75
diff
changeset
|
94 ["delete" , "^/(patients|studies|series|instances)/([a-f0-9-]+)$", "all|delete"], |
94a9484d7f8f
fix security issues allowing to browse remote dicom servers + introduced UnitTests
Alain Mazy <am@osimis.io>
parents:
75
diff
changeset
|
95 |
94a9484d7f8f
fix security issues allowing to browse remote dicom servers + introduced UnitTests
Alain Mazy <am@osimis.io>
parents:
75
diff
changeset
|
96 // settings |
94a9484d7f8f
fix security issues allowing to browse remote dicom servers + introduced UnitTests
Alain Mazy <am@osimis.io>
parents:
75
diff
changeset
|
97 ["put", "^/tools/log-level$", "all|settings"], |
94a9484d7f8f
fix security issues allowing to browse remote dicom servers + introduced UnitTests
Alain Mazy <am@osimis.io>
parents:
75
diff
changeset
|
98 ["get", "^/tools/log-level$", "all|settings"] |
71 | 99 ] |
100 } | |
101 } |