[#306] cmd/node: Rename permitted_keys config value to authorized_keys

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-01-14 10:48:59 +03:00 committed by Alex Vanin
parent 0a0ee89665
commit 73e99fa590
2 changed files with 3 additions and 3 deletions

View file

@ -424,7 +424,7 @@ func defaultConfiguration(v *viper.Viper) {
v.SetDefault(cfgObjectRangePoolSize, 10)
v.SetDefault(cfgObjectRangeHashPoolSize, 10)
v.SetDefault(cfgCtrlSvcAllowedKeys, []string{})
v.SetDefault(cfgCtrlSvcAuthorizedKeys, []string{})
}
func (c *cfg) LocalAddress() *network.Address {

View file

@ -15,14 +15,14 @@ import (
const (
cfgCtrlSvcSection = "control"
cfgCtrlSvcAllowedKeys = cfgCtrlSvcSection + ".permitted_keys"
cfgCtrlSvcAuthorizedKeys = cfgCtrlSvcSection + ".authorized_keys"
cfgCtrlSvcGRPCSection = cfgCtrlSvcSection + ".grpc"
cfgCtrlGRPCEndpoint = cfgCtrlSvcGRPCSection + ".endpoint"
)
func initControlService(c *cfg) {
strKeys := c.viper.GetStringSlice(cfgCtrlSvcAllowedKeys)
strKeys := c.viper.GetStringSlice(cfgCtrlSvcAuthorizedKeys)
keys := make([][]byte, 0, len(strKeys)+1) // +1 for node key
keys = append(keys, crypto.MarshalPublicKey(&c.key.PublicKey))