我正在尝试在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");
但是,相反,这些规则将访问权授予某些用户,但拒绝其他用户,而是拒绝所有用户的访问权限
您能否阐明这个问题?
嗯,问题已解决。
此方法的问题在于解释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);
此后,上述规则起了作用。
指向所有经历这些授权配置的一些指针: