Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / February 2007

Tip: Looking for answers? Try searching our database.

SECURITY INVOKER in DB2?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Troels Arvin - 21 Feb 2007 23:06 GMT
Hello,

In PostgreSQL, when you create a function, you may choose between SECURITY
INVOKER or SECURITY DEFINER:
http://www.postgresql.org/docs/8.2/static/sql-createfunction.html
When a function has SECURITY INVOKER (the default), the SQL it contains is
run with the permissions of the invoking user.

It seems that DB2 UDFs uses SECURITY DEFINER (using PostgreSQL terms), and
that there is no way to change that. Or? Is there a way for me to provide
a UDF to a lot of users but prevent the contained SQL from being executed
with my permissions?

Signature

Regards,
Troels Arvin <troels@arvin.dk>
http://troels.arvin.dk/

Serge Rielau - 22 Feb 2007 00:54 GMT
> Hello,
>
[quoted text clipped - 8 lines]
> a UDF to a lot of users but prevent the contained SQL from being executed
> with my permissions?

You can use dynamic SQL for the pieces you don't want to vouch for.
To use dynamic SQL in a SQL UDF CALL a procedure and place the
PREPARE/EXECUTE/EXECUTE IMMEDIATE in there.
Dynamic SQL runs under invoker rights.

Still curiosu to learn more about what is driving this.
Encapsulation of authority is a core function of views and routines.

Signature

Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.