Commit Graph

9 Commits

Author SHA1 Message Date
Vitaly Baranov
70c6623036
Merge branch 'master' into governance/session_log 2021-09-07 10:12:54 +03:00
Vasily Nemkov
109d2f63d0 Fixed tests and minor style issues 2021-08-31 15:39:15 +03:00
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
Dmitrii Kovalkov
2c8e2c6995 Fix arcadia build 2021-08-30 12:19:13 +03:00
Nikita Mikhaylov
fb6462d70a
Merge pull request #27886 from vitlibar/add-separate-constants-for-interfaces
Add separate constants for interfaces LOCAL and TCP_INTERSERVER.
2021-08-23 16:25:01 +03:00
Vitaly Baranov
3ab1177d7e Add separate constants for interface LOCAL and TCP_INTERSERVER. 2021-08-19 23:04:36 +03:00
Vitaly Baranov
9fecda940d Fix shutdown of NamedSessionStorage. 2021-08-19 17:27:03 +03:00
Vitaly Baranov
fabd7193bd Code cleanups and improvements. 2021-08-18 14:24:52 +03:00
Vasily Nemkov
51ffc33457 Introduce sessions.
This is required to add system.session_log table.
2021-08-18 14:24:52 +03:00