How to prevent anonymous users from reading couchdb?


Kim Min

I want to use admin account to manage benchdb remotely via curl, but I found that anonymous users can also read some information like _all_dbs, which is not what I want. It seems that couchdb allows anonymous users to use GET and HEAD methods, so how to prevent it? All I want is to allow admins.

I have the following settings in local.ini:

require_valid_user = true
WWW-Authenticate = Basic realm="administrator"

Thanks and regards

Amdramar

Suppose you have supervisor mode disabled. Try setting two valid user fields like this:

[couch_httpd_auth]
require_valid_user = true

[chttpd]
require_valid_user = true

According to the documentation , one is for the cluster port and the other is for the node local port.

Edit: I forgot about membership.

You need to set each database security object . and put some members in membersand adminsfields . You can do this through the Fauxton GUI by clicking the "lock" icon next to each database. Or it can be done by PUT /db/_securityprocessing proper json . From the documentation (emphasis mine).

If any member names or roles are defined for the database, only authenticated users with matching names or roles are allowed to read documents from the database .

Related


How to prevent anonymous users from reading couchdb?

Kim Min I want to use admin account to manage benchdb remotely via curl, but I found that anonymous users can also read some information like _all_dbs, which is not what I want. It seems that couchdb allows anonymous users to use GET and HEAD methods, so how t

How to prevent anonymous users from reading couchdb?

Kim Min I want to use admin account to manage benchdb remotely via curl, but I found that anonymous users can also read some information like _all_dbs, which is not what I want. It seems that couchdb allows anonymous users to use GET and HEAD methods, so how t

Prevent anonymous users on Mediawiki from accessing history?

Elliott Smith I don't want unregistered (not logged in) users to be able to access the revision history on my Mediawiki installation. I've found some past SE questions about how to hide tabs via CSS, but I'd like to actually block access to the entire "history

Prevent users from reading entire collections in Firestore?

Nirvana I have a collection with about 30,000 documents. My security rules are configured so that only authenticated users can read such documents from this collection. I can't add more constraints on read operations for this particular collection. When using

Prevent anonymous single users from voting multiple times

here I have an Android application that allows users to post information to a database via a Java web server I have code for. Allow users to comment on polls. How can I prevent the same user from having multiple votes on the same post? I have some ideas: Disab

Prevent anonymous single users from voting multiple times

here I have an Android application that allows users to post information to a database via a Java web server I have code for. Allow users to comment on polls. How can I prevent the same user from having multiple votes on the same post? I have some ideas: Disab

How to prevent users from leaving?

Alexander Bartz In my SAPUI5 application, I use sap.tnt.Toolpage as the main layout container. SideNavigation shows a list of app links, and mainContents is dynamically loaded using sap.ui.core.routing.Router. To navigate to the details page I am using var rou

How to prevent users from logging in?

️ I have an Ubuntu PC, I am root and I have 3 more users with normal properties. How can I prevent one of the users from logging in temporarily? With these factors, Do not delete users The property does not change The login denial and message to him may seem c

How to prevent users from leaving?

Alexander Bartz In my SAPUI5 application, I use sap.tnt.Toolpage as the main layout container. SideNavigation shows a list of app links and mainContents is dynamically loaded using sap.ui.core.routing.Router. To navigate to the details page I am using var rout

How to prevent users from logging in?

️ I have an Ubuntu PC where I am root and 3 other users with normal properties. How can I prevent one of the users from logging in temporarily? With these factors, Do not delete users The property does not change The login denial and message to him may seem co

How to prevent users from leaving?

Alexander Bartz In my SAPUI5 application, I use sap.tnt.Toolpage as the main layout container. SideNavigation shows a list of app links and mainContents is dynamically loaded using sap.ui.core.routing.Router. To navigate to the details page I am using var rout

How to prevent users from logging in?

️ I have an Ubuntu PC, I am root and I have 3 more users with normal properties. How can I prevent one of the users from logging in temporarily? With these factors, Do not delete users The property does not change The login denial and message to him may seem c

How to prevent regular users from switching users

Omi Penguin I want to prevent normal users from using the following command / bin / bash / usr / bin / sudo / bin / su I added them to the sudoers file, but normal users can still use the following commands, this is how I add entries in the sudoers file Cmnd_A

How to prevent regular users from switching users

Omi Penguin I want to prevent normal users from using the following command / bin / bash / usr / bin / sudo / bin / su I added them to the sudoers file, but normal users can still use the following commands, this is how I add entries in the sudoers file Cmnd_A

How to prevent yeoman from sending anonymous statistics?

Rolando When the message appeared about whether to send anonymous information or not, I inadvertently pressed enter, which defaulted to "yes". Now every time I reinstall/completely remove and then install node/yo or execute the yo command, it no longer asks. C

How to prevent compression in CouchDB?

username How can I prevent compaction in CouchDB if I need to keep all revisions forever? Can I disable this feature? Will Hawley It's not a good idea to permanently save revisions by disabling compression unless you fully understand the implications. If you n

How to prevent compression in CouchDB?

username How can I prevent compaction in CouchDB if I need to keep all revisions forever? Can I disable this feature? Will Hawley It's not a good idea to permanently save revisions by disabling compression unless you fully understand the implications. If you n

How to prevent compression in CouchDB?

username What if I need to keep all revisions forever, how can I prevent compaction in CouchDB? Can I disable this feature? Will Hawley It's not a good idea to permanently save revisions by disabling compression unless you fully understand the implications. If

How to prevent compression in CouchDB?

username What if I need to keep all revisions forever, how can I prevent compaction in CouchDB? Can I disable this feature? Will Hawley It's not a good idea to permanently save revisions by disabling compression unless you fully understand the implications. If

How to prevent users from entering invalid answers

Zakee Akram: I'm trying to prevent the user from entering anything other than "yes" or "no", but when they do, it always says error, try again forever. public static void main(String[] args) { System.out.println ("Would you like to add a Reciep

How to prevent users from deploying to deployment groups

George Waworth Suppose I have two deployment groups named QC and Production, each deployment group contains X servers. I also have a release pipeline with two stages QCStage, ProductionStage. How can I set permissions at the deployment group level so that user

How to prevent users from entering invalid answers

Zakee Akram: I'm trying to prevent the user from entering anything other than "yes" or "no", but when they do, it always says error, try again forever. public static void main(String[] args) { System.out.println ("Would you like to add a Reciep

How to prevent users from modifying REST requests?

Family Mahjong This question sounds trivial, but even after reading many tutorials, I still don't know how REST security should be implemented. I have a web page and a mobile app that is about to be ready. Both of them will use a REST API (written in node.js),

How to prevent users from setting their PATH

Encoder 007 I have set restricted user commands with .profile and PATH variables, but users can set their paths with: $ export PATH=$PATH:/bin:/sbin:/usr/bin and can access other commands. Is there any way to restrict users from setting their paths? Encoder 0

How to prevent users from deleting records

Ashis Biswas Suppose I have three tables named category, subcategory and prodcut, and the structure of these tables is category ====Catid=======CatName===== | 1 | DRESS | | 2 | FOOD | subcate

How to prevent users from deleting records

Ashis Biswas Suppose I have three tables named category, subcategory and prodcut, and the structure of these tables is category ====Catid=======CatName===== | 1 | DRESS | | 2 | FOOD | subcate

Fgets - How to prevent users from exceeding Maxsize?

Panagiss I use fgets to get a name from the user and put it in a char array. I have a problem with my program if the user gives an exceeding maxsizevalue in . I think, if the user exceeds , it will return. But that is not the case. How can I control this error