From c48f7cf5cf2b5d252403adb0a92c36a4df8b7bbe Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 23 Sep 2022 14:24:58 +0200 Subject: [PATCH] [8.4](backport #1900) Update apikey.cache_hit log field name to match convention (#1903) Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com> --- CHANGELOG.next.asciidoc | 1 + internal/pkg/api/auth.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index de32f656f..63e4e3bc0 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -6,6 +6,7 @@ - Remove events from agent checkin body. {issue}1774[1774] - Improve authc debug logging. {pull}1870[1870] - Add error detail to catch-all HTTP error response. {pull}1854[1854] +- Update apikey.cache_hit log field name to match convention. {pull}1900[1900] ==== New Features diff --git a/internal/pkg/api/auth.go b/internal/pkg/api/auth.go index 9e9151c72..d7ed90156 100644 --- a/internal/pkg/api/auth.go +++ b/internal/pkg/api/auth.go @@ -47,7 +47,7 @@ func authAPIKey(r *http.Request, bulker bulk.Bulk, c cache.Cache) (*apikey.APIKe Str("id", key.ID). Str(ECSHTTPRequestID, reqID). Int64(ECSEventDuration, time.Since(start).Nanoseconds()). - Bool("fleet.api_key.cache_hit", true). + Bool("fleet.apikey.cache_hit", true). Msg("ApiKey authenticated") return key, nil } else { @@ -74,7 +74,7 @@ func authAPIKey(r *http.Request, bulker bulk.Bulk, c cache.Cache) (*apikey.APIKe Strs("roles", info.Roles). Bool("enabled", info.Enabled). RawJSON("meta", info.Metadata). - Bool("fleet.api_key.cache_hit", false). + Bool("fleet.apikey.cache_hit", false). Msg("ApiKey authenticated") c.SetAPIKey(*key, info.Enabled)