Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update apikey.cache_hit log field name to match convention #1900

Merged
merged 2 commits into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- 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]
- Update apikey.cache_hit log field name to match convention. {pull}1900[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