From 67d1847cb35c297c421cdba65680407ea45c8ad4 Mon Sep 17 00:00:00 2001 From: Riyaz Faizullabhoy Date: Tue, 5 Apr 2016 16:48:42 -0700 Subject: [PATCH] Remove authkey usage Signed-off-by: Riyaz Faizullabhoy --- cmd/notary-server/config.go | 2 +- cmd/notary-signer/main.go | 2 +- storage/rethinkdb/rethinkdb.go | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cmd/notary-server/config.go b/cmd/notary-server/config.go index 2386c495fb..989e1473e3 100644 --- a/cmd/notary-server/config.go +++ b/cmd/notary-server/config.go @@ -90,7 +90,7 @@ func getStore(configuration *viper.Viper, hRegister healthRegister) ( if err != nil { return nil, err } - sess, err = rethinkdb.Connection(storeConfig.CA, storeConfig.Source, storeConfig.AuthKey) + sess, err = rethinkdb.Connection(storeConfig.CA, storeConfig.Source) if err == nil { s := storage.NewRethinkDBStorage(storeConfig.DBName, sess) store = *storage.NewTufMetaStorage(s) diff --git a/cmd/notary-signer/main.go b/cmd/notary-signer/main.go index 832c953508..8870e67058 100644 --- a/cmd/notary-signer/main.go +++ b/cmd/notary-signer/main.go @@ -93,7 +93,7 @@ func setUpCryptoservices(configuration *viper.Viper, allowedBackends []string) ( if err != nil { return nil, err } - sess, err = rethinkdb.Connection(storeConfig.CA, storeConfig.Source, storeConfig.AuthKey) + sess, err = rethinkdb.Connection(storeConfig.CA, storeConfig.Source) if err == nil { defaultAlias := configuration.GetString("storage.default_alias") if defaultAlias == "" { diff --git a/storage/rethinkdb/rethinkdb.go b/storage/rethinkdb/rethinkdb.go index c1b4edbb08..d272f2c806 100644 --- a/storage/rethinkdb/rethinkdb.go +++ b/storage/rethinkdb/rethinkdb.go @@ -18,8 +18,8 @@ type Timing struct { } // Connection sets up a RethinkDB connection to the host (`host:port` format) -// using the CA .pem file provided at path `caFile` and the authKey -func Connection(caFile, host, authKey string) (*gorethink.Session, error) { +// using the CA .pem file provided at path `caFile` +func Connection(caFile, host string) (*gorethink.Session, error) { tlsOpts := tlsconfig.Options{ CAFile: caFile, } @@ -30,7 +30,6 @@ func Connection(caFile, host, authKey string) (*gorethink.Session, error) { return gorethink.Connect( gorethink.ConnectOpts{ Address: host, - AuthKey: authKey, TLSConfig: t, }, )