Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7693361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:04:16+00:00 2026-05-31T21:04:16+00:00

I’m working on an html5 application built on CouchDB. I want to make sure

  • 0

I’m working on an html5 application built on CouchDB. I want to make sure I set up the user data in the best way possible.

I’d like to use an email address in the “name” field of the user documents in the _user database. Like so:

{
   "_id": "org.couchdb.user:John",
   "_rev": "1-e25df7d685c35dbeb8dabb2453adebe8",
   "name": "john@test.com",
   "salt": "32ef0f8b1651e0638080afc76d0111d6",
   "password_sha": "3023d37579fee19acd01d88c3ae1921a000418d7",
   "type": "user",
   "roles": [
   ]
}

The reason I would like to do this, is because an email address is a very unambiguous thing to ask for at sign up, and it is guaranteed to be unique amongst users. It requires the least amount of thought on the part of the user, and it’s super simple. There’s a problem though. If the _user database is public, then so are the email addresses in the user documents as far as I can tell. How can I overcome that?

Should I make the _user database private (readable and writeable only by admins?)
Should I store user data in individual user databases, and if I do that, how can my applications then pull that data efficiently. If I have several user’s data displayed on one page, with other data from other databases doesn’t that start to become really inefficient?

A little lost here, would love to know how some people have dealt with private user data.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T21:04:17+00:00Added an answer on May 31, 2026 at 9:04 pm

    I haven’t used couchdb, but I just did some reading in response to your question…

    I read the Security and Validation section of the Technical Overview.

    Also the wiki: Security_Features_Overvie — Authentication_database

    _id and name must match As the wiki says:

    The “_id” attribute value must be prefixed with the string “org.couchdb.user:” and the rest must match the value of the attribute “name”.

    Thus

    {
       # won't work: "_id": "org.couchdb.user:John",
       "_id": "org.couchdb.user:john@test.com" # try this
       "_rev": "1-e25df7d685c35dbeb8dabb2453adebe8",
       "name": "john@test.com",
       "salt": "32ef0f8b1651e0638080afc76d0111d6",
       "password_sha": "3023d37579fee19acd01d88c3ae1921a000418d7",
       "type": "user",
       "roles": [
       ]
    }
    

    However

    1. The user name can’t start with an underscore
    2. Not clear from the docs if the user name can include @ . + and other symbols used by email names. You’ll need to try it.

    Authentication and Access Control of _user doc

    Re should _user db be private? Yes, it must be private. Also, in the current version of CouchDB, the user db has special security and access controls. This was done to take care of the same issues that you are struggling with.

    From the same authentication database section of the wiki:

    … the _users database is now treated different from other databases:

    An anonymous user can only create a new document.

    An authenticated user can only update their own document.

    This means that your software can enable people to create new accounts safely. Once they are authenticated, they can only view/modify their own _user information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
I want to construct a data frame in an Rcpp function, but when I
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I have a text area in my form which accepts all possible characters from
i want to parse a xhtml file and display in UITableView. what is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.