CouchDB and PHP Web Development Beginner’s Guide
上QQ阅读APP看书,第一时间看更新

Time for action — taking CouchDB out of Admin Party

Having CouchDB unsecure isn't bad when you are programming locally, but it can be catastrophic if you accidentally have an unsecure database on a publicly accessible server. Let's briefly add security now to make sure you know how to do it in the future.

  1. Open Futon to the Overview, and look at the bottom right corner. You'll see text that says:
    Welcome to Admin Party! Everyone is admin. Fix this. 
    
  2. Click on the Fix this link.
  3. A new window will pop up, prompting you Create Server Admin.
    Time for action — taking CouchDB out of Admin Party
  4. Enter in a username and password that you want to use for your administrator account, and click on Create.

What just happened?

You just used Futon to add a server admin to your CouchDB installation. The Create Server Admin pop up said that once a server admin was added, you would be able to create and destroy databases, and perform other administrative functions. All other users (including anonymous users) can still read and write to the databases. With that in mind, we'll want to add some security onto the database as well.