jupyterhub的ldap身份验证器
jupyterhub-ldap-authenticator的Python项目详细描述
jupyterhub ldap验证器
jupyterhub的ldap authenticator插件。 这个项目是在考虑企业LDAP集成的情况下编写的,包括 以下功能:
- 支持多个LDAP服务器,并允许配置
服务器池策略
- 每个身份验证请求使用一个只读LDAP连接
- 验证LDAP中是否存在身份验证用户,并且该用户是
允许的组的成员
在测试身份验证之前- 支持在
允许的组中使用嵌套组
列表- 支持在登录时创建域用户主目录
这个项目的灵感来自于ldapauthenticator项目。
安装
使用pip安装:
pip install jupyterhub-ldap-authenticator
配置
要启用ldapauthenticator,请将以下行添加到jupyterhub配置文件中,并使用下面列出的参数扩展配置。
c.JupyterHub.authenticator_class='ldapauthenticator.LDAPAuthenticator'< DL>
# example- list of complete urlsc.LDAPAuthenticator.server_hosts=['ldaps://ldap1.example.com:636','ldaps://ldap2.example.com:636']# example - list of namesc.LDAPAuthenticator.server_hosts=['ldap1.example.com','ldap2.example.com']# example - list of ipsc.LDAPAuthenticator.server_hosts=['10.0.0.1','10.0.0.2']< DL>
# examplec.LDAPAuthenticator.server_port=636< DL>
# examplec.LDAPAuthenticator.server_use_ssl=True< DL>
# examplec.LDAPAuthenticator.server_connect_timeout=10< DL>
# examplec.LDAPAuthenticator.server_receive_timeout=10< DL>
- 第一个:获取池中的第一个服务器,如果"服务器池活动"设置为true,则获取第一个可用服务器。
- 循环:每次连接打开时,都会使用池中的后续服务器。如果"服务器池活动"设置为true,则将丢弃不可用的服务器。
- 随机:每次连接打开时,池中都会选择一个随机服务器。如果"服务器池活动"设置为true,则将丢弃不可用的服务器。
# examplec.LDAPAuthenticator.server_pool_strategy='FIRST'< DL>
# example - booleanc.LDAPAuthenticator.server_pool_active=True# example - maximum number of triesc.LDAPAuthenticator.server_pool_active=3< DL>
pip install jupyterhub-ldap-authenticator
0
< DL>pip install jupyterhub-ldap-authenticator
1
< DL>pip install jupyterhub-ldap-authenticator
2
< DL>pip install jupyterhub-ldap-authenticator
3
< DL>pip install jupyterhub-ldap-authenticator
4
< DL>< Dt>ldapauthenticator.user_membership_属性pip install jupyterhub-ldap-authenticator
5
< DL>pip install jupyterhub-ldap-authenticator
6
< DL>pip install jupyterhub-ldap-authenticator
7
< DL>pip install jupyterhub-ldap-authenticator
8
< DL>pip install jupyterhub-ldap-authenticator
9
< DL>c.JupyterHub.authenticator_class='ldapauthenticator.LDAPAuthenticator'0 < DL>
c.JupyterHub.authenticator_class='ldapauthenticator.LDAPAuthenticator'1 < DL>
c.JupyterHub.authenticator_class='ldapauthenticator.LDAPAuthenticator'2
示例
FreeIPA集成
c.JupyterHub.authenticator_class='ldapauthenticator.LDAPAuthenticator'
3
活动目录集成
c.JupyterHub.authenticator_class='ldapauthenticator.LDAPAuthenticator'
4
OpenLDAP集成
c.JupyterHub.authenticator_class='ldapauthenticator.LDAPAuthenticator'4
OpenLDAP集成
由于openldap本身不支持其用户对象中的memberof属性,因此在下面的示例中,允许的组
作用域被短路:
c.JupyterHub.authenticator_class='ldapauthenticator.LDAPAuthenticator'5