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

CBG-3694: Improved logging for failed session auth #7081

Merged
merged 4 commits into from
Aug 20, 2024
Merged

CBG-3694: Improved logging for failed session auth #7081

merged 4 commits into from
Aug 20, 2024

Conversation

bbrks
Copy link
Member

@bbrks bbrks commented Aug 16, 2024

CBG-3694

2024-08-16T16:33:10.880+01:00 [INF] HTTP: c:#006 db:db POST http://localhost/db/_session (as GUEST)
2024-08-16T16:33:10.882+01:00 [WRN] c:#006 db:db Couldn't create session for user "<ud>pupshaw</ud>": Incorrect password -- rest.(*handler).getUserFromSessionRequestBody() at session_api.go:94
2024-08-16T16:33:10.882+01:00 [INF] HTTP: c:#006 db:db #006:     --> 401 Invalid login  (1.6 ms)
    session_test.go:241: Set-Cookie: 
2024-08-16T16:33:10.882+01:00 [WRN] c:#007 db:db Session not found: <ud>123456abcdef</ud> -- auth.(*Authenticator).AuthenticateCookie() at session.go:43
2024-08-16T16:33:10.882+01:00 [INF] HTTP: c:#007 db:db GET http://localhost/db/
2024-08-16T16:33:10.882+01:00 [INF] HTTP: c:#007 db:db #007:     --> 401 Session Invalid  (0.1 ms)

Integration Tests

  • n/a

@bbrks bbrks changed the title CBG-3694: Improved logging for create session failures CBG-3694: Improved logging for failed session auth Aug 19, 2024
@torcolvin torcolvin self-assigned this Aug 19, 2024
torcolvin
torcolvin previously approved these changes Aug 19, 2024
@torcolvin torcolvin assigned bbrks and unassigned torcolvin Aug 19, 2024
Base automatically changed from CBG-3692 to main August 20, 2024 11:50
@bbrks bbrks dismissed torcolvin’s stale review August 20, 2024 11:50

The base branch was changed.

@gregns1 gregns1 enabled auto-merge (squash) August 20, 2024 12:05
@gregns1 gregns1 merged commit fa2ebaf into main Aug 20, 2024
39 of 40 checks passed
@gregns1 gregns1 deleted the CBG-3694 branch August 20, 2024 12:25
bbrks added a commit that referenced this pull request Sep 26, 2024
* Improve (session) TestLogin to cover happy path and basic session auth failure cases

* Log warnings when we're unable to create a session for a user

* Cover invalid sessions with logs

* Switch to info log level
gregns1 pushed a commit that referenced this pull request Oct 2, 2024
* CBG-3692: Improved logging for failed basic auth login (#7080)

* Add test to cover disabled non-guest user

* Add AuthenticateWithReason to User interface/impl

* Use AuthenticateWithReason to populate better warning message on basic auth failure

* Keep old message format

* Coverage for incorrect password logging

* Switch to info log level

* Update auth/user.go

Co-authored-by: Tor Colvin <[email protected]>

---------

Co-authored-by: Tor Colvin <[email protected]>

* CBG-3693: Improved logging for no-user/no auto-register case in JWT auth (#7082)

* CBG-3694: Improved logging for failed session auth (#7081)

* Improve (session) TestLogin to cover happy path and basic session auth failure cases

* Log warnings when we're unable to create a session for a user

* Cover invalid sessions with logs

* Switch to info log level

---------

Co-authored-by: Tor Colvin <[email protected]>
bbrks added a commit that referenced this pull request Oct 8, 2024
* CBG-3692: Improved logging for failed basic auth login (#7080)

* Add test to cover disabled non-guest user

* Add AuthenticateWithReason to User interface/impl

* Use AuthenticateWithReason to populate better warning message on basic auth failure

* Keep old message format

* Coverage for incorrect password logging

* Switch to info log level

* Update auth/user.go

Co-authored-by: Tor Colvin <[email protected]>

---------

Co-authored-by: Tor Colvin <[email protected]>

* CBG-3693: Improved logging for no-user/no auto-register case in JWT auth (#7082)

* CBG-3694: Improved logging for failed session auth (#7081)

* Improve (session) TestLogin to cover happy path and basic session auth failure cases

* Log warnings when we're unable to create a session for a user

* Cover invalid sessions with logs

* Switch to info log level

---------

Co-authored-by: Tor Colvin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants