Skip to content
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

Trace. Provide ability to see info about auth plugin which was used for login #7901

Open
pavel-zotov opened this issue Dec 3, 2023 · 1 comment

Comments

@pavel-zotov
Copy link

Create two users with same name but different auth plugins:

echo create user foo password '123' using plugin Legacy_UserManager; | isql /:employee
echo create user foo password '456' using plugin Srp; | isql /:employee

Run trace with 'log_connections = true'.
Run then:

echo quit; | isql /:employee -user foo -pas 123
echo quit; | isql /:employee -user foo -pas 456

Trace will be like this:

2023-11-07T13:48:16.9750 (8872:00000000042D17C0) ATTACH_DATABASE
        employee (ATT_487, FOO:NONE, NONE, TCPv6:fe80::fcf1:e33c:e924:969d%8/59457)
        C:\FB\60SS\isql.exe:11696
... 
2023-11-07T13:48:23.6620 (8872:00000000042D17C0) ATTACH_DATABASE
        employee (ATT_490, FOO:NONE, NONE, TCPv6:fe80::fcf1:e33c:e924:969d%8/59460)
        C:\FB\60SS\isql.exe:12980
 ...

So, we have no info about what exact plugin was used for 1st and 2nd attachment.
It could be shown like this:

employee (ATT_487, FOO:NONE:Legacy_UserManager, NONE, ...
employee (ATT_490, FOO:NONE:Srp, NONE, ...
...

(but only if there will be appropriate config parameter and it require this, e.g.: "log_auth_plugin = true")

@aafemt
Copy link
Contributor

aafemt commented Dec 3, 2023

Is it actually possible? Adding a new function to TraceConnection will break both derived interfaces shifting pointers in pseudo-VMT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants