miterion / ldap2carddav Goto Github PK
View Code? Open in Web Editor NEWA carddav server with an LDAP backend
License: GNU Affero General Public License v3.0
A carddav server with an LDAP backend
License: GNU Affero General Public License v3.0
As such ldap2carddav runs properly now:
Jul 07 19:22:40 myhost systemd[1]: Started Ldap2carddav Server.
Jul 07 19:22:40 myhost ldap2carddav[24714]: 2021/07/07 19:22:40 Starting carddav server on 127.0.0.1:8000
Jul 07 19:22:40 myhost ldap2carddav[24714]: [LDAPWorker] 2021/07/07 19:22:40 Starting scrape
Jul 07 19:22:40 myhost ldap2carddav[24714]: [LDAPWorker] 2021/07/07 19:22:40 LDAP Password empty, using unauthenticated bin
Jul 07 19:22:40 myhost ldap2carddav[24714]: [LDAPWorker] 2021/07/07 19:22:40 Found 6 users
However I have not found out how to get data out of it.
I have tried to connect with the cardbook addon in Thunderbird but that fails in the "validation" step of setting up carddav client. Then I tried with curl but it looks like every attempt fails with:
400 Bad Request: EOF
ldap:
url: "ldaps://server.example.com/"
basedn: "OU=Users,DC=example,DC=com"
filter: "(objectClass=user)"
scrapetime: "6000s"
carddav:
storagepath: "addressbook"
subdirectory: "/"
address: "127.0.0.1"
port: 8000
Is it possible to enable more verbose logging?
What curl call should show some output?
Sync output contains an extra empty card in Cardbook.
Ldap2carddav is updated to 0.2.9 and started from the console, it outputs:
2021/07/11 12:26:51 Starting carddav server on 127.0.0.1:8000
[LDAPWorker] 2021/07/11 12:26:51 Starting scrape
[LDAPWorker] 2021/07/11 12:26:51 LDAP Password empty, using unauthenticated bind.
[LDAPWorker] 2021/07/11 12:26:51 Found 4 users
This is similar to what I see on the server's filesystem:
ls -l
total 16
-rw-r--r-- 1 ldap2carddav ldap2carddav 174 Jul 11 12:18 kvv.vcf
-rw-r--r-- 1 ldap2carddav ldap2carddav 162 Jul 11 12:18 test1.vcf
-rw-r--r-- 1 ldap2carddav ldap2carddav 162 Jul 11 12:18 test2.vcf
-rw-r--r-- 1 ldap2carddav ldap2carddav 168 Jul 11 12:18 test3.vcf
The I removed and re-created the addressbook in Cardbook. The list of cards show the 4 items + 1 empty item, Log viewer confirms that:
2021.07.11 12:25:46:717 : myaddressbook : Searching contacts โฆ
2021.07.11 12:25:46:729 : myaddressbook : Address book created
2021.07.11 12:25:47:051 : myaddressbook : Found a new contact on server
2021.07.11 12:25:47:051 : myaddressbook : Found a new contact on server
2021.07.11 12:25:47:052 : myaddressbook : Found a new contact on server
2021.07.11 12:25:47:052 : myaddressbook : Found a new contact on server
2021.07.11 12:25:47:053 : myaddressbook : Found a new contact on server
2021.07.11 12:25:48:002 : myaddressbook : Contact downloaded from server
2021.07.11 12:25:48:007 : myaddressbook : Contact Kees van Vloten downloaded from server
2021.07.11 12:25:48:011 : myaddressbook : Contact test 1 user downloaded from server
2021.07.11 12:25:48:014 : myaddressbook : Contact test 2 user downloaded from server
2021.07.11 12:25:48:017 : myaddressbook : Contact test user 3 downloaded from server
2021.07.11 12:25:48:752 : myaddressbook : Synchronization finished, contacts result :
2021.07.11 12:25:48:752 : myaddressbook : Contacts up to date : 0
2021.07.11 12:25:48:752 : myaddressbook : Contacts new on server : 5
2021.07.11 12:25:48:752 : myaddressbook : Contacts updated on server : 0
2021.07.11 12:25:48:752 : myaddressbook : Contacts deleted from server : 0
2021.07.11 12:25:48:752 : myaddressbook : Contacts deleted locally : 0
2021.07.11 12:25:48:752 : myaddressbook : Contacts deleted locally and updated on server : 0
2021.07.11 12:25:48:752 : myaddressbook : Contacts new locally : 0
2021.07.11 12:25:48:752 : myaddressbook : Contacts updated locally : 0
2021.07.11 12:25:48:753 : myaddressbook : Contacts updated locally and on server : 0
2021.07.11 12:25:48:753 : myaddressbook : Contacts updated locally and deleted from server : 0
2021.07.11 12:25:48:753 : myaddressbook : Modifications retrieved successfully from server : 5
2021.07.11 12:25:48:753 : myaddressbook : Modifications retrieved unsuccessfully from server : 0
2021.07.11 12:25:48:753 : myaddressbook : Modifications pushed successfully to the server : 0
2021.07.11 12:25:48:753 : myaddressbook : Modifications pushed unsuccessfully to the server : 0
2021.07.11 12:25:48:753 : myaddressbook : Images downloaded : 0
2021.07.11 12:25:48:753 : myaddressbook : Images in error : 0
2021.07.11 12:25:48:754 : All synchronizations finished
As you can see it finds 5 and syncs 5 cards, not 4.
When I click on the 5th empty vcard in Cardbook, it shows all fields empty.
I would love to run ldap2carddav on Raspbian.
Would it be possible to create a deb-package for it?
Checked with "Outlook CalDav Synchronizer"
got error
'500' ('Internal Server Error'). Message:
Contact not found: 1.vcf
the debug log is attached
The vcf files are presented in storage
cardbook and DAVx5 are ok
z-push cannot authenticate
09/10/2021 13:25:21 [38188] [ INFO] [1] BackendLDAP->Logon(): User 'user' is authenticated on LDAP.
09/10/2021 13:25:21 [38188] [DEBUG] [1] BackendCalDAV->Logon(): User 'user' is authenticated on CalDAV 'http://'"'''">
09/10/2021 13:25:21 [38188] [ERROR] [1] BackendCardDAV->Logon(): User 'user' failed to authenticate on 'http://"''":8000/'
09/10/2021 13:25:21 [38188] [DEBUG] [1] Combined->Logon() failed on BackendCardDAV
09/10/2021 13:25:21 [38188] [ INFO] [1] AuthenticationRequiredException: Access denied. Username or password incorrect - code: 0 - file: /usr/share/z-push/lib/requ>
09/10/2021 13:25:21 [38188] [ INFO] [1] User-agent: 'Outlook/15.0 (15.0.5337.1000; MSI; x64)'
09/10/2021 13:25:21 [38188] [FATAL] [1] Exception: (AuthenticationRequiredException) - Access denied. Username or password incorrect
When bindpw in /etc/ldap2carddav is not specified or empty string ldap2carddav fails with:
Error binding to LDAP: LDAP Result Code 206 "Empty password not allowed by the client": ldap: empty password not allowed by the client
Is there another way to allow anonymous bind to ldap or is it currently not supported?
Is there any way to sync LDAP objects without UID attribute the vcf file cannot be created for this objects and there is only one vcf without name ".vcf" in storagepath
like a uid to other attribute mapper in config
And how to add more fields for other attributes in LDAP such as Home phone or IP phone
Currently the listener always listens to 0.0.0.0 with a port from the config-file.
I would like to put it behind an Apache reversed proxy, i.e.in my case it would listen to 127.0.0.1:8000.
Would it be possible the make the listener-IP a config parameter?
Vcards files on the filesystem are not removed when they are no longer in the output of the ldap-search.
Restart ldap2carddav to force a resync does not help.
BTW. does ldap2carddav do a periodic resync or does it require a restart to resync with ldap?
It seems like this creates a large public listing of all found LDAP users?
But for syncing with mobile devices via Dav5x or similar it would be nice if there was a way to limit contacts to LDAP group membership and have a personalized login based on the LDAP credentials.
Thanks for considering this!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.