forked from TrueCloudLab/frostfs-s3-gw
[#8] Check error after setting gate's auth keys
Signed-off-by: Pavel Korotkov <pkorotkov@gmail.com>
This commit is contained in:
parent
1e608634e7
commit
c5489da3cc
1 changed files with 4 additions and 2 deletions
|
@ -118,9 +118,11 @@ func fetchAuthCenter(l *zap.Logger, v *viper.Viper, peers []pool.Peer) (*auth.Ce
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "failed to create auth center")
|
return nil, errors.Wrap(err, "failed to create auth center")
|
||||||
}
|
}
|
||||||
center.SetUserAuthKeys(gateAuthPrivateKey)
|
if err = center.SetUserAuthKeys(gateAuthPrivateKey); err != nil {
|
||||||
|
return nil, errors.Wrap(err, "failed to set gate auth keys")
|
||||||
|
}
|
||||||
if err = center.SetNeoFSKeys(neofsPrivateKey); err != nil {
|
if err = center.SetNeoFSKeys(neofsPrivateKey); err != nil {
|
||||||
return nil, err
|
return nil, errors.Wrap(err, "failed to set NeoFS keys")
|
||||||
}
|
}
|
||||||
return center, nil
|
return center, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue