How to Secure CouchDB

Viewed 18273

CouchDB access as a rest service seems insecure. Anyone can hit the database and delete/add documents once it is exposed.

What strategies are there to secure the CouchDB?

5 Answers

The only thing which really works currently security wise is something like this in your CouchDB configuration.

[couch_httpd_auth]
require_valid_user=true
[admins]
admin = sekrit

This puts basic HTTP auth on all of CouchDB. Even this is not well supportet in client libraries. For python e.g. you need a patched library.

The second approach is to put a proxy in front of CouchDB and let the proxy do the authentication and authorization work. Due to CouchDB's RESTful design this is quite easy.

All other approaches must be considered up to now highly experimental.

Related