Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Add LDAP auth support #1211

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

Add LDAP auth support #1211

wants to merge 6 commits into from

Conversation

dani
Copy link

@dani dani commented Aug 4, 2021

I needed LDAP auth to use paperless (which I'm evaluating as a personal document management system), so, I've hacked it. It's pretty basic, only support users (not groups or fancy searches) but should fit most needs. Tested against a samba4 (AD style) directory only, but should work with most directories

@jonaswinkler
Copy link
Owner

Please rebase this on the dev branch.

@jonaswinkler
Copy link
Owner

  • Also, some dependencies are missing for the build, apparently some header files required to build the python wheel.
  • paperless ng uses Pipenv. Please install packages with "pipenv install --keep-outdated" and then generate the requirements.txt with "pipenv lock -r > requirements.txt".

@dani
Copy link
Author

dani commented Aug 24, 2021

OK, I'll try to update the PR as soon as I have some spare time :-)

@dani
Copy link
Author

dani commented Aug 25, 2021

Sorry, wrong push on my fork closed this PR, so reopening. I could rebase but the pipenv commands do not change anything in requirements.txt.

@dani dani reopened this Aug 25, 2021
@dani
Copy link
Author

dani commented Aug 26, 2021

I've added the missing dependencies to the Dockerfile and in ansible/tasks/main.yml (libldap2-dev and libsasl2-dev), now the ansible test is passing, but the build-release is still failing. Where should I specify those dependencies for the build to succeed ?

@dani
Copy link
Author

dani commented Aug 27, 2021

any hint ?

@tfmm
Copy link

tfmm commented Sep 3, 2021

@dani I looked at the build log, and it appears that the ldap development packages need to be added to the apt package install list. I would try adding these, and see if the build then completes.

libsasl2-dev
python-dev
libldap2-dev
libssl-dev

@dani
Copy link
Author

dani commented Sep 3, 2021

But where's this list defined ? Is it the one in the Dockerfile or elsewhere ?

@tfmm
Copy link

tfmm commented Sep 3, 2021

The portion of the build that's failing appears to be docker, so yes, it should be the list in the Dockerfile.

@dani
Copy link
Author

dani commented Sep 3, 2021

Looks like it's still failing on the lber.h (which should be installed with libldap2-dev)...

@andretheolauret
Copy link

Hello I use paperless-ng and want to integrate it in app catalog of the project YunoHost, but for better support they require to have LDAP support. Can this PR be more under development please

@dani
Copy link
Author

dani commented Sep 10, 2021

I'd like to go foward but I really have no idea why is the test build failing.

@andretheolauret
Copy link

I'd like to go foward but I really have no idea why is the test build failing.

I think it’s because you need this
sudo apt-get install libldap2-dev

@andretheolauret
Copy link

I'd like to go foward but I really have no idea why is the test build failing.

I think it’s because you need this
sudo apt-get install libldap2-dev

Are you sure the CI have this ?

@andretheolauret
Copy link

@dani
Copy link
Author

dani commented Sep 10, 2021

Well, I've added the dependencies in the Dockerfile. If they have to be specified somewhere else, I have no idea where

@andretheolauret
Copy link

I dont see Also error with, so i think you should mention project maintainer may he will can help you better

@TheFehr
Copy link

TheFehr commented Sep 10, 2021

@dani in the .github/workflows/ci.yaml directory you'll probably need to add the dependencies as well

Line 188 and following ones I'd guess

@dani
Copy link
Author

dani commented Sep 16, 2021

Looks like the build is now successful. Only the test coverage slightly decreased. Is this enough for the PR to be merged ?

@maxulm
Copy link

maxulm commented Oct 8, 2021

Would be great having this feature :)

@telvgehc
Copy link

Update?

@christianreiss
Copy link

Puh-leeez? :)

@hydrian
Copy link

hydrian commented May 3, 2022

Yea... Waiting on this before I can do a rollout of it to my family...

@Marook332
Copy link

I would love to test this feature :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants