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

Merging #237 (187c513) into master (cf73d5a) will increase coverage by 0.02%.
The diff coverage is 89.18%.

@@            Coverage Diff             @@
##           master     #237      +/-   ##
==========================================
+ Coverage   86.39%   86.42%   +0.02%     
==========================================
  Files          46       47       +1     
  Lines        3779     3845      +66     
==========================================
+ Hits         3265     3323      +58     
- Misses        514      522       +8     
Impacted Files Coverage Δ
supysonic/managers/ldap.py 86.66% <86.66%> (ø)
supysonic/managers/user.py 97.40% <92.00%> (-2.60%) ⬇️
supysonic/config.py 95.83% <100.00%> (+0.08%) ⬆️
supysonic/db.py 92.63% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? 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 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
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

@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.

None yet

2 participants