Bug/Annoyance with phpmyadmin sso

sysdev

Verified User
Joined
Jul 16, 2007
Messages
561
If you create a stored procedure/function, it takes the privileges of the logged in user. If you want to change this, the user needs SUPER privileges and we don't want that...

But as the SSO is another username every time it's used, you'll soon end up with a mess where SSO users can't change procedures because the sso user doesnt exist anymore, the original db user is unable to change the procedures made by SSO user because he has no SUPER privs and the only way to fix this is to give a user super privs of crud privs on the mysql.proc table... and you don't want that either in a shared environment.

So a 'reset func/procedure' permissions option in da, using a sufficiently privileged user to update the 'definer' field in mysql.proc with a selected database user would be a nice to have feature.

Or am I doing things wrong?

@smtalk
@scriptkitty
 
Nope, it's set to 'user'@'localhost' so this still prevents either the new sso user or the user assigned to the database ( 'user_db'@'localhost') to alter/delete the procedure.
 
Faced same issue after set phpmyadmin_public=no
users who has procedures created earlier - now can't manage them, temporary solved by installing own copy of PhpMyadmin on their accounts/websites. How to fix it globally?
 
@Zhenyapan, using MariaDB 11.4 can help (partially). The MariaDB 11.4 introduced the concept of SHOW CREATE ROUTINE privilege. If you use MariaDB 11.4 the SSO accounts will be able to check the routine code. It could also edit the routine but it is more cumbersome if performed via the phpMyAdmin.

The phpMyAdmin disables the "Edit" action for the stored procedure (I assume because it will not be able to preserve the definer). But user could check the routine code, delete old one and create new identical (or slightly modified) one. In other words users are able to modify stored procedures but need to do the "view" -> "delete" -> "create" steps.
 
Back
Top