Can be a security risk to leak those if someone has access to logs. Suggesting to limit output only to client.Name in the logs.
Preparing a PR for that - relatively easy thing to fix.
I have merged you PR in our proof of concept evaluation setup as I find it good to remove secrets from logs. We are sending logs to other servers and don't want to expose unnecessary secrets.
Currently app is logging whole client config when creating/updating/deleteing clients. That output contains private key and pre shared key.
log.Infof("Created wireguard client: %v", client)
{"time":"2024-09-21T20:07:19.1004342Z","level":"INFO","prefix":"-","file":"routes.go","line":"512","message":"Created wireguard client: {crnietsfsmgc712m957g {secret} {secret} {secret} NewClient [] [10.88.0.3/32] [0.0.0.0/0] [] true true 2024-09-21 20:07:19.100278387 +0000 UTC 2024-09-21 20:07:19.100278387 +0000 UTC}"}
Can be a security risk to leak those if someone has access to logs. Suggesting to limit output only to client.Name in the logs. Preparing a PR for that - relatively easy thing to fix.