I'm administrating two servers who follow the model of development and production machines.
The production machine is stripped bare-bone software which runs under restrictive set of rules and limited access. The development machine, however, is much more open - developers can ask for mostly anything (with some exceptions) to be installed and they get unlimited amount of MySQL databases for their testing.
However, on both servers, developers have to ask for a new username/password/database combination which is usually accepted on the development machine, and only accepted on the production machine when a web application is finalized, polished, secure and ready to take off.
Is there a way to create each of the developers on the development machine a user with the permission to create (just create, not read/modify/erase) template users with fixed permission set? That way they could create their own new secure set of username/password/database without waiting for me to accept their query.
Our development server is exposed outside (so developers can ssh and work from home) so I don't want to give one user a lot of permissions, due to the experimental nature of the applications hosted on the server. (If the database gets compromised, the best it could do is drop the application database instead of all of the databases user have access to).
MySQL has no concept of "templated permissions". There are some useful sounding permission types provided, but these are not fine grained enough to construct something equivalent.
There are three steps your database-creation user would have to do:
As you can see, it all nearly works, apart from the user creation part. A possible compromise is to create per-developer users, which can create and use multiple test databases:
This will create a user "dev1" who can only create and use databases starting with "dev1_".
Since MySQL cannot provide a solution alone, I'd recommend just writing a program to do the database and username creation steps. Developers could invoke the problem like:
Since your program is controlling database/user creation, you can:
Such a program would have to use and protect your MySQL root password. How this would be achieved is platform dependent.
Good luck!
Umm, why not have the developers admin their own servers inside their development VMs, with the same security lock-downs as production (albeit different passwords etc)?
Am I missing something here? Shouldn't development be the same as production, and shouldn't each developer have their own environment they can play with as much as they like?