Merge branch '17464-download-activity' refs #17464
authorPeter Amstutz <peter.amstutz@curii.com>
Wed, 30 Jun 2021 19:49:01 +0000 (15:49 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Wed, 30 Jun 2021 19:49:01 +0000 (15:49 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

1  2 
lib/config/config.default.yml
lib/config/export.go
lib/config/generated_config.go
sdk/go/arvados/config.go
services/keepproxy/keepproxy.go
services/keepproxy/keepproxy_test.go

index 645da56718d6ae10bda4fb7dd366541d034a20f8,ff2f649faca88cdb4e77c76589871d38c1741f22..e28d5cbb7f0cd09b3ad559f6cab0c9a9967c10d5
@@@ -551,8 -554,36 +551,36 @@@ Clusters
          # Persistent sessions.
          MaxSessions: 100
  
+       # 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
+         Admin:
+           Download: true
+           Upload: true
+       # Selectively set permissions for regular users and admins to be
+       # able to download or upload blocks using arv-put and
+       # arv-get from outside the cluster.
+       KeepproxyPermission:
+         User:
+           Download: true
+           Upload: true
+         Admin:
+           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
 +      # One of the following mechanisms (Google, PAM, LDAP, or
        # LoginCluster) should be enabled; see
        # https://doc.arvados.org/install/setup-login.html
  
Simple merge
index 1bdc269c083b00b4e3e6d273c87d5a6c97726412,34cc07115a56599f8e9e9d1466dfde8ffc28e668..b15bf7eebc29facda6f1a0e2670c5482f83055cf
@@@ -557,8 -560,36 +557,36 @@@ Clusters
          # Persistent sessions.
          MaxSessions: 100
  
+       # 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
+         Admin:
+           Download: true
+           Upload: true
+       # Selectively set permissions for regular users and admins to be
+       # able to download or upload blocks using arv-put and
+       # arv-get from outside the cluster.
+       KeepproxyPermission:
+         User:
+           Download: true
+           Upload: true
+         Admin:
+           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
 +      # One of the following mechanisms (Google, PAM, LDAP, or
        # LoginCluster) should be enabled; see
        # https://doc.arvados.org/install/setup-login.html
  
Simple merge
Simple merge
index c569a05e74d970efa98248b7f9ca95ff14657fdb,9dc07ddaa0e1be60ce3f4b522dbc3d90aab4ed02..2d4266d8d591ca1f304f0ca1a18993d20348e8be
@@@ -228,30 -236,8 +236,30 @@@ func (s *ServerRequiredSuite) TestStora
        c.Check(hdr.Get("X-Keep-Storage-Classes"), Equals, "secure")
  }
  
 +func (s *ServerRequiredSuite) TestStorageClassesConfirmedHeader(c *C) {
 +      runProxy(c, false, false)
 +      defer closeListener()
 +
 +      content := []byte("foo")
 +      hash := fmt.Sprintf("%x", md5.Sum(content))
 +      client := &http.Client{}
 +
 +      req, err := http.NewRequest("PUT",
 +              fmt.Sprintf("http://%s/%s", listener.Addr().String(), hash),
 +              bytes.NewReader(content))
 +      c.Assert(err, IsNil)
 +      req.Header.Set("X-Keep-Storage-Classes", "default")
 +      req.Header.Set("Authorization", "OAuth2 "+arvadostest.ActiveToken)
 +      req.Header.Set("Content-Type", "application/octet-stream")
 +
 +      resp, err := client.Do(req)
 +      c.Assert(err, IsNil)
 +      c.Assert(resp.StatusCode, Equals, http.StatusOK)
 +      c.Assert(resp.Header.Get("X-Keep-Storage-Classes-Confirmed"), Equals, "default=2")
 +}
 +
  func (s *ServerRequiredSuite) TestDesiredReplicas(c *C) {
-       kc := runProxy(c, false, false)
+       kc, _ := runProxy(c, false, false, nil)
        defer closeListener()
  
        content := []byte("TestDesiredReplicas")