-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix: Ignore LDAP search referrals #1602
fix: Ignore LDAP search referrals #1602
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1602 +/- ##
=======================================
Coverage 75.44% 75.45%
=======================================
Files 54 54
Lines 7869 7870 +1
=======================================
+ Hits 5937 5938 +1
Misses 1932 1932
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
9a13ec5
to
d3a166d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think we should add some unit tests for this, but possibly that is overkill.
BTW, for unit tests you will need to add refs to our LDAP test structure, similar to how dalibo does it, but do note that they use a different LDAP test library.
d3a166d
to
673ec96
Compare
|
673ec96
to
477efa6
Compare
LDAP referrals are completely broken anyway, and we've already set ldap.OPT_REFERRALS to 0, so there is no reason to care about these. Thus the presence of referrals alone should not cause authentication of a user to fail due to multiple results being returned, as they can be filtered out. This fixes issue dpgaspar#1581.
477efa6
to
016805b
Compare
@dpgaspar this looks good, can you test this, and then put out a patch release ASAP, as this was a breaking change for some users. The airflow community decided to push the default version of Flask-AppBuilder to /cc @potiuk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Just released 3.2.3rc1 |
Can we expect an officiall pypi release soon? I am preparing new constraint files for Airflow (to fix other problems) and I would love to include that one |
yes probably this week |
I see. I push the new constraints in ~ 20 minutes. so i will limit it to 3.1.1 for now (but won't add install_requires limits). Thanks for acting quickly ! |
There was a bug in FAB 3.2.0 - 3.2.2 related to multiple results returned by LDAP search when authenticating. This has been fixed in 3.2.3 (dpgaspar/Flask-AppBuilder#1602) Since FAB is an integral Part of the UI and 3.2.* line has useful features areound role mappig, we bump the "golden" version of the Airflow 2.0.2 to include that version.
Description
LDAP referrals are completely broken anyway, and we've already set
ldap.OPT_REFERRALS
to 0, so there is no reason to care about these.Thus the presence of referrals alone should not cause authentication of
a user to fail due to multiple results being returned.
Fixes issue #1581.
If this change is not desired, and rather a documentation update to
indicate that setting up LDAP against Microsoft AD requires a
organizational unit to be specified in the LDAP search base, and I
happy to make that update. I can add the necessary tests once I get
feedback if we want to move forward with this.
ADDITIONAL INFORMATION