ClickHouse/tests/config/users.d/session_log_test.xml
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

31 lines
977 B
XML

<?xml version="1.0"?>
<!-- User and profile to be used in sesson_log tests, to make sure that list of user's profiles is logged correctly -->
<yandex>
<profiles>
<session_log_test_xml_profile>
<!--
can't be readonly since we need to modify some
user settings in queries initiated by test.
<readonly>1</readonly>
-->
<send_logs_level>none</send_logs_level>
</session_log_test_xml_profile>
</profiles>
<roles>
<session_log_test_xml_role>
</session_log_test_xml_role>
</roles>
<users>
<session_log_test_xml_user>
<password></password>
<networks incl="networks" replace="replace">
<ip>::1</ip>
<ip>127.0.0.1</ip>
</networks>
<profile>session_log_test_xml_profile</profile>
<quota>default</quota>
</session_log_test_xml_user>
</users>
</yandex>