Unix Technical Forum

Oracle Views and Permissions

This is a discussion on Oracle Views and Permissions within the Oracle Database forums, part of the Database Server Software category; --> Hi, If I have a Table X in Schema A with 1000 rows spilt between 3 companies (company_id 1,2,3). ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-24-2008, 02:52 PM
Johne_uk
 
Posts: n/a
Default Oracle Views and Permissions

Hi,

If I have a Table X in Schema A with 1000 rows spilt between 3
companies (company_id 1,2,3).

I then create a view called Y in Schema B which is a Read Only View of
table X but only for rows where company_id = 3.

To create this view Schema B must have a SELECT privilege on Table X.

The problem is that, by assigning this select priv Schema B can now
view ALL rows in Table X directly and bypass the view.

Is there any way to prevent this by allowing access only to the view
and not the underlying table with company 1,2 data that is
confidential.

I'm using Oracle 8.1.7.4

Thanks for the help

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-24-2008, 02:52 PM
Tony Andrews
 
Posts: n/a
Default Re: Oracle Views and Permissions

Johne_uk wrote:
> If I have a Table X in Schema A with 1000 rows spilt between 3
> companies (company_id 1,2,3).
>
> I then create a view called Y in Schema B which is a Read Only View of
> table X but only for rows where company_id = 3.
>
> To create this view Schema B must have a SELECT privilege on Table X.
>
> The problem is that, by assigning this select priv Schema B can now
> view ALL rows in Table X directly and bypass the view.
>
> Is there any way to prevent this by allowing access only to the view
> and not the underlying table with company 1,2 data that is
> confidential.
>
> I'm using Oracle 8.1.7.4
>
> Thanks for the help


Create the view in schema A and then grant select on that view to
schema B.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-24-2008, 02:52 PM
Johne_uk
 
Posts: n/a
Default Re: Oracle Views and Permissions

Hi,

Yes I see what you are saying. By creating the views in the same schema
there is implict access to the data tables. Then granting access to the
views only for Schema B ensures that the underlying data tables cannot
be read directly by B.

The scenario relates to a production schema (Schema A) and Schema B was
to consist of a resticted number of Views. I was hoping to be able to
seperate the views to Schema B but this does not seem to be possible
judging by your suggestion and my testing.

Thank you very much for your help.
John

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:20 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com