ClickHouse/tests/queries/0_stateless/01747_system_session_log_long.reference
Vasily Nemkov c902afddde Added system.session_log table
Which logs all the info about LogIn, LogOut and LogIn Failure events.
Additional info that is logged:
- User name
- event type (LogIn, LogOut, LoginFailure)
- Event date\time\time with microseconds
- authentication type (same as for IDENTIFIED BY of CREATE USER statement)
- array of active settings profiles upon login
- array of active roles upon login
- array of changed settings with corresponding values
- client address and port
- interface (TCP\HTTP\MySQL\PostgreSQL, etc.)
- client info (name, version info)
- optional LoginFailure reason text message.

Added some tests to verify that events are properly saved with all necessary info via following interfaces:
- TCP
- HTTP
- MySQL

Known limitations
- Not tested against named HTTP sessions, PostgreSQL and gRPC, hence those are not guaranteed to work 100% properly.
2021-08-30 18:28:28 +03:00

219 lines
12 KiB
Plaintext

# no_password - User with profile from XML
TCP endpoint
TCP 'wrong password' case is skipped for no_password.
HTTP endpoint
HTTP 'wrong password' case is skipped for no_password.
MySQL endpoint
MySQL 'wrong password' case is skipped for no_password.
# no_password - No profiles no roles
TCP endpoint
TCP 'wrong password' case is skipped for no_password.
HTTP endpoint
HTTP 'wrong password' case is skipped for no_password.
MySQL endpoint
MySQL 'wrong password' case is skipped for no_password.
# no_password - Two profiles, no roles
TCP endpoint
TCP 'wrong password' case is skipped for no_password.
HTTP endpoint
HTTP 'wrong password' case is skipped for no_password.
MySQL endpoint
MySQL 'wrong password' case is skipped for no_password.
# no_password - Two profiles and two simple roles
TCP endpoint
TCP 'wrong password' case is skipped for no_password.
HTTP endpoint
HTTP 'wrong password' case is skipped for no_password.
MySQL endpoint
MySQL 'wrong password' case is skipped for no_password.
# plaintext_password - No profiles no roles
TCP endpoint
HTTP endpoint
MySQL endpoint
# plaintext_password - Two profiles, no roles
TCP endpoint
HTTP endpoint
MySQL endpoint
# plaintext_password - Two profiles and two simple roles
TCP endpoint
HTTP endpoint
MySQL endpoint
# sha256_password - No profiles no roles
TCP endpoint
HTTP endpoint
MySQL endpoint
MySQL 'successful login' case is skipped for sha256_password.
# sha256_password - Two profiles, no roles
TCP endpoint
HTTP endpoint
MySQL endpoint
MySQL 'successful login' case is skipped for sha256_password.
# sha256_password - Two profiles and two simple roles
TCP endpoint
HTTP endpoint
MySQL endpoint
MySQL 'successful login' case is skipped for sha256_password.
# double_sha1_password - No profiles no roles
TCP endpoint
HTTP endpoint
MySQL endpoint
# double_sha1_password - Two profiles, no roles
TCP endpoint
HTTP endpoint
MySQL endpoint
# double_sha1_password - Two profiles and two simple roles
TCP endpoint
HTTP endpoint
MySQL endpoint
${BASE_USERNAME}_double_sha1_password_no_profiles_no_roles TCP LoginFailure 1
${BASE_USERNAME}_double_sha1_password_no_profiles_no_roles TCP LoginSuccess 1
${BASE_USERNAME}_double_sha1_password_no_profiles_no_roles TCP Logout 1
${BASE_USERNAME}_double_sha1_password_no_profiles_no_roles HTTP LoginFailure 1
${BASE_USERNAME}_double_sha1_password_no_profiles_no_roles HTTP LoginSuccess 1
${BASE_USERNAME}_double_sha1_password_no_profiles_no_roles HTTP Logout 1
${BASE_USERNAME}_double_sha1_password_no_profiles_no_roles MySQL LoginFailure many
${BASE_USERNAME}_double_sha1_password_no_profiles_no_roles MySQL LoginSuccess 1
${BASE_USERNAME}_double_sha1_password_no_profiles_no_roles MySQL Logout 1
${BASE_USERNAME}_double_sha1_password_two_profiles_no_roles TCP LoginFailure 1
${BASE_USERNAME}_double_sha1_password_two_profiles_no_roles TCP LoginSuccess 1
${BASE_USERNAME}_double_sha1_password_two_profiles_no_roles TCP Logout 1
${BASE_USERNAME}_double_sha1_password_two_profiles_no_roles HTTP LoginFailure 1
${BASE_USERNAME}_double_sha1_password_two_profiles_no_roles HTTP LoginSuccess 1
${BASE_USERNAME}_double_sha1_password_two_profiles_no_roles HTTP Logout 1
${BASE_USERNAME}_double_sha1_password_two_profiles_no_roles MySQL LoginFailure many
${BASE_USERNAME}_double_sha1_password_two_profiles_no_roles MySQL LoginSuccess 1
${BASE_USERNAME}_double_sha1_password_two_profiles_no_roles MySQL Logout 1
${BASE_USERNAME}_double_sha1_password_two_profiles_two_roles TCP LoginFailure 1
${BASE_USERNAME}_double_sha1_password_two_profiles_two_roles TCP LoginSuccess 1
${BASE_USERNAME}_double_sha1_password_two_profiles_two_roles TCP Logout 1
${BASE_USERNAME}_double_sha1_password_two_profiles_two_roles HTTP LoginFailure 1
${BASE_USERNAME}_double_sha1_password_two_profiles_two_roles HTTP LoginSuccess 1
${BASE_USERNAME}_double_sha1_password_two_profiles_two_roles HTTP Logout 1
${BASE_USERNAME}_double_sha1_password_two_profiles_two_roles MySQL LoginFailure many
${BASE_USERNAME}_double_sha1_password_two_profiles_two_roles MySQL LoginSuccess 1
${BASE_USERNAME}_double_sha1_password_two_profiles_two_roles MySQL Logout 1
${BASE_USERNAME}_no_password_no_profiles_no_roles TCP LoginSuccess 1
${BASE_USERNAME}_no_password_no_profiles_no_roles TCP Logout 1
${BASE_USERNAME}_no_password_no_profiles_no_roles HTTP LoginSuccess 1
${BASE_USERNAME}_no_password_no_profiles_no_roles HTTP Logout 1
${BASE_USERNAME}_no_password_no_profiles_no_roles MySQL LoginSuccess 1
${BASE_USERNAME}_no_password_no_profiles_no_roles MySQL Logout 1
${BASE_USERNAME}_no_password_two_profiles_no_roles TCP LoginSuccess 1
${BASE_USERNAME}_no_password_two_profiles_no_roles TCP Logout 1
${BASE_USERNAME}_no_password_two_profiles_no_roles HTTP LoginSuccess 1
${BASE_USERNAME}_no_password_two_profiles_no_roles HTTP Logout 1
${BASE_USERNAME}_no_password_two_profiles_no_roles MySQL LoginSuccess 1
${BASE_USERNAME}_no_password_two_profiles_no_roles MySQL Logout 1
${BASE_USERNAME}_no_password_two_profiles_two_roles TCP LoginSuccess 1
${BASE_USERNAME}_no_password_two_profiles_two_roles TCP Logout 1
${BASE_USERNAME}_no_password_two_profiles_two_roles HTTP LoginSuccess 1
${BASE_USERNAME}_no_password_two_profiles_two_roles HTTP Logout 1
${BASE_USERNAME}_no_password_two_profiles_two_roles MySQL LoginSuccess 1
${BASE_USERNAME}_no_password_two_profiles_two_roles MySQL Logout 1
${BASE_USERNAME}_plaintext_password_no_profiles_no_roles TCP LoginFailure 1
${BASE_USERNAME}_plaintext_password_no_profiles_no_roles TCP LoginSuccess 1
${BASE_USERNAME}_plaintext_password_no_profiles_no_roles TCP Logout 1
${BASE_USERNAME}_plaintext_password_no_profiles_no_roles HTTP LoginFailure 1
${BASE_USERNAME}_plaintext_password_no_profiles_no_roles HTTP LoginSuccess 1
${BASE_USERNAME}_plaintext_password_no_profiles_no_roles HTTP Logout 1
${BASE_USERNAME}_plaintext_password_no_profiles_no_roles MySQL LoginFailure many
${BASE_USERNAME}_plaintext_password_no_profiles_no_roles MySQL LoginSuccess 1
${BASE_USERNAME}_plaintext_password_no_profiles_no_roles MySQL Logout 1
${BASE_USERNAME}_plaintext_password_two_profiles_no_roles TCP LoginFailure 1
${BASE_USERNAME}_plaintext_password_two_profiles_no_roles TCP LoginSuccess 1
${BASE_USERNAME}_plaintext_password_two_profiles_no_roles TCP Logout 1
${BASE_USERNAME}_plaintext_password_two_profiles_no_roles HTTP LoginFailure 1
${BASE_USERNAME}_plaintext_password_two_profiles_no_roles HTTP LoginSuccess 1
${BASE_USERNAME}_plaintext_password_two_profiles_no_roles HTTP Logout 1
${BASE_USERNAME}_plaintext_password_two_profiles_no_roles MySQL LoginFailure many
${BASE_USERNAME}_plaintext_password_two_profiles_no_roles MySQL LoginSuccess 1
${BASE_USERNAME}_plaintext_password_two_profiles_no_roles MySQL Logout 1
${BASE_USERNAME}_plaintext_password_two_profiles_two_roles TCP LoginFailure 1
${BASE_USERNAME}_plaintext_password_two_profiles_two_roles TCP LoginSuccess 1
${BASE_USERNAME}_plaintext_password_two_profiles_two_roles TCP Logout 1
${BASE_USERNAME}_plaintext_password_two_profiles_two_roles HTTP LoginFailure 1
${BASE_USERNAME}_plaintext_password_two_profiles_two_roles HTTP LoginSuccess 1
${BASE_USERNAME}_plaintext_password_two_profiles_two_roles HTTP Logout 1
${BASE_USERNAME}_plaintext_password_two_profiles_two_roles MySQL LoginFailure many
${BASE_USERNAME}_plaintext_password_two_profiles_two_roles MySQL LoginSuccess 1
${BASE_USERNAME}_plaintext_password_two_profiles_two_roles MySQL Logout 1
${BASE_USERNAME}_sha256_password_no_profiles_no_roles TCP LoginFailure 1
${BASE_USERNAME}_sha256_password_no_profiles_no_roles TCP LoginSuccess 1
${BASE_USERNAME}_sha256_password_no_profiles_no_roles TCP Logout 1
${BASE_USERNAME}_sha256_password_no_profiles_no_roles HTTP LoginFailure 1
${BASE_USERNAME}_sha256_password_no_profiles_no_roles HTTP LoginSuccess 1
${BASE_USERNAME}_sha256_password_no_profiles_no_roles HTTP Logout 1
${BASE_USERNAME}_sha256_password_no_profiles_no_roles MySQL LoginFailure many
${BASE_USERNAME}_sha256_password_two_profiles_no_roles TCP LoginFailure 1
${BASE_USERNAME}_sha256_password_two_profiles_no_roles TCP LoginSuccess 1
${BASE_USERNAME}_sha256_password_two_profiles_no_roles TCP Logout 1
${BASE_USERNAME}_sha256_password_two_profiles_no_roles HTTP LoginFailure 1
${BASE_USERNAME}_sha256_password_two_profiles_no_roles HTTP LoginSuccess 1
${BASE_USERNAME}_sha256_password_two_profiles_no_roles HTTP Logout 1
${BASE_USERNAME}_sha256_password_two_profiles_no_roles MySQL LoginFailure many
${BASE_USERNAME}_sha256_password_two_profiles_two_roles TCP LoginFailure 1
${BASE_USERNAME}_sha256_password_two_profiles_two_roles TCP LoginSuccess 1
${BASE_USERNAME}_sha256_password_two_profiles_two_roles TCP Logout 1
${BASE_USERNAME}_sha256_password_two_profiles_two_roles HTTP LoginFailure 1
${BASE_USERNAME}_sha256_password_two_profiles_two_roles HTTP LoginSuccess 1
${BASE_USERNAME}_sha256_password_two_profiles_two_roles HTTP Logout 1
${BASE_USERNAME}_sha256_password_two_profiles_two_roles MySQL LoginFailure many
invalid_${BASE_USERNAME}_double_sha1_password_no_profiles_no_roles TCP LoginFailure 1
invalid_${BASE_USERNAME}_double_sha1_password_no_profiles_no_roles HTTP LoginFailure 1
invalid_${BASE_USERNAME}_double_sha1_password_no_profiles_no_roles MySQL LoginFailure many
invalid_${BASE_USERNAME}_double_sha1_password_two_profiles_no_roles TCP LoginFailure 1
invalid_${BASE_USERNAME}_double_sha1_password_two_profiles_no_roles HTTP LoginFailure 1
invalid_${BASE_USERNAME}_double_sha1_password_two_profiles_no_roles MySQL LoginFailure many
invalid_${BASE_USERNAME}_double_sha1_password_two_profiles_two_roles TCP LoginFailure 1
invalid_${BASE_USERNAME}_double_sha1_password_two_profiles_two_roles HTTP LoginFailure 1
invalid_${BASE_USERNAME}_double_sha1_password_two_profiles_two_roles MySQL LoginFailure many
invalid_${BASE_USERNAME}_no_password_no_profiles_no_roles TCP LoginFailure 1
invalid_${BASE_USERNAME}_no_password_no_profiles_no_roles HTTP LoginFailure 1
invalid_${BASE_USERNAME}_no_password_no_profiles_no_roles MySQL LoginFailure many
invalid_${BASE_USERNAME}_no_password_two_profiles_no_roles TCP LoginFailure 1
invalid_${BASE_USERNAME}_no_password_two_profiles_no_roles HTTP LoginFailure 1
invalid_${BASE_USERNAME}_no_password_two_profiles_no_roles MySQL LoginFailure many
invalid_${BASE_USERNAME}_no_password_two_profiles_two_roles TCP LoginFailure 1
invalid_${BASE_USERNAME}_no_password_two_profiles_two_roles HTTP LoginFailure 1
invalid_${BASE_USERNAME}_no_password_two_profiles_two_roles MySQL LoginFailure many
invalid_${BASE_USERNAME}_plaintext_password_no_profiles_no_roles TCP LoginFailure 1
invalid_${BASE_USERNAME}_plaintext_password_no_profiles_no_roles HTTP LoginFailure 1
invalid_${BASE_USERNAME}_plaintext_password_no_profiles_no_roles MySQL LoginFailure many
invalid_${BASE_USERNAME}_plaintext_password_two_profiles_no_roles TCP LoginFailure 1
invalid_${BASE_USERNAME}_plaintext_password_two_profiles_no_roles HTTP LoginFailure 1
invalid_${BASE_USERNAME}_plaintext_password_two_profiles_no_roles MySQL LoginFailure many
invalid_${BASE_USERNAME}_plaintext_password_two_profiles_two_roles TCP LoginFailure 1
invalid_${BASE_USERNAME}_plaintext_password_two_profiles_two_roles HTTP LoginFailure 1
invalid_${BASE_USERNAME}_plaintext_password_two_profiles_two_roles MySQL LoginFailure many
invalid_${BASE_USERNAME}_sha256_password_no_profiles_no_roles TCP LoginFailure 1
invalid_${BASE_USERNAME}_sha256_password_no_profiles_no_roles HTTP LoginFailure 1
invalid_${BASE_USERNAME}_sha256_password_no_profiles_no_roles MySQL LoginFailure many
invalid_${BASE_USERNAME}_sha256_password_two_profiles_no_roles TCP LoginFailure 1
invalid_${BASE_USERNAME}_sha256_password_two_profiles_no_roles HTTP LoginFailure 1
invalid_${BASE_USERNAME}_sha256_password_two_profiles_no_roles MySQL LoginFailure many
invalid_${BASE_USERNAME}_sha256_password_two_profiles_two_roles TCP LoginFailure 1
invalid_${BASE_USERNAME}_sha256_password_two_profiles_two_roles HTTP LoginFailure 1
invalid_${BASE_USERNAME}_sha256_password_two_profiles_two_roles MySQL LoginFailure many
invalid_session_log_test_xml_user TCP LoginFailure 1
invalid_session_log_test_xml_user HTTP LoginFailure 1
invalid_session_log_test_xml_user MySQL LoginFailure many
session_log_test_xml_user TCP LoginSuccess 1
session_log_test_xml_user TCP Logout 1
session_log_test_xml_user HTTP LoginSuccess 1
session_log_test_xml_user HTTP Logout 1
session_log_test_xml_user MySQL LoginSuccess 1
session_log_test_xml_user MySQL Logout 1