Skip to content

Commit

Permalink
Update apikey.cache_hit log field name to match convention (#1900)
Browse files Browse the repository at this point in the history
(cherry picked from commit 95b57a0)

# Conflicts:
#	CHANGELOG.next.asciidoc
  • Loading branch information
joshdover authored and mergify[bot] committed Oct 5, 2022
1 parent 1deffba commit 60b1985
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@
- Improve authc debug logging. {pull}1870[1870]
- Add error detail to catch-all HTTP error response. {pull}1854[1854]
- Fix issue were errors where being ignored written to elasticsearch. {pull}1896[1896]
<<<<<<< HEAD
- LoadServerLimits will not overwrite specified limits when loading default/agent number specified values. {issue}1841[1841] {pull}1912[1912]
- Use seperate rate limiters for internal and external API listeners. {issue}1859[1859] {pull}1904[1904]
=======
- Update apikey.cache_hit log field name to match convention. {pull}1900[1900]
>>>>>>> 95b57a0 (Update apikey.cache_hit log field name to match convention (#1900))
==== New Features
Expand Down
4 changes: 2 additions & 2 deletions internal/pkg/api/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)
Expand Down

0 comments on commit 60b1985

Please sign in to comment.