O'Reilly logo

CouchDB and PHP Web Development Beginner's Guide by Tim Juravich

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — checking to make sure the database is secure

Your _users database should be secure, so that only admins can read or alter the structure of the database. Let's quickly test this:

  1. Open Terminal.
  2. Try to read the user document again by running the following command. Again, replace your_username with the username of the service admin that you just created:
    curl localhost:5984/_users/org.couchdb.user:your_username
    
    
  3. Terminal will respond with the following:
    {"error":"unauthorized","reason":"You are not authorized to access this db."}
    
    

What just happened?

With the CouchDB instance out of Admin Party mode, the authentication module stepped in to make sure that anonymous users couldn't read the database.

Note

We'll add more security to the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required