Skip to content

Commit

Permalink
use GenerateOpaqueString also for node secrets
Browse files Browse the repository at this point in the history
this method will use rand.Text() with Go 1.24

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
  • Loading branch information
drakkan committed Nov 27, 2024
1 parent d1d7ab2 commit 39c30c7
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.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)
Expand Down

0 comments on commit 39c30c7

Please sign in to comment.