1Z0-497 · Question #156
Which two statements are true when you execute an invoker's rights procedure?
The correct answer is A. The owner must have the INHERIT PRIVILEGES object privilege on the invoking user, or the B. Invoking users can control who can access their privileges when they run an invoker's rights. About Definer's Rights and Invoker's Rights Both definer's rights and invoker's rights are a way to control access to the privileges necessary to run a user-created procedure, or program unit. In a definer's rights procedure, the procedure executes with the privileges of the…
Question
Which two statements are true when you execute an invoker's rights procedure?
Options
- AThe owner must have the INHERIT PRIVILEGES object privilege on the invoking user, or the
- BInvoking users can control who can access their privileges when they run an invoker's rights
- CThe calling user must be granted the INHERIT PRIVILEGES object privilege on the user owner of
- DThe calling user must grant the INHERIT PRIVILEGES object privilege on the user owner of the
How the community answered
(51 responses)- A80% (41)
- C12% (6)
- D8% (4)
Explanation
About Definer's Rights and Invoker's Rights Both definer's rights and invoker's rights are a way to control access to the privileges necessary to run a user-created procedure, or program unit. In a definer's rights procedure, the procedure executes with the privileges of the owner. The privileges are bound to the schema in which they were created. An invoker's rights procedure executes with the privileges of the current user, that is, the user who invokes the procedure. For example, suppose user bixby creates a procedure that is designed to modify table cust_records and then he grants the EXECUTE privilege on this procedure to user rlayton. If bixby had created the procedure with definer's rights, then the procedure would look for table cust_records in bixby's schema. Had the procedure been created with invoker's rights, then when rlayton runs it, the procedure would look for table cust_records in rlayton's schema. By default, all procedures are considered definer's rights. You can designate a procedure to be an invoker's rights procedure by using the AUTHID CURRENT_USER clause when you create or modify it, or you can use the AUTHID DEFINER clause to make it a definer's rights procedure. How the INHERIT [ANY] PRIVILEGES Privileges Control Privilege Access The INHERIT PRIVILEGES and INHERIT ANY PRIVILEGES privileges regulate the privileges used when a user runs an invoker's rights procedure or queries a BEQUEATH CURRENT_USER view that references an invoker's rights procedure. When a user runs an invoker's rights procedure, Oracle Database checks it to ensure that the procedure owner has either the INHERIT PRIVILEGES privilege on the invoking user, or if the owner has been granted the INHERIT ANY PRIVILEGES privilege. If the privilege check fails, then Oracle Database returns an "ORA-06598: insufficient INHERIT PRIVILEGES privilege" error. The benefit of these two privileges is that they give invoking users control over who can access their privileges when they run an invoker's rights procedure or query a BEQUEATH CURRENT_USER view.
Topics
Community Discussion
No community discussion yet for this question.