Prevent assetkey from leaking into wwclient logs

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2026-03-10 21:27:06 -06:00
committed by Christian Goll
parent 819163e706
commit 5f41465fac
5 changed files with 105 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ func initHandleRequest(w http.ResponseWriter, req *http.Request) (*requestContex
if remoteNode.AssetKey != "" && remoteNode.AssetKey != rinfo.assetkey {
w.WriteHeader(http.StatusUnauthorized)
wwlog.Denied("incorrect asset key: node %s: %s", remoteNode.Id(), rinfo.assetkey)
wwlog.Denied("incorrect asset key for node %s:", remoteNode.Id())
updateStatus(remoteNode.Id(), rinfo.stage, "BAD_ASSET", rinfo.ipaddr)
return nil, fmt.Errorf("incorrect asset key")
}