17170: Fixup gateway auth secret.
authorTom Clegg <tom@curii.com>
Wed, 13 Jan 2021 02:57:40 +0000 (21:57 -0500)
committerTom Clegg <tom@curii.com>
Wed, 13 Jan 2021 02:57:40 +0000 (21:57 -0500)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>

lib/controller/localdb/container_gateway.go
lib/dispatchcloud/worker/pool.go

index dd296c569cb3db9e1edd3ce8039d5c5170593c8b..f6eaea6d962f2249a837d54db94e9bd497c0d327 100644 (file)
@@ -63,7 +63,7 @@ func (conn *Conn) ContainerSSH(ctx context.Context, opts arvados.ContainerSSHOpt
                                return errors.New("no certificate received, cannot compute authorization header")
                        }
                        h := hmac.New(sha256.New, []byte(conn.cluster.SystemRootToken))
-                       fmt.Fprint(h, "%s", opts.UUID)
+                       fmt.Fprint(h, opts.UUID)
                        authKey := fmt.Sprintf("%x", h.Sum(nil))
                        h = hmac.New(sha256.New, []byte(authKey))
                        h.Write(rawCerts[0])
index e092e7adab5bfe0e3d9b5ff354ea4ff7ff371010..6a74280ca452e9b365f6a976f96e04ef03edc7e6 100644 (file)
@@ -996,7 +996,7 @@ func (wp *Pool) waitUntilLoaded() {
 
 func (wp *Pool) gatewayAuthSecret(uuid string) string {
        h := hmac.New(sha256.New, []byte(wp.systemRootToken))
-       fmt.Fprint(h, "%s", uuid)
+       fmt.Fprint(h, uuid)
        return fmt.Sprintf("%x", h.Sum(nil))
 }