602cdfd617f3904c62e02b10f3ed2ef3e32b2352
[arvados.git] / doc / admin / restricting-upload-download.html.textile.liquid
1 ---
2 layout: default
3 navsection: admin
4 title: Restricting upload or download
5 ...
6
7 {% comment %}
8 Copyright (C) The Arvados Authors. All rights reserved.
9
10 SPDX-License-Identifier: CC-BY-SA-3.0
11 {% endcomment %}
12
13 For some use cases, you may want to limit the ability of users to upload or download data from outside the cluster.  (By "outside" we mean from networks other than the cluster's own private network).  For example, this makes it possible to share restricted data sets with users so that they may run their own data analysis on the cluster, while preventing them from easily downloading the data set to their local workstation.
14
15 This feature exists in addition to the existing Arvados permission system.  Users can only download from collections they have @read@ access to, and can only upload to projects and collections they have @write@ access to.
16
17 h2. Keep-web and Keepproxy Permissions
18
19 There are two services involved in accessing data from outside the cluster.
20
21 @keeproxy@ makes it possible to use @arv-put@ and @arv-get@.  It works in terms of individual 64 MiB keep blocks.  It prints a log each time a user uploads or downloads an individual block.
22
23 @keep-web@ makes it possible to use Workbench, WebDAV and S3 API.  It works in terms of individual files.  It prints a log each time a user uploads or downloads a file, and also adds an entry into the API server @logs@ table.
24
25 This distinction is important for auditing, the @keep-web@ records 'upload' and 'download' events on the API server that are included in the "User Activity Report":user-activity.html ,  whereas @keepprox@ only logs upload and download of individual blocks, which require a reverse lookup to determine the collection(s) and file(s) a block is associated with.
26
27 You can set permissions for @keep-web@ and @keepproxy@, with separate policies for regular users and admin users.
28
29 If the user attempts to upload or download from a service without permission, they will receive a @403 Forbidden@ response.  This only applies to file content.  Users can still see collection listings.
30
31 The default policy allows anyone to upload or download.
32
33 <pre>
34     Collections:
35       KeepWebPermisison:
36         User:
37           Download: true
38           Upload: true
39         Admin:
40           Download: true
41           Upload: true
42
43       KeepproxyPermission:
44         User:
45           Download: true
46           Upload: true
47         Admin:
48           Download: true
49           Upload: true
50 </pre>
51
52 h2. Shell node and container permissions
53
54 Be aware that even when upload and download from outside the network is not allowed, a user who has access to a shell node or runs a container still has internal access to Keep.  (This is necessary to be able to run workflows).  From the shell node or container, a user could send data outside the network by some other method, although this requires more intent than accidentally clicking on a link and downloading a file.  It is possible to set up a firewall to prevent shell and compute nodes from making connections to hosts outside the private network.  Exactly how to configure this is out of scope for this page, as it depends on the specific network infrastructure of your cluster.
55
56 h2. Choosing a policy
57
58 These policies apply to only access from outside the cluster, using Workbench or Arvados CLI tools.
59
60 h3. Audited downloads
61
62 For ease of access auditing, this policy prevents downloads using @arv-get@.  Downloads through @keep-web@ are permitted, but logged.  Uploads with @arv-put@ are allowed.
63
64 <pre>
65     Collections:
66       KeepWebPermisison:
67         User:
68           Download: true
69           Upload: true
70         Admin:
71           Download: true
72           Upload: true
73
74       KeepproxyPermission:
75         User:
76           Download: false
77           Upload: true
78         Admin:
79           Download: false
80           Upload: true
81 </pre>
82
83 h3. Disallow downloads by regular users
84
85 This policy prevents regular users (non-admin) from downloading data.  Uploading is allowed.  This supports the case where restricted data sets are shared users so that they may run their own data analysis on the cluster, while preventing them from downloading the data set to their local workstation.  Note that users won't be able to download the results of their analysis, either, requiring an admin in the loop or some other process to release results.
86
87 <pre>
88     Collections:
89       KeepWebPermisison:
90         User:
91           Download: false
92           Upload: true
93         Admin:
94           Download: true
95           Upload: true
96
97       KeepproxyPermission:
98         User:
99           Download: false
100           Upload: true
101         Admin:
102           Download: true
103           Upload: true
104 </pre>
105
106 h3. Disallow uploads by regular users
107
108 This policy is suitable for an installation where data is being shared with a group of users who are allowed to download the data, but not permitted to store their own data on the cluster.
109
110 <pre>
111     Collections:
112       KeepWebPermisison:
113         User:
114           Download: true
115           Upload: false
116         Admin:
117           Download: true
118           Upload: true
119
120       KeepproxyPermission:
121         User:
122           Download: true
123           Upload: false
124         Admin:
125           Download: true
126           Upload: true
127 </pre>