From 9fd3eea105016f7ecca0c83341655c46b79c7a0f Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Thu, 28 Dec 2017 12:16:43 -0800 Subject: [PATCH] Signer API nits... (#85) * Rename `KeyFringerPrint` to `KeyID`. Internally we differentiate between IDs and Fingerprints, but in the public API, we should be good with just an ID for now. Shorter is better. * Fix two formatting issues from `goimport(1)`. * Whitespace nit * Comment nit: TRITON_KEY_ID is preferred over SDC_KEY_ID. * Add a comment for GetTritonEnv(). * Rename `UserName` to `Username` in the input structs for signers. Fixes: #84 * Rename SDC variables to be Triton variables. * Move examples into their own directory. Having `gorename(1)` just work is a "good thing(tm)." --- README.md | 16 +++---- authentication/private_key_signer.go | 15 ++++--- authentication/ssh_agent_signer.go | 17 ++++---- client/client.go | 14 +++++-- .../{account_info.go => account_info/main.go} | 10 ++--- .../account/{config.go => config/main.go} | 10 ++--- examples/account/{keys.go => keys/main.go} | 10 ++--- .../main.go} | 10 ++--- .../{instances.go => instances/main.go} | 10 ++--- examples/network/create_fabric.go | 10 ++--- .../{createjob.go => create_job/main.go} | 10 ++--- .../{forceDelete.go => force_delete/main.go} | 10 ++--- .../{forcePut.go => force_put/main.go} | 10 ++--- .../{getobject.go => get_object/main.go} | 10 ++--- examples/storage/{mls.go => mls/main.go} | 10 ++--- .../{putobject.go => object_put/main.go} | 10 ++--- .../storage/{signUrl.go => sign_url/main.go} | 10 ++--- testutils/runner.go | 42 +++++++++---------- 18 files changed, 119 insertions(+), 115 deletions(-) rename examples/account/{account_info.go => account_info/main.go} (94%) rename examples/account/{config.go => config/main.go} (95%) rename examples/account/{keys.go => keys/main.go} (94%) rename examples/compute/{create_instance.go => create_instance/main.go} (96%) rename examples/compute/{instances.go => instances/main.go} (93%) rename examples/storage/{createjob.go => create_job/main.go} (96%) rename examples/storage/{forceDelete.go => force_delete/main.go} (93%) rename examples/storage/{forcePut.go => force_put/main.go} (94%) rename examples/storage/{getobject.go => get_object/main.go} (95%) rename examples/storage/{mls.go => mls/main.go} (93%) rename examples/storage/{putobject.go => object_put/main.go} (93%) rename examples/storage/{signUrl.go => sign_url/main.go} (93%) diff --git a/README.md b/README.md index ed23671..c1bd23b 100644 --- a/README.md +++ b/README.md @@ -15,15 +15,15 @@ using a key stored with the local SSH Agent (using an [`SSHAgentSigner`][6]. To construct a Signer, use the `New*` range of methods in the `authentication` package. In the case of `authentication.NewSSHAgentSigner`, the parameters are the fingerprint of the key with which to sign, and the account name (normally -stored in the `TRITON_ACCOUNT` environment variable). There is also support for +stored in the `TRITON_ACCOUNT` environment variable). There is also support for passing in a username, this will allow you to use an account other than the main Triton account. For example: ```go input := authentication.SSHAgentSignerInput{ - KeyFingerPrint: "a4:c6:f3:75:80:27:e0:03:a9:98:79:ef:c5:0a:06:11", - AccountName: "AccountName", - UserName: "UserName", + KeyID: "a4:c6:f3:75:80:27:e0:03:a9:98:79:ef:c5:0a:06:11", + AccountName: "AccountName", + UserName: "UserName", } sshKeySigner, err := authentication.NewSSHAgentSigner(input) if err != nil { @@ -162,9 +162,9 @@ func main() { if keyMaterial == "" { input := authentication.SSHAgentSignerInput{ - KeyFingerPrint: keyID, - AccountName: accountName, - UserName: userName, + KeyID: keyID, + AccountName: accountName, + UserName: userName, } signer, err = authentication.NewSSHAgentSigner(input) if err != nil { @@ -195,7 +195,7 @@ func main() { } input := authentication.PrivateKeySignerInput{ - KeyFingerPrint: keyID, + KeyID: keyID, PrivateKeyMaterial: keyBytes, AccountName: accountName, UserName: userName, diff --git a/authentication/private_key_signer.go b/authentication/private_key_signer.go index 4baa66a..35abff0 100644 --- a/authentication/private_key_signer.go +++ b/authentication/private_key_signer.go @@ -9,9 +9,8 @@ import ( "encoding/pem" "errors" "fmt" - "strings" - "path" + "strings" "github.com/hashicorp/errwrap" "golang.org/x/crypto/ssh" @@ -29,14 +28,14 @@ type PrivateKeySigner struct { } type PrivateKeySignerInput struct { - KeyFingerPrint string + KeyID string PrivateKeyMaterial []byte AccountName string - UserName string + Username string } func NewPrivateKeySigner(input PrivateKeySignerInput) (*PrivateKeySigner, error) { - keyFingerprintMD5 := strings.Replace(input.KeyFingerPrint, ":", "", -1) + keyFingerprintMD5 := strings.Replace(input.KeyID, ":", "", -1) block, _ := pem.Decode(input.PrivateKeyMaterial) if block == nil { @@ -61,15 +60,15 @@ func NewPrivateKeySigner(input PrivateKeySignerInput) (*PrivateKeySigner, error) signer := &PrivateKeySigner{ formattedKeyFingerprint: displayKeyFingerprint, - keyFingerprint: input.KeyFingerPrint, + keyFingerprint: input.KeyID, accountName: input.AccountName, hashFunc: crypto.SHA1, privateKey: rsakey, } - if input.UserName != "" { - signer.userName = input.UserName + if input.Username != "" { + signer.userName = input.Username } _, algorithm, err := signer.SignRaw("HelloWorld") diff --git a/authentication/ssh_agent_signer.go b/authentication/ssh_agent_signer.go index 22d9e2f..c068dae 100644 --- a/authentication/ssh_agent_signer.go +++ b/authentication/ssh_agent_signer.go @@ -8,9 +8,8 @@ import ( "fmt" "net" "os" - "strings" - "path" + "strings" "github.com/hashicorp/errwrap" "golang.org/x/crypto/ssh" @@ -34,9 +33,9 @@ type SSHAgentSigner struct { } type SSHAgentSignerInput struct { - KeyFingerPrint string - AccountName string - UserName string + KeyID string + AccountName string + Username string } func NewSSHAgentSigner(input SSHAgentSignerInput) (*SSHAgentSigner, error) { @@ -53,7 +52,7 @@ func NewSSHAgentSigner(input SSHAgentSignerInput) (*SSHAgentSigner, error) { ag := agent.NewClient(conn) signer := &SSHAgentSigner{ - keyFingerprint: input.KeyFingerPrint, + keyFingerprint: input.KeyID, accountName: input.AccountName, agent: ag, } @@ -64,9 +63,9 @@ func NewSSHAgentSigner(input SSHAgentSignerInput) (*SSHAgentSigner, error) { } signer.key = matchingKey signer.formattedKeyFingerprint = formatPublicKeyFingerprint(signer.key, true) - if input.UserName != "" { - signer.userName = input.UserName - signer.keyIdentifier = path.Join("/", signer.accountName, "users", input.UserName, "keys", signer.formattedKeyFingerprint) + if input.Username != "" { + signer.userName = input.Username + signer.keyIdentifier = path.Join("/", signer.accountName, "users", input.Username, "keys", signer.formattedKeyFingerprint) } else { signer.keyIdentifier = path.Join("/", signer.accountName, "keys", signer.formattedKeyFingerprint) } diff --git a/client/client.go b/client/client.go index 88c6a92..cccf3a2 100644 --- a/client/client.go +++ b/client/client.go @@ -82,7 +82,7 @@ func New(tritonURL string, mantaURL string, accountName string, signers ...authe } // Default to constructing an SSHAgentSigner if there are no other signers - // passed into NewClient and there's an SDC_KEY_ID and SSH_AUTH_SOCK + // passed into NewClient and there's an TRITON_KEY_ID and SSH_AUTH_SOCK // available in the user's environ(7). if len(newClient.Authorizers) == 0 { if err := newClient.DefaultAuth(); err != nil { @@ -95,12 +95,18 @@ func New(tritonURL string, mantaURL string, accountName string, signers ...authe var envPrefixes = []string{"TRITON", "SDC"} +// GetTritonEnv looks up environment variables using the preferred "TRITON" +// prefix, but falls back to the SDC prefix. For example, looking up "USER" +// will search for "TRITON_USER" followed by "SDC_USER". If the environment +// variable is not set, an empty string is returned. GetTritonEnv() is used to +// aid in the transition and deprecation of the SDC_* environment variables. func GetTritonEnv(name string) string { for _, prefix := range envPrefixes { if val, found := os.LookupEnv(prefix + "_" + name); found { return val } } + return "" } @@ -112,9 +118,9 @@ func (c *Client) DefaultAuth() error { tritonKeyId := GetTritonEnv("KEY_ID") if tritonKeyId != "" { input := authentication.SSHAgentSignerInput{ - KeyFingerPrint: tritonKeyId, - AccountName: c.AccountName, - UserName: c.Username, + KeyID: tritonKeyId, + AccountName: c.AccountName, + Username: c.Username, } defaultSigner, err := authentication.NewSSHAgentSigner(input) if err != nil { diff --git a/examples/account/account_info.go b/examples/account/account_info/main.go similarity index 94% rename from examples/account/account_info.go rename to examples/account/account_info/main.go index 2b4ef0e..70a71ca 100644 --- a/examples/account/account_info.go +++ b/examples/account/account_info/main.go @@ -31,9 +31,9 @@ func main() { if keyMaterial == "" { input := authentication.SSHAgentSignerInput{ - KeyFingerPrint: keyID, - AccountName: accountName, - UserName: userName, + KeyID: keyID, + AccountName: accountName, + Username: userName, } signer, err = authentication.NewSSHAgentSigner(input) if err != nil { @@ -64,10 +64,10 @@ func main() { } input := authentication.PrivateKeySignerInput{ - KeyFingerPrint: keyID, + KeyID: keyID, PrivateKeyMaterial: keyBytes, AccountName: accountName, - UserName: userName, + Username: userName, } signer, err = authentication.NewPrivateKeySigner(input) if err != nil { diff --git a/examples/account/config.go b/examples/account/config/main.go similarity index 95% rename from examples/account/config.go rename to examples/account/config/main.go index 5854f08..4ab41dc 100644 --- a/examples/account/config.go +++ b/examples/account/config/main.go @@ -26,9 +26,9 @@ func main() { if keyMaterial == "" { input := authentication.SSHAgentSignerInput{ - KeyFingerPrint: keyID, - AccountName: accountName, - UserName: userName, + KeyID: keyID, + AccountName: accountName, + Username: userName, } signer, err = authentication.NewSSHAgentSigner(input) if err != nil { @@ -59,10 +59,10 @@ func main() { } input := authentication.PrivateKeySignerInput{ - KeyFingerPrint: keyID, + KeyID: keyID, PrivateKeyMaterial: keyBytes, AccountName: accountName, - UserName: userName, + Username: userName, } signer, err = authentication.NewPrivateKeySigner(input) if err != nil { diff --git a/examples/account/keys.go b/examples/account/keys/main.go similarity index 94% rename from examples/account/keys.go rename to examples/account/keys/main.go index b113607..c8713e8 100644 --- a/examples/account/keys.go +++ b/examples/account/keys/main.go @@ -25,9 +25,9 @@ func main() { if keyMaterial == "" { input := authentication.SSHAgentSignerInput{ - KeyFingerPrint: keyID, - AccountName: accountName, - UserName: userName, + KeyID: keyID, + AccountName: accountName, + Username: userName, } signer, err = authentication.NewSSHAgentSigner(input) if err != nil { @@ -58,10 +58,10 @@ func main() { } input := authentication.PrivateKeySignerInput{ - KeyFingerPrint: keyID, + KeyID: keyID, PrivateKeyMaterial: keyBytes, AccountName: accountName, - UserName: userName, + Username: userName, } signer, err = authentication.NewPrivateKeySigner(input) if err != nil { diff --git a/examples/compute/create_instance.go b/examples/compute/create_instance/main.go similarity index 96% rename from examples/compute/create_instance.go rename to examples/compute/create_instance/main.go index df157b2..a2bbaf8 100644 --- a/examples/compute/create_instance.go +++ b/examples/compute/create_instance/main.go @@ -33,9 +33,9 @@ func main() { if keyMaterial == "" { input := authentication.SSHAgentSignerInput{ - KeyFingerPrint: keyID, - AccountName: accountName, - UserName: userName, + KeyID: keyID, + AccountName: accountName, + Username: userName, } signer, err = authentication.NewSSHAgentSigner(input) if err != nil { @@ -66,10 +66,10 @@ func main() { } input := authentication.PrivateKeySignerInput{ - KeyFingerPrint: keyID, + KeyID: keyID, PrivateKeyMaterial: keyBytes, AccountName: accountName, - UserName: userName, + Username: userName, } signer, err = authentication.NewPrivateKeySigner(input) if err != nil { diff --git a/examples/compute/instances.go b/examples/compute/instances/main.go similarity index 93% rename from examples/compute/instances.go rename to examples/compute/instances/main.go index 84d94d7..e74c075 100644 --- a/examples/compute/instances.go +++ b/examples/compute/instances/main.go @@ -24,9 +24,9 @@ func main() { if keyMaterial == "" { input := authentication.SSHAgentSignerInput{ - KeyFingerPrint: keyID, - AccountName: accountName, - UserName: userName, + KeyID: keyID, + AccountName: accountName, + Username: userName, } signer, err = authentication.NewSSHAgentSigner(input) if err != nil { @@ -57,10 +57,10 @@ func main() { } input := authentication.PrivateKeySignerInput{ - KeyFingerPrint: keyID, + KeyID: keyID, PrivateKeyMaterial: keyBytes, AccountName: accountName, - UserName: userName, + Username: userName, } signer, err = authentication.NewPrivateKeySigner(input) if err != nil { diff --git a/examples/network/create_fabric.go b/examples/network/create_fabric.go index 3e845e0..de8e24f 100644 --- a/examples/network/create_fabric.go +++ b/examples/network/create_fabric.go @@ -25,9 +25,9 @@ func main() { if keyMaterial == "" { input := authentication.SSHAgentSignerInput{ - KeyFingerPrint: keyID, - AccountName: accountName, - UserName: userName, + KeyID: keyID, + AccountName: accountName, + Username: userName, } signer, err = authentication.NewSSHAgentSigner(input) if err != nil { @@ -58,10 +58,10 @@ func main() { } input := authentication.PrivateKeySignerInput{ - KeyFingerPrint: keyID, + KeyID: keyID, PrivateKeyMaterial: keyBytes, AccountName: accountName, - UserName: userName, + Username: userName, } signer, err = authentication.NewPrivateKeySigner(input) if err != nil { diff --git a/examples/storage/createjob.go b/examples/storage/create_job/main.go similarity index 96% rename from examples/storage/createjob.go rename to examples/storage/create_job/main.go index 6cdbc9b..07f79a5 100644 --- a/examples/storage/createjob.go +++ b/examples/storage/create_job/main.go @@ -27,9 +27,9 @@ func main() { if keyMaterial == "" { input := authentication.SSHAgentSignerInput{ - KeyFingerPrint: keyID, - AccountName: accountName, - UserName: userName, + KeyID: keyID, + AccountName: accountName, + Username: userName, } signer, err = authentication.NewSSHAgentSigner(input) if err != nil { @@ -60,10 +60,10 @@ func main() { } input := authentication.PrivateKeySignerInput{ - KeyFingerPrint: keyID, + KeyID: keyID, PrivateKeyMaterial: keyBytes, AccountName: accountName, - UserName: userName, + Username: userName, } signer, err = authentication.NewPrivateKeySigner(input) if err != nil { diff --git a/examples/storage/forceDelete.go b/examples/storage/force_delete/main.go similarity index 93% rename from examples/storage/forceDelete.go rename to examples/storage/force_delete/main.go index 7256f35..698abc1 100644 --- a/examples/storage/forceDelete.go +++ b/examples/storage/force_delete/main.go @@ -27,9 +27,9 @@ func main() { if keyMaterial == "" { input := authentication.SSHAgentSignerInput{ - KeyFingerPrint: keyID, - AccountName: mantaUser, - UserName: userName, + KeyID: keyID, + AccountName: mantaUser, + Username: userName, } signer, err = authentication.NewSSHAgentSigner(input) if err != nil { @@ -60,10 +60,10 @@ func main() { } input := authentication.PrivateKeySignerInput{ - KeyFingerPrint: keyID, + KeyID: keyID, PrivateKeyMaterial: keyBytes, AccountName: mantaUser, - UserName: userName, + Username: userName, } signer, err = authentication.NewPrivateKeySigner(input) if err != nil { diff --git a/examples/storage/forcePut.go b/examples/storage/force_put/main.go similarity index 94% rename from examples/storage/forcePut.go rename to examples/storage/force_put/main.go index 9805710..f863e1c 100644 --- a/examples/storage/forcePut.go +++ b/examples/storage/force_put/main.go @@ -26,9 +26,9 @@ func main() { if keyMaterial == "" { input := authentication.SSHAgentSignerInput{ - KeyFingerPrint: keyID, - AccountName: mantaUser, - UserName: userName, + KeyID: keyID, + AccountName: mantaUser, + Username: userName, } signer, err = authentication.NewSSHAgentSigner(input) if err != nil { @@ -59,10 +59,10 @@ func main() { } input := authentication.PrivateKeySignerInput{ - KeyFingerPrint: keyID, + KeyID: keyID, PrivateKeyMaterial: keyBytes, AccountName: mantaUser, - UserName: userName, + Username: userName, } signer, err = authentication.NewPrivateKeySigner(input) if err != nil { diff --git a/examples/storage/getobject.go b/examples/storage/get_object/main.go similarity index 95% rename from examples/storage/getobject.go rename to examples/storage/get_object/main.go index 08f95d1..e40f705 100644 --- a/examples/storage/getobject.go +++ b/examples/storage/get_object/main.go @@ -30,9 +30,9 @@ func main() { if keyMaterial == "" { input := authentication.SSHAgentSignerInput{ - KeyFingerPrint: keyID, - AccountName: accountName, - UserName: userName, + KeyID: keyID, + AccountName: accountName, + Username: userName, } signer, err = authentication.NewSSHAgentSigner(input) if err != nil { @@ -63,10 +63,10 @@ func main() { } input := authentication.PrivateKeySignerInput{ - KeyFingerPrint: keyID, + KeyID: keyID, PrivateKeyMaterial: keyBytes, AccountName: accountName, - UserName: userName, + Username: userName, } signer, err = authentication.NewPrivateKeySigner(input) if err != nil { diff --git a/examples/storage/mls.go b/examples/storage/mls/main.go similarity index 93% rename from examples/storage/mls.go rename to examples/storage/mls/main.go index 7e041cb..01c419d 100644 --- a/examples/storage/mls.go +++ b/examples/storage/mls/main.go @@ -25,9 +25,9 @@ func main() { if keyMaterial == "" { input := authentication.SSHAgentSignerInput{ - KeyFingerPrint: keyID, - AccountName: accountName, - UserName: userName, + KeyID: keyID, + AccountName: accountName, + Username: userName, } signer, err = authentication.NewSSHAgentSigner(input) if err != nil { @@ -58,10 +58,10 @@ func main() { } input := authentication.PrivateKeySignerInput{ - KeyFingerPrint: keyID, + KeyID: keyID, PrivateKeyMaterial: keyBytes, AccountName: accountName, - UserName: userName, + Username: userName, } signer, err = authentication.NewPrivateKeySigner(input) if err != nil { diff --git a/examples/storage/putobject.go b/examples/storage/object_put/main.go similarity index 93% rename from examples/storage/putobject.go rename to examples/storage/object_put/main.go index 8cdcf2e..c55d955 100644 --- a/examples/storage/putobject.go +++ b/examples/storage/object_put/main.go @@ -25,9 +25,9 @@ func main() { if keyMaterial == "" { input := authentication.SSHAgentSignerInput{ - KeyFingerPrint: keyID, - AccountName: accountName, - UserName: userName, + KeyID: keyID, + AccountName: accountName, + Username: userName, } signer, err = authentication.NewSSHAgentSigner(input) if err != nil { @@ -58,10 +58,10 @@ func main() { } input := authentication.PrivateKeySignerInput{ - KeyFingerPrint: keyID, + KeyID: keyID, PrivateKeyMaterial: keyBytes, AccountName: accountName, - UserName: userName, + Username: userName, } signer, err = authentication.NewPrivateKeySigner(input) if err != nil { diff --git a/examples/storage/signUrl.go b/examples/storage/sign_url/main.go similarity index 93% rename from examples/storage/signUrl.go rename to examples/storage/sign_url/main.go index 0b04d0e..b168a18 100644 --- a/examples/storage/signUrl.go +++ b/examples/storage/sign_url/main.go @@ -25,9 +25,9 @@ func main() { if keyMaterial == "" { input := authentication.SSHAgentSignerInput{ - KeyFingerPrint: keyID, - AccountName: accountName, - UserName: userName, + KeyID: keyID, + AccountName: accountName, + Username: userName, } signer, err = authentication.NewSSHAgentSigner(input) if err != nil { @@ -58,10 +58,10 @@ func main() { } input := authentication.PrivateKeySignerInput{ - KeyFingerPrint: keyID, + KeyID: keyID, PrivateKeyMaterial: keyBytes, AccountName: accountName, - UserName: userName, + Username: userName, } signer, err = authentication.NewPrivateKeySigner(input) if err != nil { diff --git a/testutils/runner.go b/testutils/runner.go index 8f6afa4..c64ba59 100644 --- a/testutils/runner.go +++ b/testutils/runner.go @@ -35,25 +35,25 @@ func AccTest(t *testing.T, c TestCase) { return } - sdcURL := client.GetTritonEnv("URL") - sdcAccount := client.GetTritonEnv("ACCOUNT") - sdcKeyId := client.GetTritonEnv("KEY_ID") - sdcKeyMaterial := client.GetTritonEnv("KEY_MATERIAL") + tritonURL := client.GetTritonEnv("URL") + tritonAccount := client.GetTritonEnv("ACCOUNT") + tritonKeyID := client.GetTritonEnv("KEY_ID") + tritonKeyMaterial := client.GetTritonEnv("KEY_MATERIAL") userName := client.GetTritonEnv("USER") mantaURL := client.GetTritonEnv("MANTA_URL") var prerollErrors []error - if sdcURL == "" { + if tritonURL == "" { prerollErrors = append(prerollErrors, - errors.New("The SDC_URL / TRITON_URL environment variable must be set to run acceptance tests")) + errors.New("The TRITON_URL environment variable must be set to run acceptance tests")) } - if sdcAccount == "" { + if tritonAccount == "" { prerollErrors = append(prerollErrors, - errors.New("The SDC_ACCOUNT / TRITON_ACCOUNT environment variable must be set to run acceptance tests")) + errors.New("The TRITON_ACCOUNT environment variable must be set to run acceptance tests")) } - if sdcKeyId == "" { + if tritonKeyID == "" { prerollErrors = append(prerollErrors, - errors.New("The SDC_KEY_ID / TRITON_KEY_ID environment variable must be set to run acceptance tests")) + errors.New("The TRITON_KEY_ID environment variable must be set to run acceptance tests")) } if len(prerollErrors) > 0 { for _, err := range prerollErrors { @@ -64,13 +64,13 @@ func AccTest(t *testing.T, c TestCase) { var signer authentication.Signer var err error - if sdcKeyMaterial != "" { + if tritonKeyMaterial != "" { log.Println("[INFO] Creating Triton Client with Private Key Signer...") input := authentication.PrivateKeySignerInput{ - KeyFingerPrint: sdcKeyId, - PrivateKeyMaterial: []byte(sdcKeyMaterial), - AccountName: sdcAccount, - UserName: userName, + KeyID: tritonKeyID, + PrivateKeyMaterial: []byte(tritonKeyMaterial), + AccountName: tritonAccount, + Username: userName, } signer, err = authentication.NewPrivateKeySigner(input) if err != nil { @@ -79,9 +79,9 @@ func AccTest(t *testing.T, c TestCase) { } else { log.Println("[INFO] Creating Triton Client with SSH Key Signer...") input := authentication.SSHAgentSignerInput{ - KeyFingerPrint: sdcKeyId, - AccountName: sdcAccount, - UserName: userName, + KeyID: tritonKeyID, + AccountName: tritonAccount, + Username: userName, } signer, err = authentication.NewSSHAgentSigner(input) if err != nil { @@ -92,15 +92,15 @@ func AccTest(t *testing.T, c TestCase) { // Old world... we spun up a universal client. This is pushed deeper into // the process within `testutils.StepClient`. // - // client, err := NewClient(sdcURL, sdcAccount, signer) + // client, err := NewClient(tritonURL, tritonAccount, signer) // if err != nil { // t.Fatalf("Error creating Triton Client: %s", err) // } config := &triton.ClientConfig{ - TritonURL: sdcURL, + TritonURL: tritonURL, MantaURL: mantaURL, - AccountName: sdcAccount, + AccountName: tritonAccount, Username: userName, Signers: []authentication.Signer{signer}, }