From 39c30c7d14b8e9830df9381c86d77fc50be370ad Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Wed, 27 Nov 2024 19:05:19 +0100 Subject: [PATCH] use GenerateOpaqueString also for node secrets this method will use rand.Text() with Go 1.24 Signed-off-by: Nicola Murino --- internal/dataprovider/node.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/dataprovider/node.go b/internal/dataprovider/node.go index 50c90546c..5bdf0c25d 100644 --- a/internal/dataprovider/node.go +++ b/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)