Proxy user for DDL

oracle

I'm experimenting with the proxy user feature of oracle.

My sample: user_a has only object privileges and user_b has only system privileges. user_b is allowed to log in as user_a. So DDL and DML are separated.

The docs says, that user_b as user_a only has user_a privileges. That would mean, he loses its own rights?

Which difference does the CONNECT THROUGH WITH ROLE clause? Because a role could only chosen, if the user_a already got the role.

The only solution that I know, are system privileges with ANY clause (and without proxying), but then user_b could change objects in all other users, but I don't want that.

How could this problem solved?

Best Answer

User_B will be the owner of the objects and user_A is the user of those objects, which is a good separation and guarantees that the objects can not be changed by the application. You would not want user_A to be able to change any structure.

Normally you want an application manager to be able to connect as user_B to make the changes needed for a new version or something like that. If this is the case, you want your admins to have the possibility to connect through their personal accounts to user_B to do the changes. Since user_B is the owner of the objects, user_B also has the rights to use them.

So the solution is to use an application manager user to do the ddl using the proxy user. That is way better than giving dba privileges or ANY privileges to an application manager.