Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django & CouchDB - Common authentication backend

Here's the setup: I'm using Django with MySQL for a web app. I want to add CouchDB for storing user data. I want to have CouchDB's API's exposed so that clients can connect directly to CouchDB (for using the awesome replication API with mobile clients, among other things) and I want users to be able to log into the Django web app via browser.

What is the best way to enforce a common authentication between CouchDB and Django? If a mobile client accesses CouchDB directly, I want the login credentials to be consistent with what Django uses. Is LDAP the best way to implement this? Any other suggestions?

like image 611
pokstad Avatar asked Apr 28 '26 19:04

pokstad


1 Answers

Unfortunately, there is currently no ready-made solution for you.

You possible routes are:

  • Make Django use CouchDB's authentication system.
  • Make CouchDB use Django's authentication system.
  • Make a third party back end that is the auth system and hook it into both Django and CouchDB.

They all require work. #3 could be LDAP, but currently there is no LDAP adapter for CouchDB, although it wouldn't be very hard to write. #1 would be useful to others as well I'd think.

like image 85
Jan Lehnardt Avatar answered May 01 '26 12:05

Jan Lehnardt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!