簡體   English   中英

Snowflake - 授予角色對數據庫的完全訪問權限; 撤銷對屬於該角色的用戶的特定模式的訪問權限

[英]Snowflake - Give full access on database to role; revoke access on specific schemas to user that is part of the role

有沒有辦法做到這一點? 有一個管理員角色,它是數據庫、模式和所有其他對象的所有者。 測試員角色僅對數據庫的 1 個架構具有讀/寫權限。 測試者角色需要成為該 1 個特定模式的管理員角色的一部分(以便創建的任何新對象 - 所有權將屬於管理員角色)。 必須撤銷對數據庫中所有其他模式的測試人員角色訪問權限的用戶的訪問權限

我試過這些腳本:

grant role testerrole to user tester1;

grant usage on database DEMODB to role adminrole;
grant usage on database DEMODB to role testerrole;
grant all on database DEMODB to role adminrole;
grant select,insert,update,delete in schema "DEMODB"."DEVSCHM" to role testerrole;

--Adding tester role in admin role
grant role adminrole to testerrole;

-- revoke all other schema access to tester1 (This fails. How to fix this?)
revoke usage on schema "DEMODB"."PRDSCHM" from user tester1;
revoke usage on schema "DEMODB"."QASSCHM" from user tester1;

希望實現這一點 - testerrole 需要能夠在 DEVSCHM 中創建對象,但 object 的所有權仍應由 adminrole 持有

如果我理解了您的問題,您希望管理員角色擁有所有對象,而不管創建它們的角色是什么。 如果是這種情況,那么只需將相關對象的未來所有權授予管理員角色

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM