[ARVADOS] updated: 87640a81e725d0246837994acbb3a696d14401c6

git at public.curoverse.com git at public.curoverse.com
Fri Oct 30 14:24:13 EDT 2015


Summary of changes:
 services/api/Gemfile.lock        |  7 +++++--
 services/keep-web/anonymous.go   | 24 ++++++++++++++++++++++++
 services/keep-web/handler.go     |  5 ++---
 services/keep-web/server_test.go |  4 ++--
 4 files changed, 33 insertions(+), 7 deletions(-)
 create mode 100644 services/keep-web/anonymous.go

       via  87640a81e725d0246837994acbb3a696d14401c6 (commit)
       via  0477296dadd43b7fff9d8cf282bfa183fca3e138 (commit)
       via  4103db7eade3ce5e06889adf12264fa03980d9d7 (commit)
       via  8454069c654cdf3fb26d129cd27a4fbfbe8dfa3c (commit)
      from  6e76e3322d66f609dabcd34c98cba34bd739e089 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 87640a81e725d0246837994acbb3a696d14401c6
Merge: 4103db7 0477296
Author: Tom Clegg <tom at curoverse.com>
Date:   Fri Oct 30 14:22:21 2015 -0400

    5824: Merge branch 'master' into 5824-keep-web


commit 4103db7eade3ce5e06889adf12264fa03980d9d7
Author: Tom Clegg <tom at curoverse.com>
Date:   Fri Oct 30 14:02:10 2015 -0400

    5824: Add -anonymous-token flag.

diff --git a/services/keep-web/anonymous.go b/services/keep-web/anonymous.go
new file mode 100644
index 0000000..db40241
--- /dev/null
+++ b/services/keep-web/anonymous.go
@@ -0,0 +1,24 @@
+package main
+
+import (
+	"flag"
+	"fmt"
+)
+
+var anonymousTokens tokenSet
+
+type tokenSet []string
+
+func (ts *tokenSet) Set(t string) error {
+	*ts = append(*ts, t)
+	return nil
+}
+
+func (ts *tokenSet) String() string {
+	return fmt.Sprintf("%+v", (*ts)[:])
+}
+
+func init() {
+	flag.Var(&anonymousTokens, "anonymous-token",
+		"Try using the specified token when a client does not provide a valid token. If this flag is used multiple times, each token will be tried in turn until one works.")
+}
diff --git a/services/keep-web/handler.go b/services/keep-web/handler.go
index 2704263..21d58b7 100644
--- a/services/keep-web/handler.go
+++ b/services/keep-web/handler.go
@@ -23,15 +23,14 @@ type handler struct{}
 var (
 	clientPool         = arvadosclient.MakeClientPool()
 	trustAllContent    = false
-	anonymousTokens    []string
 	attachmentOnlyHost = ""
 )
 
 func init() {
-	flag.BoolVar(&trustAllContent, "trust-all-content", false,
-		"Serve non-public content from a single origin. Dangerous: read docs before using!")
 	flag.StringVar(&attachmentOnlyHost, "attachment-only-host", "",
 		"Accept credentials, and add \"Content-Disposition: attachment\" response headers, for requests at this hostname:port. Prohibiting inline display makes it possible to serve untrusted and non-public content from a single origin, i.e., without wildcard DNS or SSL.")
+	flag.BoolVar(&trustAllContent, "trust-all-content", false,
+		"Serve non-public content from a single origin. Dangerous: read docs before using!")
 }
 
 // return a UUID or PDH if s begins with a UUID or URL-encoded PDH;

commit 8454069c654cdf3fb26d129cd27a4fbfbe8dfa3c
Author: Tom Clegg <tom at curoverse.com>
Date:   Fri Oct 30 14:01:20 2015 -0400

    5824: Update arvadostest usage.

diff --git a/services/keep-web/server_test.go b/services/keep-web/server_test.go
index 8e3a21a..cda8b17 100644
--- a/services/keep-web/server_test.go
+++ b/services/keep-web/server_test.go
@@ -282,7 +282,7 @@ func (s *IntegrationSuite) runCurl(c *check.C, token, host, uri string, args ...
 
 func (s *IntegrationSuite) SetUpSuite(c *check.C) {
 	arvadostest.StartAPI()
-	arvadostest.StartKeep()
+	arvadostest.StartKeep(2, true)
 
 	arv, err := arvadosclient.MakeArvadosClient()
 	c.Assert(err, check.Equals, nil)
@@ -295,7 +295,7 @@ func (s *IntegrationSuite) SetUpSuite(c *check.C) {
 }
 
 func (s *IntegrationSuite) TearDownSuite(c *check.C) {
-	arvadostest.StopKeep()
+	arvadostest.StopKeep(2)
 	arvadostest.StopAPI()
 }
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list