[英]How to downgrade user to read only?
There are some users in the Redshift data warehouse who have read and edit permissions. Redshift 数据仓库中有一些用户具有读取和编辑权限。 What query should I run to remove their edit permissions so that they can only do select queries?
我应该运行什么查询来删除他们的编辑权限,以便他们只能执行 select 查询?
The SQL command you are looking for is REVOKE - https://docs.aws.amazon.com/redshift/latest/dg/r_REVOKE.html您要查找的 SQL 命令是 REVOKE - https://docs.aws.amazon.com/redshift/latest/dg/r_REVOKE.html
Now to get the exact command(s) you want to run a few more pieces of information will be needed.现在要获得您想要运行的确切命令,还需要一些信息。 But first a quick overview of Redshift permissions.
但首先快速概述一下 Redshift 权限。 In many database like Redshift users don't (in general) have permissions, the objects have access information about which users/groups can perform which actions.
在像 Redshift 这样的许多数据库中,用户(通常)没有权限,对象具有关于哪些用户/组可以执行哪些操作的访问信息。 So there is no 'make this user be read-only always' command.
所以没有“让这个用户永远只读”的命令。 REVOKE can act on databases, schemas, tables, and views but these actions only apply to currently existing objects.
REVOKE 可以对数据库、模式、表和视图进行操作,但这些操作仅适用于当前存在的对象。 Objects created in the future will have the access rights assigned by the creating users default ACL.
以后创建的对象将具有创建用户默认 ACL 分配的访问权限。
Now to the questions - are all these users part of a group and the only members of this group?现在问题来了——所有这些用户都是一个组的一部分并且是这个组的唯一成员吗? If so you will likely want to apply the REVOKE to the group.
如果是这样,您可能希望将 REVOKE 应用于该组。 Is this restriction for existing tables or do you want them to not be able to create new table (even temp table) in all schemas and database?
这是对现有表的限制,还是您希望它们不能在所有模式和数据库中创建新表(甚至是临时表)? This will impact what object types you want to revoke rights.
这将影响 object 哪些类型要撤销权限。 Have you or your DBAs changed the default ACLs on the database?
您或您的 DBA 是否更改了数据库的默认 ACL? These may need to be updated to prevent write accesses being given on future objects in the database.
这些可能需要更新以防止对数据库中的未来对象进行写访问。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.