If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > Cross database ownership chaining

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-09-09, 02:39
d_shanke d_shanke is offline
Registered User
 
Join Date: May 2009
Posts: 8
Cross database ownership chaining

In MS SQL we can disable the 'Cross database ownership chaining' feature by setting the configuration option 'cross db ownership chaining' to 0
How can we do this in Sybase?
Reply With Quote
  #2 (permalink)  
Old 06-09-09, 16:24
trvishi trvishi is offline
Registered User
 
Join Date: Sep 2003
Location: Switzerland
Posts: 426
This is a Sybase forum. And if you are expecting some advice on Sybase equivalent of a MSSQL feature, you need to mention a little bit more in detail what it does so that we can tell you if theres any equivalent in Sybase.
Reply With Quote
  #3 (permalink)  
Old 06-09-09, 23:53
d_shanke d_shanke is offline
Registered User
 
Join Date: May 2009
Posts: 8
My apologies for not having provided the relevant details. Details follow:
The concept of ownership chaining allows a non-owner of object who has permissions to execute a stored procedure (or select on view) to access tables referenced by the stored procedure or view, even though he has not been granted direct permissions to these tables. This is allowed since the stored procedure's owner (most likely the dbo) happens to be the owner of the objects which is being referenced by the stored procedure (or view).
Please see the following link for an e.g.
SyBooks Online

In MSSQL,
Cross-database ownership chaining is just like ownership chaining, but it works across databases. Let's suppose we have two databases - db1 and db2. If a stored procedure in db1 tries to access a table owned by the same login on db2, then access is allowed only if the cross-database ownership chaining is turned ON.
Please see the following link for more details:
Ownership Chaining - SQLServerCentral

I guess this feature should also be available in Sybase, since MSSQL is an inspired version of Sybase.
So if there is any such configurable item, how do we set it? That was my question.
Hope I have been able to provide some clarity on my question.
Reply With Quote
  #4 (permalink)  
Old 06-10-09, 06:06
trvishi trvishi is offline
Registered User
 
Join Date: Sep 2003
Location: Switzerland
Posts: 426
Hi,

Thanks for the explanation.

As far as I know theres no such options for cross-database chaining. If there is cross-database access, then the user needs to be a valid user on each database on top of the permissions you saw on the sybooks site.




Quote:
Originally Posted by d_shanke
My apologies for not having provided the relevant details. Details follow:
The concept of ownership chaining allows a non-owner of object who has permissions to execute a stored procedure (or select on view) to access tables referenced by the stored procedure or view, even though he has not been granted direct permissions to these tables. This is allowed since the stored procedure's owner (most likely the dbo) happens to be the owner of the objects which is being referenced by the stored procedure (or view).
Please see the following link for an e.g.
SyBooks Online

In MSSQL,
Cross-database ownership chaining is just like ownership chaining, but it works across databases. Let's suppose we have two databases - db1 and db2. If a stored procedure in db1 tries to access a table owned by the same login on db2, then access is allowed only if the cross-database ownership chaining is turned ON.
Please see the following link for more details:
Ownership Chaining - SQLServerCentral

I guess this feature should also be available in Sybase, since MSSQL is an inspired version of Sybase.
So if there is any such configurable item, how do we set it? That was my question.
Hope I have been able to provide some clarity on my question.
Reply With Quote
  #5 (permalink)  
Old 06-10-09, 11:35
trvishi trvishi is offline
Registered User
 
Join Date: Sep 2003
Location: Switzerland
Posts: 426
I did come across a similar issue and found something which may interest you.

If a login is added to db1 with a userid and another database db2 with a different userid, and objects are created by this login and granted permissions to others, it may affect the way implicit permissions work. I have to do a test to confirm this. Dont have time at the moment.

------------------

New 12.0 Concrete Identification feature.

Concrete identification enables Adaptive Server to verify chains of ownership between procedures, views, and triggers and the objects they reference in other databases. Adaptive Server identifies users during a session by login name or server user ID (suid). This identification applies to all databases in the server. When the user creates an object, the server associates both the owner's database user ID (uid) and the creator's login name with the object in the sysobjects table. This information concretely identifies the object as belonging to that user, which allows the server to recognize when permissions on the object can be granted implicitly.

To disable this feature, use trace flag 10303. However, this is not recommended as a permanent solution, as it affects intended security in ASE 12.0.
-----------------
Reply With Quote
  #6 (permalink)  
Old 06-16-09, 02:16
d_shanke d_shanke is offline
Registered User
 
Join Date: May 2009
Posts: 8
Thanks trvishi!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On