![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, is it possible to implement a stored procedure executing with a higher authorization than the calling client connection? Background: I'd like to store an applications authorizations in a database table. Of course access to this table must be very restricted. Having a low restricted stored procedure using a username and password as argument to asquire and pass back an access level from this highly restricted table may be one solution for this. I'd like to avoid the need to have one DB user for every application user or group. Using ASA 9.0.2.3267 on Windows and Windows CE. TIA Chris Werner |
#3
| |||
| |||
|
|
That's actually how stored procedures *work*... |
|
That's actually how stored procedures *work*... they execute with the permissions of the procedure owner, not the procedure caller. You then GRANT EXECUTE to the user ids doing the calling; that means they can call the procedure that does the SELECT even though they cannot directly do a SELECT themselves. Some folks bury ALL their SQL inside procedures and GRANT nothing but EXECUTE... not an approach that is power-user-friendly, but AFAIK it certainly satisfies your requirement. Do I hear a "Woohoo!" ? <g Breck On 11 Apr 2006 02:43:15 -0700, "Chris Werner" cw{please_no_spam}ATf-s.de> wrote: Hi, is it possible to implement a stored procedure executing with a higher authorization than the calling client connection? Background: I'd like to store an applications authorizations in a database table. Of course access to this table must be very restricted. Having a low restricted stored procedure using a username and password as argument to asquire and pass back an access level from this highly restricted table may be one solution for this. I'd like to avoid the need to have one DB user for every application user or group. Using ASA 9.0.2.3267 on Windows and Windows CE. TIA Chris Werner -- Breck Carter [Team iAnywhere] RisingRoad SQL Anywhere and MobiLink Professional Services www.risingroad.com The book: http://www.risingroad.com/SQL_Anywhe...ers_Guide.html breck.carter (AT) risingroad (DOT) com |
![]() |
| Thread Tools | |
| Display Modes | |
| |