[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind operation happens twice which can lead to 2 multi-factor authentication pushes to users. #126

Open
njgraham opened this issue Jun 21, 2019 · 0 comments

Comments

@njgraham
Copy link

We have multi-factor authentication configured with our LDAP provider. This ldapauthentcator plugin works perfectly out of the box for me except for the fact that it results in two separate MFA push notifications to the user for every login.

Specifically, I found that ldapauthenticator.py->authenticate(), call get_connection() which in turn calls ldap3.Connection() with auto_bind set. So, bind() is called which triggers an MFA push to the user.

Then, right after that in authenticate(), conn.bind() is called again which triggers another DUO push.

Just as a test, I modified the logic that sets auto_bind to:

auto_bind=ldap3.AUTO_BIND_NONE

And it worked with only a single MFA push.

I'd like to avoid the double-push, but I'm not really sure of the implications of changing the auto_bind logic for other users of this library. I may submit a PR at some point.

My environment:

Versions:

(hub) .../opt/tljh/hub/bin$ pip freeze | grep -i jupyter
jupyterhub==1.0.0
jupyterhub-dummyauthenticator==0.3.1
jupyterhub-firstuseauthenticator==0.12
jupyterhub-ldapauthenticator==1.2.2
jupyterhub-nativeauthenticator==0.0.4
jupyterhub-systemdspawner==0.13
jupyterhub-tmpauthenticator==0.6
jupyterhub-traefik-proxy==0.1.3
the-littlest-jupyterhub==0.1

the-littlest-jupyterhub configuration file with redactions:

https:
  enabled: true
  tls:
    key: /etc/ssl/private/some_private_key.key
    cert: /etc/ssl/certs/some_cert.crt

auth:
  type: ldapauthenticator.LDAPAuthenticator
  LDAPAuthenticator:
    server_address: ldaps://ldap.foxpass.com
    use_ssl: true
    bind_dn_template: ['uid={username},ou=people,dc=some_dc,dc=com']
    admin_users: ['some.user', 'some.other.user']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant