具有可选kerberos支持的udata的ldap身份验证。
udata-ldap的Python项目详细描述
UData LDAP
具有可选kerberos支持的udata的ldap身份验证。
要求
要使用仅限LDAP的身份验证,只需要udata-ldap
扩展。
要使用^{
在Debian上,您可以使用:
apt-get install krb5-config krb5-user libkrb5-dev
您需要在/etc/krb5.conf
中配置域。
以下是DOMAIN.ORG
:
[libdefaults]default_realm=DOMAIN.ORG[realms]DATA.XPS={ #admin_server = ipa.data.xps # use "kdc = ..." if realm admins haven't put SRV records into DNS kdc = kdc.domain.org admin_server = kdc.domain.org:749 default_domain = domain.org dns_lookup_realm = false dns_lookup_kdc = false rdns = false }[domain_realm]domain.org=DOMAIN.ORG .domain.org = DOMAIN.ORG
用法
在udata环境中安装插件包:
pip install udata-ldap
然后在udata.cfg
中激活它:
PLUGINS=['ldap']
nb:如果使用kerberos sasl和/或spnego,请使用以下命令安装它:
pip install udata-ldap[kerberos]
配置
udata-ldap
使用^{
提供了一些额外参数:
Parameter | Default value | Notes |
---|---|---|
^{ | ^{ | Enable verbose/debug logging |
^{ | ^{ | Path to an optionnal Kerberos keytab for this service |
^{ | ^{ | The service principal as configured in the keytab |
^{ | ^{ | The service hostname (ie. ^{ |
^{ | ^{ | Whether or not to enable passwordless authentication with SPNEGO |
^{ | ^{ | Automaticaly remove @REALM from SPNEGO/REMOTE_USER identifier |
^{ | ^{ | The ldap attribute extracted from SPNEGO handshake to match the user |
^{ | ^{ | The ldap attribute to extract the first name from |
^{ | ^{ | The ldap attribute to extract the last name from |
测试配置
udata-ldap
提供两个命令来帮助配置:
udata ldap config
将显示由udata
看到的LDAP配置
udata ldap check
将允许快速测试LDAP配置。udata ldap krbcheck
将允许快速测试kerberos配置。
使用Docker进行本地测试
提供了一个示例docker-compose.yml
,用于使用freeipa服务器进行本地测试。
要使用它,需要将文件ipa-server-install-options.example
复制到ipa-server-install-options
,并使用自己的参数对其进行编辑。
ex:
--unattended
--realm=DOMAIN.ORG
--domain=DOMAIN.ORG
--ds-password=password
--admin-password=password
更改日志
0.3.5(2018-11-23)
- 固定包装
0.3.4(2018-11-23)
- 修复negociate和remote_用户电子邮件提取
- 修复一些命令行编码错误
0.3.3(2018-11-09)
- 内部:将所有kerberos处理提取到其自己的模块中
- kerberos:处理spnego/remote_用户标识符中的领域删除
0.3.2(2018-10-16)
- 修复一些控制台编码错误
- 修复LDAP值提取
- 使所有映射到用户配置文件的LDAP属性都可配置
0.3.1(2018-10-11)
- 为了保持一致性,将
LDAP_USER_SPNEGO_ATTR
重命名为LDAP_REMOTE_USER_ATTR
- 使用spnego属性修复登录表单以进行登录
0.3.0(2018-10-09)
- 在登录表单上显示错误
- 将电子邮件强制输入登录表单
- 修复LDAP命令中的编码错误
- 登录时更新用户
- 开始处理负关联视图上的错误
- 尝试使用凭据自动登录时显示页面
- 添加翻译
0.2.1(2018-10-08)
- 修复“自动登录”链接
- 更多日志记录
0.2.0
- 更多测试
- 隐藏调试日志,除非
LDAP_DEBUG = True
- 删除错误的默认设置
LDAP_*
设置
0.1.0
初始版本