X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/0f668000c8cacec50804cb0019dbe7d7dc1d2b36..314f3c34442e0daffbea4ed62adea9e722673810:/services/keep-web/doc.go diff --git a/services/keep-web/doc.go b/services/keep-web/doc.go index bd0e2ca3a4..3326dd19d8 100644 --- a/services/keep-web/doc.go +++ b/services/keep-web/doc.go @@ -6,17 +6,33 @@ // // See http://doc.arvados.org/install/install-keep-web.html. // -// Run "keep-web -help" to show all supported options. +// Configuration +// +// The default configuration file location is +// /etc/arvados/keep-web/keep-web.yml. +// +// Example configuration file +// +// Client: +// APIHost: "zzzzz.arvadosapi.com:443" +// AuthToken: "" +// Insecure: false +// Listen: :1234 +// AnonymousTokens: +// - xxxxxxxxxxxxxxxxxxxx +// AttachmentOnlyHost: "" +// TrustAllContent: false // // Starting the server // -// Serve HTTP requests at port 1234 on all interfaces: +// Start a server using the default config file +// /etc/arvados/keep-web/keep-web.yml: // -// keep-web -address=:1234 +// keep-web // -// Serve HTTP requests at port 1234 on the interface with IP address 1.2.3.4: +// Start a server using the config file /path/to/keep-web.yml: // -// keep-web -address=1.2.3.4:1234 +// keep-web -config /path/to/keep-web.yml // // Proxy configuration // @@ -46,12 +62,24 @@ // proxy. However, TLS is not used between nginx and keep-web, so // intervening networks must be secured by other means. // +// Anonymous downloads +// +// The "AnonymousTokens" configuration entry is an array of tokens to +// use 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"] +// +// See http://doc.arvados.org/install/install-keep-web.html for examples. +// // Download URLs // // The following "same origin" URL patterns are supported for public -// collections (i.e., collections which can be served by keep-web -// without making use of any credentials supplied by the client). See -// "Same-origin URLs" below. +// collections and collections shared anonymously via secret links +// (i.e., collections which can be served by keep-web without making +// use of any implicit credentials like cookies). See "Same-origin +// URLs" below. // // http://collections.example.com/c=uuid_or_pdh/path/file.txt // http://collections.example.com/c=uuid_or_pdh/t=TOKEN/path/file.txt @@ -63,16 +91,18 @@ // http://uuid_or_pdh--collections.example.com/t=TOKEN/path/file.txt // // In the "multiple origin" form, the string "--" can be replaced with -// "." with identical results (assuming the upstream proxy is +// "." with identical results (assuming the downstream proxy is // configured accordingly). These two are equivalent: // // http://uuid_or_pdh--collections.example.com/path/file.txt // http://uuid_or_pdh.collections.example.com/path/file.txt // -// The first form ("uuid_or_pdh--collections.example.com") minimizes -// the cost and effort of deploying a wildcard TLS certificate for -// *.collections.example.com. The second form is likely to be easier -// to configure, and more efficient to run, on an upstream proxy. +// The first form (with "--" instead of ".") avoids the cost and +// effort of deploying a wildcard TLS certificate for +// *.collections.example.com at sites that already have a wildcard +// certificate for *.example.com. The second form is likely to be +// easier to configure, and more efficient to run, on a downstream +// proxy. // // In all of the above forms, the "collections.example.com" part can // be anything at all: keep-web itself ignores everything after the @@ -81,8 +111,8 @@ // // In all of the above forms, the "uuid_or_pdh" part can be either a // collection UUID or a portable data hash with the "+" character -// optionally replaced by "-". (Replacing "+" with "-" is mandatory -// when "uuid_or_pdh" appears in the domain name only because "+" is +// optionally replaced by "-". (When "uuid_or_pdh" appears in the +// domain name, replacing "+" with "-" is mandatory, because "+" is // not a valid character in a domain name.) // // In all of the above forms, a top level directory called "_" is @@ -173,8 +203,8 @@ // In such cases -- for example, a site which is not reachable from // the internet, where some data is world-readable from Arvados's // perspective but is intended to be available only to users within -// the local network -- the upstream proxy should configured to return -// 401 for all paths beginning with "/c=". +// the local network -- the downstream proxy should configured to +// return 401 for all paths beginning with "/c=". // // Same-origin URLs // @@ -195,27 +225,33 @@ // will be accepted and all responses will have a // "Content-Disposition: attachment" header. This behavior is invoked // only when the designated origin matches exactly the Host header -// provided by the client or upstream proxy. +// provided by the client or downstream proxy. // -// keep-web -address :9999 -attachment-only-host domain.example:9999 +// "AttachmentOnlyHost":"domain.example:9999" // // Trust All Content mode // -// In "trust all content" mode, Keep-web will accept credentials (API +// In TrustAllContent mode, Keep-web will accept credentials (API // tokens) and serve any collection X at -// "https://collections.example.com/collections/X/path/file.ext". -// This is UNSAFE except in the special case where everyone who is -// able write ANY data to Keep, and every JavaScript and HTML file -// written to Keep, is also trusted to read ALL of the data in Keep. +// "https://collections.example.com/c=X/path/file.ext". This is +// UNSAFE except in the special case where everyone who is able write +// ANY data to Keep, and every JavaScript and HTML file written to +// Keep, is also trusted to read ALL of the data in Keep. // // In such cases you can enable trust-all-content mode. // -// keep-web -address :9999 -trust-all-content +// "TrustAllContent":true // -// When using trust-all-content mode, the only effect of the -// -attachment-only-host option is to add a "Content-Disposition: +// When TrustAllContent is enabled, the only effect of the +// AttachmentOnlyHost flag is to add a "Content-Disposition: // attachment" header. // -// keep-web -address :9999 -attachment-only-host domain.example:9999 -trust-all-content +// "AttachmentOnlyHost":"domain.example:9999", +// "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. // package main