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

ldap implementation #237

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

ldap implementation #237

wants to merge 17 commits into from

Conversation

vincentDcmps
Copy link
Contributor

Hi like request in #181 I will try to work on LDAP integration I create this pull request for following

@codecov
Copy link

codecov bot commented Oct 6, 2022

Codecov Report

Attention: Patch coverage is 89.04110% with 8 lines in your changes missing coverage. Please review.

Project coverage is 85.93%. Comparing base (24a796e) to head (f16d29e).

Files with missing lines Patch % Lines
supysonic/managers/ldap.py 86.66% 6 Missing ⚠️
supysonic/managers/user.py 92.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #237      +/-   ##
==========================================
+ Coverage   85.90%   85.93%   +0.03%     
==========================================
  Files          47       48       +1     
  Lines        3902     3968      +66     
==========================================
+ Hits         3352     3410      +58     
- Misses        550      558       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vincentDcmps vincentDcmps changed the title init ldap implementation ldap implementation Mar 14, 2023
@vincentDcmps
Copy link
Contributor Author

I take inspiration from #250 to implement LDAP
still need:

  • test
  • documentation

@vincentDcmps vincentDcmps force-pushed the ldap branch 2 times, most recently from 7f36d89 to ff5bbc9 Compare March 16, 2023 21:01
@vincentDcmps vincentDcmps marked this pull request as ready for review March 16, 2023 21:23
@vincentDcmps
Copy link
Contributor Author

Hi I have some issue for write test do you have any idea on how to do a ldap mock?

@spl0k
Copy link
Owner

spl0k commented Mar 19, 2023

I wish there was some kind of embeddable directory for LDAP, kinda like SQLite...

Maybe you can use the unittest.mock library to patch the ldap3 library and use the side effects to return the data you need?

@vincentDcmps vincentDcmps force-pushed the ldap branch 2 times, most recently from 9cfdd80 to 9405f0f Compare March 19, 2023 21:15
@vincentDcmps
Copy link
Contributor Author

vincentDcmps commented Mar 20, 2023

hello, I have added some test thanks for your advice!!
@spl0k Could you review code and tell me if somebody is not correct.

PS: fail test seem not link with my modification

@vincentDcmps vincentDcmps force-pushed the ldap branch 2 times, most recently from ca23003 to 187c513 Compare March 21, 2023 19:52
@spl0k
Copy link
Owner

spl0k commented Apr 2, 2023

Hello.

Sorry I hadn't taken the time to respond yet. This is something I'd like to try with a real LDAP backend but I lack knowledge in the matter. I'll get back to you as soon as I manage to set up a LDAP server.

@vincentDcmps
Copy link
Contributor Author

Hi if you want try with fast LDAP instalation you could take a look on LLDAP side

@spl0k
Copy link
Owner

spl0k commented Nov 25, 2023

Hello. I actually managed to setup a basic OpenLDAP server some time ago.

I remember noticing uncaught errors if the server wasn't setup properly but I don't recall if it was with your PR or #250.
Then I wasn't satisfied with how the current auth and LDAP are somehow tangled together so I started working some kind of pluggable auth system... and kinda gave up along the way.

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

Successfully merging this pull request may close these issues.

2 participants