5824: Add doc.go
[arvados.git] / services / keep-web / doc.go
1 // Keep-web provides read-only HTTP access to files stored in Keep. It
2 // serves public data to anonymous and unauthenticated clients, and
3 // accepts authentication via Arvados tokens. It can be installed
4 // anywhere with access to Keep services, typically behind a web proxy
5 // that provides SSL support.
6 //
7 // Given that this amounts to a web hosting service for arbitrary
8 // content, it is vital to ensure that at least one of the following is
9 // true:
10 //
11 // Usage
12 //
13 // Listening:
14 //
15 //   keep-web -address=:1234
16 //
17 // Start an HTTP server on port 1234.
18 //
19 //   keep-web -address=1.2.3.4:1234
20 //
21 // Start an HTTP server on port 1234, on the interface with IP address 1.2.3.4.
22 //
23 // Keep-web does not support SSL natively. Typically, it is installed
24 // behind a proxy like nginx.
25 //
26 package main
27
28 // TODO(TC): Implement
29 //
30 // Trusted content
31 //
32 // Normally, Keep-web is installed using a wildcard DNS entry and a
33 // wildcard HTTPS certificate, serving data from collection X at
34 // ``https://X.dl.example.com/path/file.ext''.
35 //
36 // It will also serve publicly accessible data at
37 // ``https://dl.example.com/collections/X/path/file.txt'', but it does not
38 // accept any kind of credentials at paths like these.
39 //
40 // In "trust all content" mode, Keep-web will accept credentials (API
41 // tokens) and serve any collection X at
42 // "https://dl.example.com/collections/X/path/file.ext".  This is
43 // UNSAFE except in the special case where everyone who is able write
44 // ANY data to Keep, and every JavaScript and HTML file written to
45 // Keep, is also trusted to read ALL of the data in Keep.
46 //
47 // In such cases you can enable trust-all-content mode.
48 //
49 //   keep-web -trust-all-content [...]
50 //
51 // In the general case, this should not be enabled: A web page stored
52 // in collection X can execute JavaScript code that uses the current
53 // viewer's credentials to download additional data -- data which is
54 // accessible to the current viewer, but not to the author of
55 // collection X -- from the same origin (``https://dl.example.com/'')
56 // and upload it to some other site chosen by the author of collection
57 // X.