Authentication 未成功使用regex的完整发行授权规则

Authentication 未成功使用regex的完整发行授权规则,authentication,adfs,adfs3.0,Authentication,Adfs,Adfs3.0,我试图在ADFS 3.0中制定授权规则,使用“依赖方”禁用特定“OU”表单中的某些用户,但没有成功 在发布转换规则中,我已将声明“”配置为从AD获取可分辨名称 这里有一个例子:CN=johndoe,OU=XYZ,OU=ABC,DC=CONTOSO,DC=com 此规则应拒绝XPTO OU中用户的访问 c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/distinguishedname", Value =~ "^

我试图在ADFS 3.0中制定授权规则,使用“依赖方”禁用特定“OU”表单中的某些用户,但没有成功

在发布转换规则中,我已将声明“”配置为从AD获取可分辨名称

这里有一个例子:CN=johndoe,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");
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");
此规则应允许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");
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");
但是,相反,这些规则授予某些用户访问权限,并拒绝其他用户,它们拒绝所有用户的访问


你能解释一下这个问题吗?

这个问题已经解决了

这种方法的问题在于解释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);
之后,上述规则就像一个符咒

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

  • 如果发布了许可证声明,则用户始终是被允许的
  • 如果未发布许可或拒绝声明,则拒绝用户
  • 只有一个组织单位被拒绝访问时,这种方法才有效。对于其他复杂的验证,应使用自定义属性存储