Skip to content

Commit 39c30c7

Browse files
committed
use GenerateOpaqueString also for node secrets
this method will use rand.Text() with Go 1.24 Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
1 parent d1d7ab2 commit 39c30c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/dataprovider/node.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func (n *NodeData) validate() error {
9999
if n.Proto != NodeProtoHTTP && n.Proto != NodeProtoHTTPS {
100100
return util.NewValidationError(fmt.Sprintf("invalid node proto: %s", n.Proto))
101101
}
102-
n.Key = kms.NewPlainSecret(util.GenerateUniqueID())
102+
n.Key = kms.NewPlainSecret(util.GenerateOpaqueString())
103103
n.Key.SetAdditionalData(n.Host)
104104
if err := n.Key.Encrypt(); err != nil {
105105
return fmt.Errorf("unable to encrypt node key: %w", err)

0 commit comments

Comments
 (0)