GCP IAM - 政策 inheritance/precedence
GCP IAM - Policy inheritance/precedence
Child policies cannot restrict access granted at a higher
level. For example, if you grant the Editor role to a user for a
project, and grant the Viewer role to the same user for a child
resource, then the user still has the Editor role grant for the child
resource.
这是否也意味着如果我在更高级别为用户分配限制性访问权限但在资源级别分配更多许可访问权限,则该用户将拥有更多许可访问权限?换句话说,无论在哪个级别授予更宽松的政策,更宽松的政策都会覆盖限制性政策?
示例:
授予 UserA 项目的查看者角色但在资源级别分配编辑者角色,用户 A 将拥有资源的编辑者级别访问权限?
Does it also mean that if I assign a user restrictive access at higher
level but assign more permissive access at resource level, that user
will have more permissive access?
是的。
In other words, more permissive policy will override restrictive
policy no matter what at which level more permissive policy is granted
at?
没想到它有凌驾。将其视为授予额外权限。
Grant UserA viewer role for a project but assign Editor role at
resource level, UserA will have editor level access to the resource?
正确,用户 A 将拥有资源的编辑级别。
将层次结构视为组织/文件夹/项目/资源。如果您拥有较高级别的权限,那么您至少拥有较低级别的那些权限。这类似于公司的组织。如果你是V.P。部门(项目)的你仍然是 V.P。对于该部门下的每个组(资源)。反之亦然。您是组织的团队成员(项目查看者),但您是一个组的经理(计算资源编辑者)并且只是其他资源的项目查看者。
只是补充上面的答案,
如果在合并策略的过程中,出现策略冲突的情况,则DENY优先。
例如有以下两个策略
在文件夹级别 ->
允许为用户 x@a.com
创建存储桶
在 Project1 级别 ->
拒绝为用户 x@a.com
创建存储桶
然后 DENY
策略优先,用户 x@a.com
将无法创建存储桶。
Child policies cannot restrict access granted at a higher level. For example, if you grant the Editor role to a user for a project, and grant the Viewer role to the same user for a child resource, then the user still has the Editor role grant for the child resource.
这是否也意味着如果我在更高级别为用户分配限制性访问权限但在资源级别分配更多许可访问权限,则该用户将拥有更多许可访问权限?换句话说,无论在哪个级别授予更宽松的政策,更宽松的政策都会覆盖限制性政策?
示例:
授予 UserA 项目的查看者角色但在资源级别分配编辑者角色,用户 A 将拥有资源的编辑者级别访问权限?
Does it also mean that if I assign a user restrictive access at higher level but assign more permissive access at resource level, that user will have more permissive access?
是的。
In other words, more permissive policy will override restrictive policy no matter what at which level more permissive policy is granted at?
没想到它有凌驾。将其视为授予额外权限。
Grant UserA viewer role for a project but assign Editor role at resource level, UserA will have editor level access to the resource?
正确,用户 A 将拥有资源的编辑级别。
将层次结构视为组织/文件夹/项目/资源。如果您拥有较高级别的权限,那么您至少拥有较低级别的那些权限。这类似于公司的组织。如果你是V.P。部门(项目)的你仍然是 V.P。对于该部门下的每个组(资源)。反之亦然。您是组织的团队成员(项目查看者),但您是一个组的经理(计算资源编辑者)并且只是其他资源的项目查看者。
只是补充上面的答案,
如果在合并策略的过程中,出现策略冲突的情况,则DENY优先。
例如有以下两个策略
在文件夹级别 ->
允许为用户 x@a.com
在 Project1 级别 ->
拒绝为用户 x@a.com
然后 DENY
策略优先,用户 x@a.com
将无法创建存储桶。