要设置AWS EMR JupyterHub为LDAP认证,但不自动启动笔记本,您可以按照以下步骤进行操作:
c.JupyterHub.spawner_class = 'sudospawner.SudoSpawner'
c.Authenticator.admin_users = {'your_username'}
c.JupyterHub.authenticator_class = 'ldapauthenticator.LDAPAuthenticator'
c.LDAPAuthenticator.server_address = 'ldap://your_ldap_server'
c.LDAPAuthenticator.server_port = your_ldap_port
c.LDAPAuthenticator.bind_dn_template = ['uid={username},ou=users,dc=example,dc=com']
c.LDAPAuthenticator.user_search_base = 'ou=users,dc=example,dc=com'
# 如果需要设置组级别的LDAP认证,可以取消注释以下行
# c.LDAPAuthenticator.group_search_base = 'ou=groups,dc=example,dc=com'
# c.LDAPAuthenticator.group_search_filter = '(&(objectClass=groupOfUniqueNames)(uniqueMember={user_dn}))'
# c.LDAPAuthenticator.allowed_groups = ['group1', 'group2']
c.JupyterHub.services = [
{
'name': 'idle-culler',
'admin': True,
'command': ['python3', '-m', 'jupyterhub_idle_culler', '--timeout=3600']
}
]
请根据您的LDAP服务器设置进行相应的更改。
请注意,此设置只会设置LDAP认证,不会自动启动笔记本。