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 <[email protected]>
  • Loading branch information
drakkan committed Nov 27, 2024
1 parent d3e7689 commit 6a7c8df
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 6a7c8df

Please sign in to comment.