News for hackers. Stuff that matters.
Re:Show HN: PouchDB - The JavaScript database that syncs by napoleond on Monday July 15, 2013 @10:37AM (#6045784)
I've been keeping an eye on PouchDB for a while; it looks like a lot of fun. How does authentication with the Couch server work, though? I don't see anything on the FAQ or after a brief perusal. CouchDB's apparently lax attitude toward security years ago was what kept me away, but I've always hoped/assumed that it improved since then. Has it?
Re:Show HN: PouchDB - The JavaScript database that syncs by daleharvey on Monday July 15, 2013 @10:49AM (#6045877)
CouchDB had some quirks related to user accounts as it has the added burden of trying to be an application server as well as a database server.

With PouchDB a lot of the application server logic doesnt apply and you can use CouchDB as a private data server that requires any connection to be authenticated, in the example we use basic auth but other methods are available and none of the security quirks with 'couchapps' apply.

And yes it is a lot of fun :)

Re:Show HN: PouchDB - The JavaScript database that syncs by maratd on Monday July 15, 2013 @01:08PM (#6046901)
> With PouchDB a lot of the application server logic doesnt apply

How do I keep one user from accessing another user's data?

Re:Show HN: PouchDB - The JavaScript database that syncs by janl on Monday July 15, 2013 @02:08PM (#6047411)
By giving each user their own database :)
Re:Show HN: PouchDB - The JavaScript database that syncs by etrepum on Tuesday July 16, 2013 @08:04PM (#6055482)
Sadly it's not possible to have CouchDB make that happen for you! You can very easily allow unauthenticated requests to create users, but there's no way to create those per-user databases without writing some trusted code that runs separately from CouchDB.
Re:Show HN: PouchDB - The JavaScript database that syncs by maratd on Monday July 15, 2013 @04:19PM (#6048317)
What will stop one user from accessing another user's database?
Re:Show HN: PouchDB - The JavaScript database that syncs by daleharvey on Monday July 15, 2013 @06:02PM (#6048836)
You can configure databases to require the correct user to authenticate before touching it..