1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 // Keep-web provides read/write HTTP (WebDAV) access to files stored
6 // in Keep. It serves public data to anonymous and unauthenticated
7 // clients, and serves private data to clients that supply Arvados API
8 // tokens. It can be installed anywhere with access to Keep services,
9 // typically behind a web proxy that supports TLS.
11 // See http://doc.arvados.org/install/install-keep-web.html.
15 // The default cluster configuration file location is
16 // /etc/arvados/config.yml.
18 // Example configuration file
22 // SystemRootToken: ""
25 // ExternalURL: "https://example.com"
29 // "http://:1234/": {}
32 // "http://:1234/": {}
33 // ExternalURL: "https://download.example.com/"
35 // AnonymousUserToken: "xxxxxxxxxxxxxxxxxxxx"
37 // TrustAllContent: false
39 // Starting the server
41 // Start a server using the default config file
42 // /etc/arvados/config.yml:
46 // Start a server using the config file /path/to/config.yml:
48 // keep-web -config /path/to/config.yml
50 // Proxy configuration
52 // Keep-web does not support TLS natively. Typically, it is installed
53 // behind a proxy like nginx.
55 // Here is an example nginx configuration.
58 // upstream keep-web {
59 // server localhost:1234;
63 // server_name collections.example.com *.collections.example.com ~.*--collections.example.com;
64 // ssl_certificate /root/wildcard.example.com.crt;
65 // ssl_certificate_key /root/wildcard.example.com.key;
67 // proxy_pass http://keep-web;
68 // proxy_set_header Host $host;
69 // proxy_set_header X-Forwarded-For $remote_addr;
74 // It is not necessary to run keep-web on the same host as the nginx
75 // proxy. However, TLS is not used between nginx and keep-web, so
76 // intervening networks must be secured by other means.
78 // Anonymous downloads
80 // The "Users.AnonymousUserToken" configuration entry used when
81 // when processing anonymous requests, i.e., whenever a web client
82 // does not supply its own Arvados API token via path, query string,
83 // cookie, or request header.
88 // AnonymousUserToken: "xxxxxxxxxxxxxxxxxxxxxxx"
90 // See http://doc.arvados.org/install/install-keep-web.html for examples.
94 // See http://doc.arvados.org/api/keep-web-urls.html
96 // Attachment-Only host
98 // It is possible to serve untrusted content and accept user
99 // credentials at the same origin as long as the content is only
100 // downloaded, never executed by browsers. A single origin (hostname
101 // and port) can be designated as an "attachment-only" origin: cookies
102 // will be accepted and all responses will have a
103 // "Content-Disposition: attachment" header. This behavior is invoked
104 // only when the designated origin matches exactly the Host header
105 // provided by the client or downstream proxy.
111 // ExternalURL: "https://domain.example:9999"
113 // Trust All Content mode
115 // In TrustAllContent mode, Keep-web will accept credentials (API
116 // tokens) and serve any collection X at
117 // "https://collections.example.com/c=X/path/file.ext". This is
118 // UNSAFE except in the special case where everyone who is able write
119 // ANY data to Keep, and every JavaScript and HTML file written to
120 // Keep, is also trusted to read ALL of the data in Keep.
122 // In such cases you can enable trust-all-content mode.
127 // TrustAllContent: true
129 // When TrustAllContent is enabled, the only effect of the
130 // Attachment-Only host setting is to add a "Content-Disposition:
131 // attachment" header.
137 // ExternalURL: "https://domain.example:9999"
139 // TrustAllContent: true
141 // Depending on your site configuration, you might also want to enable
142 // the "trust all content" setting in Workbench. Normally, Workbench
143 // avoids redirecting requests to keep-web if they depend on
144 // TrustAllContent being enabled.
148 // Keep-web exposes request metrics in Prometheus text-based format at
149 // /metrics. The same information is also available as JSON at