X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/589de3bdd1e9f4f7a2cc64ad502e4d8e77cdd2c8..7d91fe636e1ce09697fdff28b43e4020df041f17:/services/keep-web/doc.go diff --git a/services/keep-web/doc.go b/services/keep-web/doc.go index 3326dd19d8..8682eac2dd 100644 --- a/services/keep-web/doc.go +++ b/services/keep-web/doc.go @@ -1,42 +1,55 @@ -// Keep-web provides read-only HTTP access to files stored in Keep. It -// serves public data to anonymous and unauthenticated clients, and -// serves private data to clients that supply Arvados API tokens. It -// can be installed anywhere with access to Keep services, typically -// behind a web proxy that supports TLS. +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + +// Keep-web provides read/write HTTP (WebDAV) access to files stored +// in Keep. It serves public data to anonymous and unauthenticated +// clients, and serves private data to clients that supply Arvados API +// tokens. It can be installed anywhere with access to Keep services, +// typically behind a web proxy that supports TLS. // // See http://doc.arvados.org/install/install-keep-web.html. // // Configuration // -// The default configuration file location is -// /etc/arvados/keep-web/keep-web.yml. +// The default cluster configuration file location is +// /etc/arvados/config.yml. // // Example configuration file // -// Client: -// APIHost: "zzzzz.arvadosapi.com:443" -// AuthToken: "" -// Insecure: false -// Listen: :1234 -// AnonymousTokens: -// - xxxxxxxxxxxxxxxxxxxx -// AttachmentOnlyHost: "" -// TrustAllContent: false +// Clusters: +// zzzzz: +// SystemRootToken: "" +// Services: +// Controller: +// ExternalURL: "https://example.com" +// Insecure: false +// WebDAV: +// InternalURLs: +// "http://:1234/": {} +// WebDAVDownload: +// InternalURLs: +// "http://:1234/": {} +// ExternalURL: "https://download.example.com/" +// Users: +// AnonymousUserToken: "xxxxxxxxxxxxxxxxxxxx" +// Collections: +// TrustAllContent: false // // Starting the server // // Start a server using the default config file -// /etc/arvados/keep-web/keep-web.yml: +// /etc/arvados/config.yml: // // keep-web // -// Start a server using the config file /path/to/keep-web.yml: +// Start a server using the config file /path/to/config.yml: // -// keep-web -config /path/to/keep-web.yml +// keep-web -config /path/to/config.yml // // Proxy configuration // -// Keep-web does not support SSL natively. Typically, it is installed +// Keep-web does not support TLS natively. Typically, it is installed // behind a proxy like nginx. // // Here is an example nginx configuration. @@ -64,12 +77,15 @@ // // Anonymous downloads // -// The "AnonymousTokens" configuration entry is an array of tokens to -// use when processing anonymous requests, i.e., whenever a web client +// The "Users.AnonymousUserToken" configuration entry used when +// when processing anonymous requests, i.e., whenever a web client // does not supply its own Arvados API token via path, query string, // cookie, or request header. // -// "AnonymousTokens":["xxxxxxxxxxxxxxxxxxxxxxx"] +// Clusters: +// zzzzz: +// Users: +// AnonymousUserToken: "xxxxxxxxxxxxxxxxxxxxxxx" // // See http://doc.arvados.org/install/install-keep-web.html for examples. // @@ -129,8 +145,21 @@ // http://zzzzz-4zz18-znfnqtbbv4spc3w.collections.example.com/foo/bar.txt // http://zzzzz-4zz18-znfnqtbbv4spc3w.collections.example.com/_/foo/bar.txt // http://zzzzz-4zz18-znfnqtbbv4spc3w--collections.example.com/_/foo/bar.txt +// +// The following URLs are read-only, but otherwise interchangeable +// with the above: +// // http://1f4b0bc7583c2a7f9102c395f4ffc5e3-45--foo.example.com/foo/bar.txt // http://1f4b0bc7583c2a7f9102c395f4ffc5e3-45--.invalid/foo/bar.txt +// http://collections.example.com/by_id/1f4b0bc7583c2a7f9102c395f4ffc5e3%2B45/foo/bar.txt +// http://collections.example.com/by_id/zzzzz-4zz18-znfnqtbbv4spc3w/foo/bar.txt +// +// If the collection is named "MyCollection" and located in a project +// called "MyProject" which is in the home project of a user with +// username is "bob", the following read-only URL is also available +// when authenticating as bob: +// +// http://collections.example.com/users/bob/MyProject/MyCollection/foo/bar.txt // // An additional form is supported specifically to make it more // convenient to maintain support for existing Workbench download @@ -144,6 +173,9 @@ // // http://collections.example.com/collections/uuid_or_pdh/foo/bar.txt // +// Collections can also be accessed (read-only) via "/by_id/X" where X +// is a UUID or portable data hash. +// // Authorization mechanisms // // A token can be provided in an Authorization header: @@ -174,11 +206,10 @@ // // Indexes // -// Currently, keep-web does not generate HTML index listings, nor does -// it serve a default file like "index.html" when a directory is -// requested. These features are likely to be added in future -// versions. Until then, keep-web responds with 404 if a directory -// name (or any path ending with "/") is requested. +// Keep-web returns a generic HTML index listing when a directory is +// requested with the GET method. It does not serve a default file +// like "index.html". Directory listings are also returned for WebDAV +// PROPFIND requests. // // Compatibility // @@ -227,7 +258,11 @@ // only when the designated origin matches exactly the Host header // provided by the client or downstream proxy. // -// "AttachmentOnlyHost":"domain.example:9999" +// Clusters: +// zzzzz: +// Services: +// WebDAVDownload: +// ExternalURL: "https://domain.example:9999" // // Trust All Content mode // @@ -240,18 +275,32 @@ // // In such cases you can enable trust-all-content mode. // -// "TrustAllContent":true +// Clusters: +// zzzzz: +// Collections: +// TrustAllContent: true // // When TrustAllContent is enabled, the only effect of the -// AttachmentOnlyHost flag is to add a "Content-Disposition: +// Attachment-Only host setting is to add a "Content-Disposition: // attachment" header. // -// "AttachmentOnlyHost":"domain.example:9999", -// "TrustAllContent":true +// Clusters: +// zzzzz: +// Services: +// WebDAVDownload: +// ExternalURL: "https://domain.example:9999" +// Collections: +// TrustAllContent: true // // Depending on your site configuration, you might also want to enable // the "trust all content" setting in Workbench. Normally, Workbench // avoids redirecting requests to keep-web if they depend on // TrustAllContent being enabled. // +// Metrics +// +// Keep-web exposes request metrics in Prometheus text-based format at +// /metrics. The same information is also available as JSON at +// /metrics.json. +// package main