带有正则表达式的不成功发行授权规则

问题描述 投票:1回答:1

我正在尝试在ADFS 3.0中制定授权规则,使用“依赖方”以特定的“ OU”形式禁用某些用户,但没有成功。

关于发行转换规则,我已将声明“ http://schemas.microsoft.com/ws/2008/06/identity/claims/distinguishedname”配置为从AD获得专有名称。

这里是一个示例:CN = John Doe,OU = XYZ,OU = ABC,DC = CONTOSO,DC = com

此规则应拒绝XPTO OU中用户的访问

c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/distinguishedname", Value =~ "^[^,]*,OU=XPTO.*$"]
 => issue(Type = "http://schemas.microsoft.com/authorization/claims/deny", Value = "true");

并且此规则应允许XPTO OU以外的所有用户访问

c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/distinguishedname", Value !~ "^[^,]*,OU=XPTO.*$"]
 => issue(Type = "http://schemas.microsoft.com/authorization/claims/permit", Value = "true");

但是,相反,这些规则将访问权授予某些用户,但拒绝其他用户,而是拒绝所有用户的访问权限

您能否阐明这个问题?

authentication adfs adfs3.0
1个回答
0
投票

嗯,问题已解决。

此方法的问题在于解释ADFS依赖方的颁发规则工作流的少数文档中。

我要做的就是在“发行授权规则”中添加第一条规则,以获取用户的DN。

c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"]
 => issue(store = "Active Directory", types = ("http://schemas.microsoft.com/ws/2008/06/identity/claims/distinguishedname"), query = ";DistinguishedName;{0}", param = c.Value);

此后,上述规则起了作用。

指向所有经历这些授权配置的一些指针:

  • 如果发布许可声明,则始终允许用户使用
  • 如果未发布许可或拒绝索赔,则拒绝用户
  • 当只有一个组织单位被拒绝访问时,此方法有效。对于其他复杂的验证,应使用自定义属性存储]
© www.soinside.com 2019 - 2024. All rights reserved.