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

Log failed client logins #173

Merged
merged 4 commits into from
Sep 23, 2022
Merged

Conversation

drdrsh
Copy link
Collaborator

@drdrsh drdrsh commented Sep 22, 2022

Currently the only place where there is a record of client login failures is in Pgcat's response to the client. We don't log that anywhere on the sever side.

This PR adds logging for that event and to bad pool name login.

@drdrsh drdrsh marked this pull request as ready for review September 22, 2022 01:44
src/client.rs Outdated
@@ -436,7 +436,7 @@ where
);

if password_hash != password_response {
debug!("Password authentication failed");
warn!("Invalid password {{ username: {:?}, pool_name: {:?}, application_name: {:?} }}", pool_name.clone(), username.clone(), application_name.clone());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need the clones?

@drdrsh drdrsh requested a review from levkk September 23, 2022 14:38
@levkk levkk merged commit d126c74 into postgresml:main Sep 23, 2022
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.

None yet

2 participants