ACL 主体与 GrantedAuthority 概念
ACL Principal vs GrantedAuthority Concepts
我正在阅读 Spring 安全 ACL 库,我对某些概念有点困惑。关于 SID,令我困惑的是:
ACL_SID allows us to uniquely identify any principal or authority in
the system ("SID" stands for "security identity"). The only columns
are the ID, a textual representation of the SID, and a flag to
indicate whether the textual representation refers to a prncipal name
or a GrantedAuthority.
所以principal和role一样吗? GrantedAuthority 是一个平等的概念还是一个特定的角色?布尔字段 principal
= true 是否意味着标识符具有语义值或仅仅是它是系统中的一个角色?如果是这样,为什么要存储系统中未计入的SID?
一个ACL(Access Control List)由许多条目(规则)组成,其中每个条目引用一个sid,这是一个用户或一组用户申请entry/rule for.
如果principal字段设置为true
,则sid为principal,即单个用户。然后 sid 字段包含用户名。
如果principal字段设置为false
,则sid为authority,例如ROLE_ADMIN。 GrantedAuthority 与角色基本相同(角色是一种权限)。
我正在阅读 Spring 安全 ACL 库,我对某些概念有点困惑。关于 SID,令我困惑的是:
ACL_SID allows us to uniquely identify any principal or authority in the system ("SID" stands for "security identity"). The only columns are the ID, a textual representation of the SID, and a flag to indicate whether the textual representation refers to a prncipal name or a GrantedAuthority.
所以principal和role一样吗? GrantedAuthority 是一个平等的概念还是一个特定的角色?布尔字段 principal
= true 是否意味着标识符具有语义值或仅仅是它是系统中的一个角色?如果是这样,为什么要存储系统中未计入的SID?
一个ACL(Access Control List)由许多条目(规则)组成,其中每个条目引用一个sid,这是一个用户或一组用户申请entry/rule for.
如果principal字段设置为
true
,则sid为principal,即单个用户。然后 sid 字段包含用户名。如果principal字段设置为
false
,则sid为authority,例如ROLE_ADMIN。 GrantedAuthority 与角色基本相同(角色是一种权限)。