1
0
Эх сурвалжийг харах

use GenerateOpaqueString also for node secrets

this method will use rand.Text() with Go 1.24

Signed-off-by: Nicola Murino <[email protected]>
Nicola Murino 10 сар өмнө
parent
commit
39c30c7d14

+ 1 - 1
internal/dataprovider/node.go

@@ -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.GenerateUniqueID())
+	n.Key = kms.NewPlainSecret(util.GenerateOpaqueString())
 	n.Key.SetAdditionalData(n.Host)
 	if err := n.Key.Encrypt(); err != nil {
 		return fmt.Errorf("unable to encrypt node key: %w", err)