Skip to content

Commit

Permalink
update redisPair to redisCredentials
Browse files Browse the repository at this point in the history
Signed-off-by: Valina Li <valina.li@intel.com>
  • Loading branch information
vli11 committed May 23, 2022
1 parent 7d80e1c commit 2d9de2f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/security/secretstore/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ func (b *Bootstrap) BootstrapHandler(ctx context.Context, _ *sync.WaitGroup, _ s
// Redis 5.x only supports a single shared password. When Redis 6 is released, this can be updated
// to a per service password.

redisPair, err := getDBCredential("security-bootstrapper-redis", cred, "redisdb")
redisCredentials, err := getDBCredential("security-bootstrapper-redis", cred, "redisdb")
if err != nil {
if err != errNotFound {
lc.Error("failed to determine if Redis credentials already exist or not: %w", err)
Expand All @@ -377,7 +377,7 @@ func (b *Bootstrap) BootstrapHandler(ctx context.Context, _ *sync.WaitGroup, _ s
os.Exit(1)
}

redisPair = UserPasswordPair{
redisCredentials = UserPasswordPair{
User: "default",
Password: defaultPassword,
}
Expand All @@ -400,7 +400,7 @@ func (b *Bootstrap) BootstrapHandler(ctx context.Context, _ *sync.WaitGroup, _ s

// add credentials to service path if specified and they're not already there
if len(service) != 0 {
err = addServiceCredential(lc, "redisdb", cred, service, redisPair)
err = addServiceCredential(lc, "redisdb", cred, service, redisCredentials)
if err != nil {
lc.Error(err.Error())
os.Exit(1)
Expand All @@ -410,13 +410,13 @@ func (b *Bootstrap) BootstrapHandler(ctx context.Context, _ *sync.WaitGroup, _ s

// security-bootstrapper-redis uses the path /v1/secret/edgex/security-bootstrapper-redis/ and go-mod-bootstrap
// with append the DB type (redisdb)
err = addDBCredential(lc, "security-bootstrapper-redis", cred, "redisdb", redisPair)
err = addDBCredential(lc, "security-bootstrapper-redis", cred, "redisdb", redisCredentials)
if err != nil {
lc.Error(err.Error())
os.Exit(1)
}

err = ConfigureSecureMessageBus(configuration.SecureMessageBus, redisPair, lc)
err = ConfigureSecureMessageBus(configuration.SecureMessageBus, redisCredentials, lc)
if err != nil {
lc.Errorf("failed to configure for Secure Message Bus: %s", err.Error())
os.Exit(1)
Expand Down

0 comments on commit 2d9de2f

Please sign in to comment.