froxlor / Froxlor

The server administration software for your needs - The official Froxlor development Git repository
http://www.froxlor.org
GNU General Public License v2.0
1.62k stars 455 forks source link

[FR/Discussion] Master Database User For Customers #1227

Closed realrellek closed 6 months ago

realrellek commented 7 months ago

Is your feature request related to a problem? Please describe. It is no problem, plain convenience. I have this idea that it might be useful to have a master database user per customer, similar to the master FTP user who can access everything in /var/customers/<username>/.

Describe the solution you'd like When there is a customer "johndoe", there may be databases like "johndoesql1", "johndoesql2" and "johndoesql3". If John wants to do something with the databases, say in an SQL administration tool such as Sequel Ace, he'd have to log in per database.

I think this could be implemented as having a database user "johndoe" who can access and manage "johndoesql1", "johndoesql2" and "johndoesql3". This way, the customer would only have to save one connection in the administration tool instead of one per database - which may get obsolete when a database is deleted. Or incomplete when a new database gets added.

Of course, John should be strongly discouraged from using the master user for individual connections using his WordPress or whatever. But John is also not supposed to share the master FTP login.

Describe alternatives you've considered The alternative is leaving everything as it is now with having to manage login credentials for all individual databases which can be fiddly and labor-intensive to keep it up-to-date.

Additional context This was just a quick idea of mine, thinking as a customer, because as the administrator, I saved my root login in said tool and I have to jump databases all the time, for example to check if some sort of sync between two apps worked as intended.

However, the discussion is if there are negative aspects I did not think of which might render the idea potentially dangerous. (Or say more dangerous than the master FTP account).

d00p commented 7 months ago

should be possible when adding a user like we do for ftp and allow access to databases starting with his username (if customer has mysql resources)

realrellek commented 7 months ago

This sounds good and in line with my idea. :)