Skip to content

Commit 4c4daa7

Browse files
committed
fixup to: auditlog: move logins logging from schemeshard to grpc service auth
1 parent d5f92c1 commit 4c4daa7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ydb/core/tx/schemeshard/ut_login/ut_login.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ Y_UNIT_TEST_SUITE(TWebLoginService) {
384384
UNIT_ASSERT_STRING_CONTAINS(last, "operation=LOGIN");
385385
UNIT_ASSERT_STRING_CONTAINS(last, "status=ERROR");
386386
UNIT_ASSERT_STRING_CONTAINS(last, "detailed_status=UNAUTHORIZED");
387-
UNIT_ASSERT_STRING_CONTAINS(last, "reason=Could not login via LDAP");
387+
UNIT_ASSERT_STRING_CONTAINS(last, "reason=Could not login via LDAP: LDAP login failed for user uid=user1,dc=search,dc=yandex,dc=net on server ldap://localhost:");
388388
UNIT_ASSERT_STRING_CONTAINS(last, "login_user=user1@ldap");
389389
}
390390

@@ -478,11 +478,11 @@ Y_UNIT_TEST_SUITE(TWebLoginService) {
478478
UNIT_ASSERT_STRING_CONTAINS(last, "operation=LOGIN");
479479
UNIT_ASSERT_STRING_CONTAINS(last, "status=ERROR");
480480
UNIT_ASSERT_STRING_CONTAINS(last, "detailed_status=UNAUTHORIZED");
481-
UNIT_ASSERT_STRING_CONTAINS(last, "reason=Could not login via LDAP");
481+
UNIT_ASSERT_STRING_CONTAINS(last, "reason=Could not login via LDAP: LDAP user bad_user does not exist. LDAP search for filter uid=bad_user on server ldap://localhost:");
482482
UNIT_ASSERT_STRING_CONTAINS(last, "login_user=bad_user@ldap");
483483
}
484484

485-
// LDAP response to bad BindDn or BindPassword is the same, so this test covers the both cases.
485+
// LDAP responses to bad BindDn or bad BindPassword are the same, so this test covers the both cases.
486486
Y_UNIT_TEST(AuditLogLdapLoginBadBind) {
487487
TTestBasicRuntime runtime;
488488
std::vector<std::string> lines;
@@ -573,7 +573,7 @@ Y_UNIT_TEST_SUITE(TWebLoginService) {
573573
UNIT_ASSERT_STRING_CONTAINS(last, "operation=LOGIN");
574574
UNIT_ASSERT_STRING_CONTAINS(last, "status=ERROR");
575575
UNIT_ASSERT_STRING_CONTAINS(last, "detailed_status=UNAUTHORIZED");
576-
UNIT_ASSERT_STRING_CONTAINS(last, "reason=Could not login via LDAP");
576+
UNIT_ASSERT_STRING_CONTAINS(last, "reason=Could not login via LDAP: Could not perform initial LDAP bind for dn cn=robouser,dc=search,dc=yandex,dc=net on server ldap://localhost:");
577577
UNIT_ASSERT_STRING_CONTAINS(last, "login_user=user1@ldap");
578578
}
579579

0 commit comments

Comments
 (0)