From 8909f801bbefb16d68927a27c6e11d5d19a167f5 Mon Sep 17 00:00:00 2001 From: Juan Font Date: Mon, 14 Nov 2022 17:56:04 +0000 Subject: [PATCH] Added more debug messages in OIDC registration --- oidc.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/oidc.go b/oidc.go index ee9511d0..5ae3f0f0 100644 --- a/oidc.go +++ b/oidc.go @@ -77,9 +77,10 @@ func (h *Headscale) RegisterOIDC( vars := mux.Vars(req) nodeKeyStr, ok := vars["nkey"] - log.Trace(). + log.Debug(). Caller(). Str("node_key", nodeKeyStr). + Bool("ok", ok). Msg("Received oidc register call") if !NodePublicKeyRegex.Match([]byte(nodeKeyStr)) { @@ -107,7 +108,9 @@ func (h *Headscale) RegisterOIDC( ) if !ok || nodeKeyStr == "" || err != nil { - log.Warn().Err(err).Msg("Failed to parse incoming nodekey") + log.Warn(). + Err(err). + Msg("Failed to parse incoming nodekey in OIDC registration") writer.Header().Set("Content-Type", "text/plain; charset=utf-8") writer.WriteHeader(http.StatusBadRequest)