ldap - RADIUS 与 Azure Active Directory 域服务(LDAP 和 NPS)
问题描述
我已经在我的 AzureAD 域上部署了 AADDS。
我已更改用户密码以生成初始同步哈希。
我在 Ubuntu 18.04 LTS 下创建了一个 FreeRADIUS VM,该 VM 能够通过 ADDDS 子网内的 LDAP 与具有“AAD DC 管理员”组的用户连接。
我已经设置了一个带有 RADIUS 配置文件的 Ubiquiti Uni-Fi UAP nanoHD WPA2 Enterprise 无线网络,以通过 FreeRADIUS VM 进行身份验证。
使用 iPhone XR 和 Windows 10 笔记本电脑测试 Wi-Fi 登录。
要绑定的初始 LDAP 身份验证成功。
用户在目录上成功匹配。
使用警告处理用户属性。
(2) ldap: Processing user attributes
(2) ldap: WARNING: No "known good" password added. Ensure the admin user has permission to read the password attribute
(2) ldap: WARNING: PAP authentication will *NOT* work with Active Directory (if that is what you were trying to configure)
身份验证失败,因为没有可用的映射“用户密码”属性。
(2) [ldap] = ok
(2) if ((ok || updated) && User-Password) {
(2) if ((ok || updated) && User-Password) -> FALSE
(2) [expiration] = noop
(2) [logintime] = noop
(2) } # authorize = ok
(2) ERROR: No Auth-Type found: rejecting the user via Post-Auth-Type = Reject
(2) Failed to authenticate the user
我已经研究并尝试了以下内容。
由于 Samba 限制(仅适用于 Azure 文件),目前无法使用“ntlm_auth”。
由于 AADDS 的权限限制,无法更改 Active Directory 设置中的“dsHeuristics”值以启用“userPassword”属性。
***Call Modify...
ldap_modify_s(ld, 'CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=example,DC=com',[1] attrs);
Error: Modify: Insufficient Rights. <50>
Server error: 00002098: SecErr: DSID-03150E49, problem 4003 (INSUFF_ACCESS_RIGHTS), data 0
Error 0x2098 Insufficient access rights to perform the operation.
我的设置完全如https://stackoverflow.com/a/55931232/5163441所示
这个人声称它对他有用,因此它正在寻找一个属性来比较密码。
我没有看到任何可用于身份验证的相关属性。
Dn: CN=John Smith,OU=AADDC Users,DC=example,DC=com
accountExpires: 9223372036854775807 (never);
badPasswordTime: 0 (never);
badPwdCount: 0;
cn: John Smith;
codePage: 0;
countryCode: 0;
displayName: John Smith;
distinguishedName: CN=John Smith,OU=AADDC Users,DC=example,DC=com;
dSCorePropagationData (2): 8/13/2019 7:53:04 PM Coordinated Universal Time; 0x0 = ( );
instanceType: 0x4 = ( WRITE );
lastLogoff: 0 (never);
lastLogon: 8/14/2019 6:17:50 PM Coordinated Universal Time;
lastLogonTimestamp: 8/14/2019 4:05:51 PM Coordinated Universal Time;
logonCount: 4;
mail: jsmith@example.com;
memberOf (13): OU=AADDC Users,DC=example,DC=com; CN=AAD DC Administrators,OU=AADDC Users,DC=chr,DC=cl;
msDS-AzureADMailNickname: jsmith;
msDS-AzureADObjectId: <ldp: Binary blob 16 bytes>;
name: John Smith;
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=example,DC=com;
objectClass (4): top; person; organizationalPerson; user;
objectGUID: a8123123-3f4f-4123-9123-b530ff123123;
objectSid: S-1-5-21-545123123123-358123123-844123123-1123;
preferredLanguage: en-US;
primaryGroupID: 513 = ( GROUP_RID_USERS );
pwdLastSet: 8/14/2019 2:19:10 PM Coordinated Universal Time;
sAMAccountName: jsmith;
sAMAccountType: 805306368 = ( NORMAL_USER_ACCOUNT );
userAccountControl: 0x200 = ( NORMAL_ACCOUNT );
userPrincipalName: jsmith@example.com;
uSNChanged: 30696;
uSNCreated: 20588;
whenChanged: 8/14/2019 4:06:06 PM Coordinated Universal Time;
whenCreated: 8/13/2019 7:21:29 PM Coordinated Universal Time;
我还没有测试过 Kerberos,也许还有 OAuth2。
编辑:
我没有检查客户端发送的数据包,并且有一些我以前没有研究过的东西。
通过使用诸如 NTRadPing 之类的工具发送纯文本登录信息,它将正确地进行身份验证,因为它将包含“用户密码”属性。
另一方面,尝试通过 Wi-Fi 登录通常是“EAP”散列密码。
(10) Received Access-Request Id 21 from 10.0.0.50:56480 to 10.0.0.10:1812 length 217
(10) User-Name = "jsmith@example.com"
(10) NAS-Identifier = "18e829123123"
(10) Called-Station-Id = "18-E5-39-B1-E3-D1:Test"
(10) NAS-Port-Type = Wireless-802.11
(10) Service-Type = Framed-User
(10) Calling-Station-Id = "C0-91-C0-58-BA-AC"
(10) Connect-Info = "CONNECT 0Mbps 802.11a"
(10) Acct-Session-Id = "7394227D45123123"
(10) WLAN-Pairwise-Cipher = 1123123
(10) WLAN-Group-Cipher = 1123123
(10) WLAN-AKM-Suite = 1123123
(10) Framed-MTU = 1400
(10) EAP-Message = 0x02fe001231236d617274696e657a40636872123123
(10) Message-Authenticator = 0x5fd0a8123123984b6b996f2941123123
我会继续研究。
编辑2:
到目前为止,我找不到可行的方法来执行此操作,但我找到了另一种方法使 RADIUS 通过 NPS 和 AADDS 工作。
- 在 AADDS 子网中创建 Windows Server VM 并安装 NPS 角色。
- 配置 NPS,但不要将其注册到域中,因为它不起作用,因为 AADDS 没有为您提供执行此操作所需的权限。
- 将您的 RADIUS 客户端配置为针对此 NPS 服务器,它仍然可以工作,NPS 服务器不必注册到域中即可使 RADIUS 工作。
解决方案
推荐阅读
- haskell - 仍然对 GHCi 中的“让”感到困惑
- c# - 使用 NULL 节点的 C# XML 反序列化
- wordpress - 安装了 SSL 的 Chrome 显示“不安全”
- c# - 拆分错误以在asp.net c#中检索整数
- c# - 在 autofac 中注册 GlobalConfiguration.Configuration.DependencyResolver
- python-3.x - 如何在每次迭代后减小 ndarray 的大小?
- javascript - 如何克隆输入类型的文件内容?
- vba - Excel VBA 运行时错误
- ios - 当它不是 rootviewcontroller 并且没有导航控制器时,如何从 SKScene 访问以前的视图控制器?
- button - 使用引导程序使用移动设备时如何使按钮组成为下拉列表