Discussion:
User access to stored procedure
(too old to reply)
Stephan Arenswald
2007-09-12 20:00:50 UTC
Permalink
Hi All,

assuming there are three users on a system. User1 creates a stored
procedure using an external c program. The code is written using static
embedded sql. User2 grants the privilege to invoke the stored procedure
to User3. When User3 executes the sp which authorization id will be used
to check whether the sql statements are allowed or not?

I think it's User1 because he adds a stored procedure to the database
with STATIC embedded sql. Therefore he must have BINDADD and explicit
privileges on the database objects referenced in the stored procedure.
User3 only needs EXECUTE privilege on the sp to execute it.

Am I right with User1, or do I have an error in reasoning?

Regards
Ian
2007-09-13 12:48:50 UTC
Permalink
Post by Stephan Arenswald
Hi All,
assuming there are three users on a system. User1 creates a stored
procedure using an external c program. The code is written using static
embedded sql. User2 grants the privilege to invoke the stored procedure
to User3. When User3 executes the sp which authorization id will be used
to check whether the sql statements are allowed or not?
I think it's User1 because he adds a stored procedure to the database
with STATIC embedded sql. Therefore he must have BINDADD and explicit
privileges on the database objects referenced in the stored procedure.
User3 only needs EXECUTE privilege on the sp to execute it.
Am I right with User1, or do I have an error in reasoning?
Yes, this is correct.

Loading...