问题描述
你好,
我想要一个关于下面用例的建议
我们有一个包含2个模式的数据库,对于模式1和2,每个对象都被完全授予
每个用户都有默认角色
As you can imagine, the security is done by the apps not the database。
We are planing to add an extra schema, this schema will only have BI tables。
I could set a role and add those tables in the role but unfortunatly it seems that it's not possible to connect with a selected role。
我想做的是:
当用户登录通过应用程序访问数据库时,他可以访问整个数据库
当用户登录BI时,他只能看到BI架构中的对象
你有什么建议?
谢谢
我想要一个关于下面用例的建议
我们有一个包含2个模式的数据库,对于模式1和2,每个对象都被完全授予
grant all on "object_name" to public
每个用户都有默认角色
"Resource","Connect"。
As you can imagine, the security is done by the apps not the database。
We are planing to add an extra schema, this schema will only have BI tables。
I could set a role and add those tables in the role but unfortunatly it seems that it's not possible to connect with a selected role。
我想做的是:
当用户登录通过应用程序访问数据库时,他可以访问整个数据库
当用户登录BI时,他只能看到BI架构中的对象
你有什么建议?
谢谢
专家解答
我建议你不要尝试这个。
首先,授予所有不仅仅是选择/插入/更新/删除。它还包括:
哎呀!
其次,我不知道为特定用户禁用公共访问的方法。这使得很难满足要求!
请记住,在安全方面,遵循最小特权原则。
只允许人们获得他们特别需要的东西。不是一切。“以防万一”。
如果您需要一个可以看到每个表的 “上帝” 用户,则可以给它:
但是,请谨慎地给予此特权和其他任何 “任何” 特权。
否则,你会让黑客更容易获取你的数据。
首先,授予所有不仅仅是选择/插入/更新/删除。它还包括:
create table t ( c1 int ); grant all on t to public; select privilege from dba_tab_privs where grantee = 'PUBLIC' and table_name = 'T'; PRIVILEGE ALTER DELETE INDEX INSERT SELECT UPDATE REFERENCES READ ON COMMIT REFRESH QUERY REWRITE DEBUG FLASHBACK
哎呀!
其次,我不知道为特定用户禁用公共访问的方法。这使得很难满足要求!
请记住,在安全方面,遵循最小特权原则。
只允许人们获得他们特别需要的东西。不是一切。“以防万一”。
如果您需要一个可以看到每个表的 “上帝” 用户,则可以给它:
grant select any table to u;
但是,请谨慎地给予此特权和其他任何 “任何” 特权。
否则,你会让黑客更容易获取你的数据。
文章转载自ASKTOM,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




