17464: Update config variables & docs from feedback
authorPeter Amstutz <peter.amstutz@curii.com>
Thu, 17 Jun 2021 16:27:19 +0000 (12:27 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Fri, 18 Jun 2021 15:35:01 +0000 (11:35 -0400)
Change KeepWebPermission -> WebDAVPermission

Add WebDAVLogEvents

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

doc/admin/restricting-upload-download.html.textile.liquid
lib/config/config.default.yml
lib/config/generated_config.go
sdk/go/arvados/config.go

index 602cdfd617f3904c62e02b10f3ed2ef3e32b2352..45bcd8a07ae34e428e1fd5f629164024c8a6a7ec 100644 (file)
@@ -14,56 +14,70 @@ For some use cases, you may want to limit the ability of users to upload or down
 
 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.
 
-h2. Keep-web and Keepproxy Permissions
-
 There are two services involved in accessing data from outside the cluster.
 
-@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.
-
-@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.
-
-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.
+h2. Keepproxy Permissions
 
-You can set permissions for @keep-web@ and @keepproxy@, with separate policies for regular users and admin users.
-
-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.
+Permitting @keeproxy@ makes it possible to use @arv-put@ and @arv-get@, and upload from Workbench 1.  It works in terms of individual 64 MiB keep blocks.  It prints a log each time a user uploads or downloads an individual block.
 
 The default policy allows anyone to upload or download.
 
 <pre>
     Collections:
-      KeepWebPermisison:
+      KeepproxyPermission:
         User:
           Download: true
           Upload: true
         Admin:
           Download: true
           Upload: true
+</pre>
 
-      KeepproxyPermission:
+h2. WebDAV and S3 API Permissions
+
+Permitting @WebDAV@ makes it possible to use WebDAV, S3 API, download from Workbench 1, and upload/download with Workbench 2.  It works in terms of individual files.  It prints a log each time a user uploads or downloads a file.  When @WebDAVLogEvents@ (default true) is enabled, it also adds an entry into the API server @logs@ table.
+
+When a user attempts to upload or download from a service without permission, they will receive a @403 Forbidden@ response.  This only applies to file content.
+
+Denying download permission does not deny access to access to XML file listings with PROPFIND.  As a side effect it does deny auto-generated HTML documents that have file listings.
+
+Denying upload permission does not deny other operations that modify collections without directly accessing file content, such as MOVE and COPY.
+
+The default policy allows anyone to upload or download.
+
+<pre>
+    Collections:
+      WebDAVPermisison:
         User:
           Download: true
           Upload: true
         Admin:
           Download: true
           Upload: true
+      WebDAVLogEvents: true
 </pre>
 
 h2. Shell node and container permissions
 
-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.
+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 firewalls is out of scope for this page, as it depends on the specific network infrastructure of your cluster.
 
 h2. Choosing a policy
 
+This distinction between WebDAV and Keepproxy is important for auditing.  WebDAV records 'upload' and 'download' events on the API server that are included in the "User Activity Report":user-activity.html ,  whereas @keepproxy@ 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.
+
+You set separate permissions for @WebDAV@ and @Keepproxy@, with separate policies for regular users and admin users.
+
 These policies apply to only access from outside the cluster, using Workbench or Arvados CLI tools.
 
+The @WebDAVLogEvents@ option should be enabled if you intend to the run the "User Activity Report":user-activity.html .  If you don't need audits, or you are running a site that is mostly serving public data to anonymous downloaders, you can disable in to avoid the extra API server request.
+
 h3. Audited downloads
 
-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.
+For ease of access auditing, this policy prevents downloads using @arv-get@.  Downloads through WebDAV and S3 API are permitted, but logged.  Uploads are allowed.
 
 <pre>
     Collections:
-      KeepWebPermisison:
+      WebDAVPermisison:
         User:
           Download: true
           Upload: true
@@ -78,6 +92,7 @@ For ease of access auditing, this policy prevents downloads using @arv-get@.  Do
         Admin:
           Download: false
           Upload: true
+      WebDAVLogEvents: true
 </pre>
 
 h3. Disallow downloads by regular users
@@ -86,7 +101,7 @@ This policy prevents regular users (non-admin) from downloading data.  Uploading
 
 <pre>
     Collections:
-      KeepWebPermisison:
+      WebDAVPermisison:
         User:
           Download: false
           Upload: true
@@ -101,6 +116,7 @@ This policy prevents regular users (non-admin) from downloading data.  Uploading
         Admin:
           Download: true
           Upload: true
+      WebDAVLogEvents: true
 </pre>
 
 h3. Disallow uploads by regular users
@@ -109,7 +125,7 @@ This policy is suitable for an installation where data is being shared with a gr
 
 <pre>
     Collections:
-      KeepWebPermisison:
+      WebDAVPermisison:
         User:
           Download: true
           Upload: false
@@ -124,4 +140,5 @@ This policy is suitable for an installation where data is being shared with a gr
         Admin:
           Download: true
           Upload: true
+      WebDAVLogEvents: true
 </pre>
index 537db676236ed99f55f9d32c767ead2c25b18f39..ff2f649faca88cdb4e77c76589871d38c1741f22 100644 (file)
@@ -554,11 +554,10 @@ Clusters:
         # Persistent sessions.
         MaxSessions: 100
 
-      # Selectively set permissions for regular users and admins to be
-      # able to download or upload data files using the
-      # upload/download features for Workbench, WebDAV and S3 API
-      # support.
-      KeepWebPermission:
+      # Selectively set permissions for regular users and admins to
+      # download or upload data files using the upload/download
+      # features for Workbench, WebDAV and S3 API support.
+      WebDAVPermission:
         User:
           Download: true
           Upload: true
@@ -577,6 +576,12 @@ Clusters:
           Download: true
           Upload: true
 
+      # Post upload / download events to the API server logs table, so
+      # that they can be included in the arv-user-activity report.
+      # You can disable this if you find that it is creating excess
+      # load on the API server and you don't need it.
+      WebDAVLogEvents: true
+
     Login:
       # One of the following mechanisms (SSO, Google, PAM, LDAP, or
       # LoginCluster) should be enabled; see
index e2ba3bc2cf25abcdd1bac5c58702122565981240..34cc07115a56599f8e9e9d1466dfde8ffc28e668 100644 (file)
@@ -560,11 +560,10 @@ Clusters:
         # Persistent sessions.
         MaxSessions: 100
 
-      # Selectively set permissions for regular users and admins to be
-      # able to download or upload data files using the
-      # upload/download features for Workbench, WebDAV and S3 API
-      # support.
-      KeepWebPermission:
+      # Selectively set permissions for regular users and admins to
+      # download or upload data files using the upload/download
+      # features for Workbench, WebDAV and S3 API support.
+      WebDAVPermission:
         User:
           Download: true
           Upload: true
@@ -583,6 +582,12 @@ Clusters:
           Download: true
           Upload: true
 
+      # Post upload / download events to the API server logs table, so
+      # that they can be included in the arv-user-activity report.
+      # You can disable this if you find that it is creating excess
+      # load on the API server and you don't need it.
+      WebDAVLogEvents: true
+
     Login:
       # One of the following mechanisms (SSO, Google, PAM, LDAP, or
       # LoginCluster) should be enabled; see
index 83a6708322030f29c308dfde8d08b10bb8847078..13fe989caee142b78a7e58423072a9bdfd56fa35 100644 (file)
@@ -142,7 +142,8 @@ type Cluster struct {
                WebDAVCache WebDAVCacheConfig
 
                KeepproxyPermission UploadDownloadRolePermissions
-               KeepWebPermission   UploadDownloadRolePermissions
+               WebDAVPermission    UploadDownloadRolePermissions
+               WebDAVLogEvents     bool
        }
        Git struct {
                GitCommand   string