Console LDAP 配置解密

编程入门 行业动态 更新时间:2024-10-28 06:31:13

<a href=https://www.elefans.com/category/jswz/34/1771164.html style=Console LDAP 配置解密"/>

Console LDAP 配置解密

之前通过短视频向大家介绍了 Console 如何集成 LDAP,但很多小伙伴反映按照视频里的配置后不成功。今天就结合小伙伴们反映的问题来跟大家详细介绍一下。
Console LDAP 完整的配置参数如下:

名称类型说明
hoststringLDAP 服务器地址
portintLDAP 服务器端口,默认 389
tlsboolLDAP 服务器是否为 TLS 安全传输协议,默认 false
bind_dnstring执行 LDAP 查询的用户信息
bind_passwordstring执行 LDAP 查询的密码信息
base_dnstring过滤 LDAP 用户的根域
user_filterstring过滤 LDAP 用户的查询条件,默认 (uid=%s)
uid_attributestring用于用户 ID 的属性,默认 uid
group_attributestring用于用户组的属性,默认 cn
role_mapping.uidmap用于基于用户 UID 的权限映射
role_mapping.groupmap用于基于用户 Group 的权限映射

接下来结合 debug 模式的调试信息(-deubg -log debug)重点说明一下:

LDAP Result Code 49 "Invalid Credentials": 80090308: LdapErr: DSID-0C0903D3, comment: AcceptSecurityContext error, data 52e, v3839

出现上面错误有两种可能:1、执行 LDAP 查询的账户信息有误;2、登陆使用的账户信息有误

第一种情况涉及配置中的 bind_dn 和 bind_password。
其中 bind_dn 有两种写法:1、cn=serviceuser,ou=svcaccts,dc=glauth,dc=com;2、serviceuser@glauth
(注:如果是使用 AD,最好使用第二种写法。);如果 bind_dn 没问题,请检查账户的密码是否正确。

第二种情况请验证账户信息。

LDAP Result Code 201 "Filter Compile Error": ldap: finished compiling filter with extra at end

出现这个错误说明 user_filter 没有配置正确。user_filter 需配置一个过滤条件,可在 LDAP 中匹配到唯一记录(在过滤条件中使用“%s”引用登陆的账户名)。

authorize result: false, user: &{{yanxi@guobaojinrong <nil> <nil>} ldap yanxi@guobaojinrong yanxi@guobaojinrong    [] [] 0x4003721740}, err: no privilege assigned to this user:yanxi@guobaojinrong

出现这个错误说明赋权时出现异常,这里涉及到四个参数(uid_attribute、group_attribute、role_mapping.uid、role_mapping.group)的配置。

这里需要注意:group_attribute 及 uid_attribute 需配置 LDAP 账户信息中存在的属性字段,才能在后面的 role_mapping 里赋权成功。

注:role_mapping.uid、role_mapping.group 配置的值中不能包含特殊字符“.”。

更多推荐

Console LDAP 配置解密

本文发布于:2023-11-15 04:33:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1593719.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Console   LDAP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!