Is it good practice to give each CouchDB user a separate database?

前端 未结 4 902
情话喂你
情话喂你 2021-02-15 00:39

I have a bit of conceptual question regarding the structure of users and their documents.

Is it a good practice to give each user within CouchDB their own databa

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-15 01:19

    The solution is as old as web applications - if you think of a mySQL database there is nothing in the database to stop user B viewing records belonging to user A - it is all coded in the application layer.

    In CouchDB there is likewise no completely secure way to prevent user B from accessing documents written by user A. You would need to code this in your application layer just as before.

    Provided you have a web application between CouchDB and the users you have no problem. The issue comes when you allow CouchDB to serve requests directly.

提交回复
热议问题