Code Monkey home page Code Monkey logo

Comments (8)

dhirschfeld avatar dhirschfeld commented on June 13, 2024 1

Thanks for the report @xmatthias. The problem isn't to do with Windows AD controllers (I'm running on Windows) but instead is the use of DN for the lookup_dn_user_dn_attribute.

The code as is assumes c.LDAPAuthenticator.lookup_dn_user_dn_attribute = 'CN' so that's definitely something to fix.

In the interim, can you confirm if using the below config fixes the problem?

c.LDAPAuthenticator.lookup_dn_user_dn_attribute = 'CN'
c.LDAPAuthenticator.bind_dn_template = "CN={username},OU=Users,DC=example,DC=com"
c.LDAPAuthenticator.user_search_base = "OU=Users,DC=example,DC=com"

from ldapauthenticator.

dhirschfeld avatar dhirschfeld commented on June 13, 2024

Also, you should delete the below:

c.LDAPAuthenticator.base_dn = 'dc=example,dc=com'

base_dn doesn't appear to be a valid config?

from ldapauthenticator.

xmatthias avatar xmatthias commented on June 13, 2024

Thanks for the quick response.

Your approach does work - but is unsuitable in my environment as we have multi-forest environment (our users come from 3 separate forests). This would not be a problem per se, however, the forests themselvs are nested into OU's (one nested OU per region / site - without real standard) - so i would need to use an array of several 100 bind-templates to actually have it work, which is error-prone and very cumbersome to maintain.

My template would need to look something like "CN={username},OU=Users,*,DC=example,DC=com" - but wildcards in this position are not supported by ldap as far as i know.

I came a bit further inspired by your suggestions - using UPN i could get login to work "somehow"- however this breaks "allowed_groups" - as "[email protected]" is not member nor uniqueMember, but the CN would be.

c.LDAPAuthenticator.lookup_dn_user_dn_attribute = 'UserPrincipalName'

from ldapauthenticator.

dhirschfeld avatar dhirschfeld commented on June 13, 2024

Yes, the bug should be fixed. I thought that might give you a workaround in the interim but it sounds like that won't work.

from ldapauthenticator.

xmatthias avatar xmatthias commented on June 13, 2024

it's not a blocking issue for me at the moment - i can pip install the "old" commit directly in the meantime - so i found a temporary workaround (even though one I'd like to get rid of ASAP)

from ldapauthenticator.

dhirschfeld avatar dhirschfeld commented on June 13, 2024

Version 1.2.2 has been published to pypi - please let me know if this fixes the problem for you!

from ldapauthenticator.

xmatthias avatar xmatthias commented on June 13, 2024

Wow, that was quick

thanks a lot - works for me 👍

from ldapauthenticator.

mannevijayakrishna avatar mannevijayakrishna commented on June 13, 2024

can some one please help with the same kind of issue #115

from ldapauthenticator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.