Skip to content

Clarifying the cause of the error after an authentication attempt #17012

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

Merged

Conversation

flown4qqqq
Copy link
Collaborator

Changelog entry

The pull request is aimed at clarifying the reason why the user could not log in.

Changelog category

  • Improvement

@flown4qqqq flown4qqqq requested a review from a team as a code owner April 9, 2025 20:23
@flown4qqqq flown4qqqq requested a review from molotkov-and April 9, 2025 20:23
Copy link

github-actions bot commented Apr 9, 2025

🟢 2025-04-09 20:24:36 UTC The validation of the Pull Request description is successful.

Copy link

github-actions bot commented Apr 9, 2025

2025-04-09 20:24:41 UTC Pre-commit check linux-x86_64-release-asan for 9afb724 has started.
2025-04-09 20:24:56 UTC Artifacts will be uploaded here
2025-04-09 20:27:51 UTC ya make is running...
🟡 2025-04-09 21:48:02 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
13905 13699 0 131 37 38

2025-04-09 21:49:11 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-04-09 22:02:58 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
283 (only retried tests) 192 0 37 19 35

2025-04-09 22:03:08 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-04-09 22:15:26 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
125 (only retried tests) 52 0 34 5 34

🟢 2025-04-09 22:15:33 UTC Build successful.
🟢 2025-04-09 22:16:07 UTC ydbd size 3.9 GiB changed* by +2.1 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 6853d24 merge: 9afb724 diff diff %
ydbd size 4 136 601 624 Bytes 4 136 603 752 Bytes +2.1 KiB +0.000%
ydbd stripped size 1 428 737 224 Bytes 1 428 737 864 Bytes +640 Bytes +0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Apr 9, 2025

2025-04-09 20:24:41 UTC Pre-commit check linux-x86_64-relwithdebinfo for 9afb724 has started.
2025-04-09 20:24:56 UTC Artifacts will be uploaded here
2025-04-09 20:27:45 UTC ya make is running...
🟡 2025-04-09 21:34:45 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
28484 25645 0 4 2780 55

2025-04-09 21:37:06 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-04-09 21:49:14 UTC Tests successful.

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
341 (only retried tests) 225 0 0 7 109

🟢 2025-04-09 21:49:25 UTC Build successful.
🟢 2025-04-09 21:49:43 UTC ydbd size 2.2 GiB changed* by +4.6 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 6853d24 merge: 9afb724 diff diff %
ydbd size 2 357 628 864 Bytes 2 357 633 584 Bytes +4.6 KiB +0.000%
ydbd stripped size 492 806 944 Bytes 492 811 168 Bytes +4.1 KiB +0.001%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@flown4qqqq flown4qqqq self-assigned this Apr 9, 2025
@flown4qqqq flown4qqqq requested review from CyberROFL and ijon and removed request for CyberROFL April 9, 2025 21:08
molotkov-and
molotkov-and previously approved these changes Apr 10, 2025
Comment on lines 438 to 442
if (!sid.IsEnabled) {
response.Error = TStringBuilder() << "User " << request.User << " is not permitted to log in, because it is blocked";
} else {
response.Error = TStringBuilder() << "User " << request.User << " is not permitted to log in, because the count of password attempts has been exceeded";
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would suggest making error messages more concise:
-> User {request.User} login denied: account is blocked
-> User {request.User} login denied: too many failed password attempts

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the logic was that we wanted to mimic postgres. However, with the clarification of the reason, we are no longer doing this, so your option looks more successful.

Copy link

github-actions bot commented Apr 10, 2025

2025-04-10 10:46:12 UTC Pre-commit check linux-x86_64-release-asan for bc52e2a has started.
2025-04-10 10:46:40 UTC Artifacts will be uploaded here
2025-04-10 10:50:08 UTC ya make is running...
🟡 2025-04-10 12:08:15 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
13907 13744 0 92 33 38

2025-04-10 12:09:29 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-04-10 12:23:43 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
231 (only retried tests) 137 0 40 17 37

2025-04-10 12:23:54 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-04-10 12:36:19 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
128 (only retried tests) 57 0 34 4 33

🟢 2025-04-10 12:36:27 UTC Build successful.
🟢 2025-04-10 12:36:58 UTC ydbd size 3.9 GiB changed* by +15.7 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: cbbff2d merge: bc52e2a diff diff %
ydbd size 4 137 021 664 Bytes 4 137 037 712 Bytes +15.7 KiB +0.000%
ydbd stripped size 1 428 885 768 Bytes 1 428 888 712 Bytes +2.9 KiB +0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Apr 10, 2025

2025-04-10 11:09:40 UTC Pre-commit check linux-x86_64-relwithdebinfo for bc52e2a has started.
2025-04-10 11:10:21 UTC Artifacts will be uploaded here
2025-04-10 11:13:22 UTC ya make is running...
🟡 2025-04-10 12:19:02 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
28486 25811 0 4 2556 115

2025-04-10 12:21:28 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-04-10 12:33:52 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
170 (only retried tests) 64 0 1 0 105

2025-04-10 12:34:00 UTC ya make is running... (failed tests rerun, try 3)
🟢 2025-04-10 12:44:24 UTC Tests successful.

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
148 (only retried tests) 45 0 0 0 103

🟢 2025-04-10 12:44:31 UTC Build successful.
🟢 2025-04-10 12:44:53 UTC ydbd size 2.2 GiB changed* by +9.1 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: cbbff2d merge: bc52e2a diff diff %
ydbd size 2 357 823 936 Bytes 2 357 833 296 Bytes +9.1 KiB +0.000%
ydbd stripped size 492 814 880 Bytes 492 816 544 Bytes +1.6 KiB +0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@flown4qqqq flown4qqqq merged commit b7c4b33 into ydb-platform:main Apr 10, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants