We used CouchDB in production mainly to build applications in controlled environments. In most cases, we use a mid-level library for direct calls to couchdb/cloudant , so we avoid direct calls (straightforward JavaScript calls directly to couchdb/cloudant ).
For security reasons, itβs obvious that for an authenticated CouchDB database:
http://{username}:{password}@IPAddress:Port/DB
OR for cloudant:
https://{username}:{password}@username.cloudant.com/DB . If the call is made directly from JavaScript, the developer tools in browsers today allow a person to implement this call and, therefore, have full access to your database.
Attachments are usually painful when handled in a facility. It is beneficial to make the cloud handle cache and supply attachments directly to the front, which means free our middle dishes from this. However, on the Internet and with a huge audience, direct calls to our cloud environment are complex.
We started, first of all, a cloud account for all attachments, so the inquisitive boy will not interfere with the actual metadata or information of our users. Thus, the only cloud account that they can access is access to attachments, as we make direct JavaScript calls to our database.
Question: How do we find the way we hide the username and password of our cloud environment, thereby allowing us to safely make direct JavaScript calls to cloudant? Our infrastructure is completely in the cloud, so we do not have proxies and applications for work. We heard about the reduction of Url services, CDNs etc, but we did not come up with a really convincing solution.
source share