Skip to content

Commit

Permalink
node: use a plain string as key
Browse files Browse the repository at this point in the history
Signed-off-by: Nicola Murino <[email protected]>
  • Loading branch information
drakkan committed Oct 28, 2024
1 parent 97bb004 commit 21bd8c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/dataprovider/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (n *NodeData) validate() error {
if n.Proto != NodeProtoHTTP && n.Proto != NodeProtoHTTPS {
return util.NewValidationError(fmt.Sprintf("invalid node proto: %s", n.Proto))
}
n.Key = kms.NewPlainSecret(util.BytesToString(util.GenerateRandomBytes(32)))
n.Key = kms.NewPlainSecret(util.GenerateUniqueID())
n.Key.SetAdditionalData(n.Host)
if err := n.Key.Encrypt(); err != nil {
return fmt.Errorf("unable to encrypt node key: %w", err)
Expand Down

0 comments on commit 21bd8c5

Please sign in to comment.