annotate README @ 125:dce43cba6824

merge 0.6.0
author Alain Mazy <am@osimis.io>
date Mon, 18 Sep 2023 21:16:12 +0200
parents 66b2b938c43e
children c14b49c6eb6b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 Advanced authorization for Orthanc
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 ==================================
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 General Information
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 -------------------
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 This repository contains the source code of an advanced authorization
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 plugin for Orthanc.
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 For each incoming REST request to some URI, the plugin will query a
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 Web service to know whether the access is granted to the
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 user. Authorization credentials can be retrieved either from a GET
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 argument, or from a HTTP header.
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 Installation and usage
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 ----------------------
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 Build instructions are similar to that of Orthanc:
51
Alain Mazy <am@osimis.io>
parents: 1
diff changeset
21 https://book.orthanc-server.com/faq/compiling.html
1
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 Usage details are available as part of the Orthanc Book:
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 http://book.orthanc-server.com/plugins/authorization.html
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26
119
66b2b938c43e fix resource-token when no anonymous profile is available
Alain Mazy <am@osimis.io>
parents: 108
diff changeset
27 Integration tests
66b2b938c43e fix resource-token when no anonymous profile is available
Alain Mazy <am@osimis.io>
parents: 108
diff changeset
28 -----------------
66b2b938c43e fix resource-token when no anonymous profile is available
Alain Mazy <am@osimis.io>
parents: 108
diff changeset
29
66b2b938c43e fix resource-token when no anonymous profile is available
Alain Mazy <am@osimis.io>
parents: 108
diff changeset
30 Integration tests are available in the https://hg.orthanc-server.com/orthanc-tests/ repo
66b2b938c43e fix resource-token when no anonymous profile is available
Alain Mazy <am@osimis.io>
parents: 108
diff changeset
31 in the folder NewTests/Authorization.
66b2b938c43e fix resource-token when no anonymous profile is available
Alain Mazy <am@osimis.io>
parents: 108
diff changeset
32
72
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
33 API
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
34 ---
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
35
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
36 Since version 0.5.0, the plugin implements a RestA API to generate tokens
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
37 (provided that the Web service is able to do so).
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
38
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
39 Sample Orthanc Flavored API:
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
40
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
41 curl -X PUT http://localhost:8042/auth/tokens/resource-instant-link -H 'Content-Type: application/json' \
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
42 -d '{"ID": "toto",
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
43 "Resources" : [{
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
44 "DicomUid": "1.2",
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
45 "OrthancId": "",
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
46 "Level": "study"
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
47 }],
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
48 "Type": "resource-instant-link",
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
49 "ExpirationDate": "2026-12-31T11:00:00Z"}'
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
50
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
51 Sample response:
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
52 {
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
53 "Token": "e148.....",
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
54 "Url": null
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
55 }
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
56
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
57 The API that must be implemented by the webservice is slighlty different wrt naming conventions:
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
58
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
59 curl -X PUT http://localhost:8000/tokens/resource-instant-link -H 'Content-Type: application/json' \
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
60 -d '{"id": "toto",
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
61 "resources" : [{
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
62 "dicom-uid": "1.2",
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
63 "level": "study"
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
64 }],
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
65 "type": "resource-instant-link",
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
66 "expiration-date": "2026-12-31T11:00:00Z"}'
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
67
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
68 Sample response:
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
69 {
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
70 "token": "e148.....",
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
71 "url": null
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
72 }
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
73
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
74
e381ba725669 new PUT auth/tokens/{token-type} API route + updated interface with WebService
Alain Mazy <am@osimis.io>
parents: 51
diff changeset
75
108
68ce6fd8b22a contributing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 72
diff changeset
76 Contributing
68ce6fd8b22a contributing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 72
diff changeset
77 ------------
68ce6fd8b22a contributing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 72
diff changeset
78
68ce6fd8b22a contributing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 72
diff changeset
79 Instructions for contributing to the Orthanc project are included in
68ce6fd8b22a contributing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 72
diff changeset
80 the Orthanc Book:
68ce6fd8b22a contributing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 72
diff changeset
81 https://book.orthanc-server.com/developers/repositories.html
68ce6fd8b22a contributing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 72
diff changeset
82
68ce6fd8b22a contributing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 72
diff changeset
83
1
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 Licensing
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 ---------
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 The authorization plugin for Orthanc is licensed under the AGPL license.
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 We also kindly ask scientific works and clinical studies that make
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 use of Orthanc to cite Orthanc in their associated publications.
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 Similarly, we ask open-source and closed-source products that make
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 use of Orthanc to warn us about this use. You can cite our work
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 using the following BibTeX entry:
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 @inproceedings{Jodogne:ISBI2013,
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 author = {Jodogne, S. and Bernard, C. and Devillers, M. and Lenaerts, E. and Coucke, P.},
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 title = {Orthanc -- {A} Lightweight, {REST}ful {DICOM} Server for Healthcare and Medical Research},
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 booktitle={Biomedical Imaging ({ISBI}), {IEEE} 10th International Symposium on},
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 year={2013},
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 pages={190-193},
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 ISSN={1945-7928},
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 month=apr,
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 url={http://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumber=6556444},
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 address={San Francisco, {CA}, {USA}}
d5d3cb00556a initial release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 }