Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Apache CouchDB http://couchdb.apache.org supports authentication and authorization functionalities. This functionality comes in handy when setting up a production server or when you need to restrict (anonymous) users.

Cloudant also supports authentication https://github.com/cloudant/sync-android#authentication making it easier to connect and authorize opensrp-client application.

Below are the steps required to configure this security functionality: -

  1. Create a new Admin user

    For example, creating a system admin with "anna" as the username and "secret" as the password.

    > HOST="http://127.0.0.1:5984"
    
    > curl -X PUT $HOST/_config/admins/anna -d '"secret"'
    ""

    System admin is allowed to do anything to a CouchDB installation.

  2. Confirm that the new system admin has been created successfully

    Without credentials

    > curl -X PUT $HOST/somedatabase
    {"error":"unauthorized","reason":"You are not a server admin."}

    With credentials

    > HOST="http://anna:secret@127.0.0.1:5984"
    > curl -X PUT $HOST/somedatabase
    {"ok":true}
  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.