> - What prevents malicious user with tampering with PouchDB database which
> then gets replicated to the server?
You should assume the user manipulates the PouchDB content.
On the server side you should use a per-user database, and validate
updates both ingress to that database (for consistency) and (more
importantly) ingress to any database(s) that might replicate or import
from the per-user database.
In the security model I use, the user can manipulate their server-side
per-user database's content (except for design documents), therefor that
content is actually the one I validate when it is pushed to a separate
database.
In other words the security boundary is set at the server-side
user-database, and the PouchDB replica is included in the "insecure"
area along with the per-user database.
> Can this be a breeding ground for DoS
> attacks when bad data gets replicated to the server?
Can you describe a scenario where the data could be used for Denial of
Service (which in my book is a completely type of threat and needs to be
mitigated using regular tools for HTTP/HTTPS protection)?
> Indeed, when XSS happens its over with or without PouchDB. However PouchDB
> replication seems to make getting hold of personal user data incredibly
> simple (one call to replicate if I understand it correctly).
Personal information should be stored encrypted using client-side
(in-browser) encryption to address this and similar concerns regarding
other users having access to the same browser, etc.
S.
--
tel:
+33643482771
http://stephane.shimaore.net/