Open fliespl opened 2 years ago
This is an interesting use case and I'm open to improving this. In the moment, I don't have any specific thoughts about what to do, but wanted to comment that I see how it is annoying to you. I agree that some extension of the fake user idea might be a good solution.
Thanks @ibennetch. I wouldn't call it annoying - just a minor inconvenience, since we managed to achieve the goal (but hacky way). Just mentioned it in case there are other users interested in such approach.
Is your feature request related to a problem? Please describe.
Possibility to use single login info for many users, while being able to save their settings with external username (i.e. SSO auth).
Describe the solution you'd like
Currently database user is also used for storing user ui settings, query history etc. It would be great to provide a mechanism that would allow authenticators to seperate database info from user which is used for storing settings inside database (pma tables - i.e. pmahistory).
Let's say we provide DATABASE_USER, DATABASE_PASSWORD variables, users login using SSO via gitlab. Our plugin authenticates users, but settings are shared between them since database login/pass is used. We don't want to create seperate mysql users for everyone since this is mainly dev env.
We haven't found a better way than "hacking it" by using:
And filling fake password + username / email inside authenticator class. This way settings are stored with user email, but database connection uses other settings.
Best course of action would be to allow authenticators to set under which user should settings be saved.