Sorry for double post but now it seems that require_valid_user doesn't work
at all. Everything is public, _users and other databases.
Here is _config:
{
"native_query_servers":{
"query":"{mango_native_proc, start_link, []}"
},
"httpd_design_handlers":{
"_compact":"{couch_mrview_http, handle_compact_req}",
"_info":"{couch_mrview_http, handle_info_req}",
"_list":"{couch_mrview_show, handle_view_list_req}",
"_rewrite":"{couch_httpd_rewrite, handle_rewrite_req}",
"_show":"{couch_mrview_show, handle_doc_show_req}",
"_update":"{couch_mrview_show, handle_doc_update_req}",
"_view":"{couch_mrview_http, handle_view_req}",
"_view_changes":"{couch_mrview_http, handle_view_changes_req}"
},
"uuids":{
"algorithm":"sequential",
"max_count":"1000"
},
"cluster":{
"n":"3",
"q":"8"
},
"cors":{
"credentials":"true",
"headers":"accept, authorization, content-type, origin, referer",
"methods":"GET, PUT, POST, HEAD, DELETE",
"origins":"*"
},
"chttpd":{
"backlog":"512",
"bind_address":"0.0.0.0",
"docroot":"./share/www",
"port":"5984",
"socket_options":"[{recbuf, 262144}, {sndbuf, 262144}, {nodelay,
true}]"
},
"httpd_global_handlers":{
"/":"{couch_httpd_misc_handlers, handle_welcome_req,
<<\"Welcome\">>}",
"_active_tasks":"{couch_httpd_misc_handlers, handle_task_status_req}",
"_all_dbs":"{couch_httpd_misc_handlers, handle_all_dbs_req}",
"_config":"{couch_httpd_misc_handlers, handle_config_req}",
"_oauth":"{couch_httpd_oauth, handle_oauth_req}",
"_plugins":"{couch_plugins_httpd, handle_req}",
"_replicate":"{couch_replicator_httpd, handle_req}",
"_restart":"{couch_httpd_misc_handlers, handle_restart_req}",
"_session":"{couch_httpd_auth, handle_session_req}",
"_stats":"{couch_stats_httpd, handle_stats_req}",
"_system":"{chttpd_misc, handle_system_req}",
"_utils":"{couch_httpd_misc_handlers, handle_utils_dir_req,
\"./share/www\"}",
"_uuids":"{couch_httpd_misc_handlers, handle_uuids_req}",
"favicon.ico":"{couch_httpd_misc_handlers, handle_favicon_req,
\"./share/www\"}"
},
"attachments":{
"compressible_types":"text/*, application/javascript,
application/json, application/xml",
"compression_level":"8"
},
"admins":{
"admin":"-pbkdf2-e01abc40b1160ded66fa3965770be4a518ee9c96,cfcccbe54f8fc1d514f85b89c0d2bf4c,10"
},
"query_server_config":{
"os_process_limit":"25",
"reduce_limit":"true"
},
"vendor":{
"name":"The Apache Software Foundation"
},
"replicator":{
"connection_timeout":"30000",
"http_connections":"20",
"max_replication_retry_count":"10",
"retries_per_request":"10",
"socket_options":"[{keepalive, true}, {nodelay, false}]",
"ssl_certificate_max_depth":"3",
"start_delay":"0",
"start_splay":"0",
"verify_ssl_certificates":"false",
"worker_batch_size":"500",
"worker_processes":"4"
},
"couch_httpd_oauth":{
"use_users_db":"true"
},
"ssl":{
"port":"6984"
},
"log":{
"file":"./var/log/couchdb.log",
"level":"info",
"writer":"file"
},
"indexers":{
"couch_mrview":"true"
},
"view_compaction":{
"keyvalue_buffer_size":"2097152"
},
"query_servers":{
"coffeescript":"./bin/couchjs ./share/server/main-coffee.js",
"javascript":"./bin/couchjs ./share/server/main.js"
},
"daemons":{
"auth_cache":"{couch_auth_cache, start_link, []}",
"compaction_daemon":"{couch_compaction_daemon, start_link, []}",
"couch_peruser":"{couch_peruser, start_link, []}",
"external_manager":"{couch_external_manager, start_link, []}",
"httpd":"{couch_httpd, start_link, []}",
"index_server":"{couch_index_server, start_link, []}",
"os_daemons":"{couch_os_daemons, start_link, []}",
"query_servers":"{couch_proc_manager, start_link, []}",
"uuids":"{couch_uuids, start, []}",
"vhosts":"{couch_httpd_vhost, start_link, []}"
},
"couch_peruser":{
"delete_dbs":"false",
"enable":"false"
},
"httpd":{
"allow_jsonp":"false",
"authentication_handlers":"{couch_httpd_oauth,
oauth_authentication_handler}, {couch_httpd_auth,
cookie_authentication_handler}, {couch_httpd_auth,
default_authentication_handler}",
"bind_address":"127.0.0.1",
"default_handler":"{couch_httpd_db, handle_request}",
"enable_cors":"true",
"port":"5986",
"secure_rewrites":"true",
"socket_options":"[{recbuf, 262144}, {sndbuf, 262144}]",
"vhost_global_handlers":"_utils, _uuids, _session, _oauth, _users"
},
"httpd_db_handlers":{
"_all_docs":"{couch_mrview_http, handle_all_docs_req}",
"_changes":"{couch_httpd_db, handle_db_changes_req}",
"_compact":"{couch_httpd_db, handle_compact_req}",
"_design":"{couch_httpd_db, handle_design_req}",
"_design_docs":"{couch_mrview_http, handle_design_docs_req}",
"_local_docs":"{couch_mrview_http, handle_local_docs_req}",
"_temp_view":"{couch_mrview_http, handle_temp_view_req}",
"_view_cleanup":"{couch_mrview_http, handle_cleanup_req}"
},
"database_compaction":{
"checkpoint_after":"5242880",
"doc_buffer_size":"524288"
},
"csp":{
"enable":"true"
},
"couch_httpd_auth":{
"allow_persistent_cookies":"false",
"auth_cache_size":"50",
"authentication_db":"_users",
"authentication_redirect":"/_utils/session.html",
"iterations":"10",
"public_fields":"name",
"require_valid_user":"true",
"secret":"271f2f11b4953ccac32bf39ec59887ee",
"timeout":"600",
"users_db_public":"false"
},
"couchdb":{
"attachment_stream_buffer_size":"4096",
"database_dir":"./data",
"default_security":"admin_local",
"delayed_commits":"false",
"file_compression":"snappy",
"max_dbs_open":"500",
"max_document_size":"67108864",
"os_process_timeout":"5000",
"uuid":"cf652e676075bda9a0dd793e6e05278c",
"view_index_dir":"./data"
},
"compaction_daemon":{
"check_interval":"300",
"min_file_size":"131072"
}
}
2016-10-05 14:50 GMT+02:00 max <[email protected]>:
> Once I started to put public fields in configuration file, "doc" field was
> not null anymore.
>
>
> 2016-10-05 10:44 GMT+02:00 max <[email protected]>:
>
>> Correction:
>>
>> I have also noticed that when I try to get this view **without** auth,
>> couchdb answer is "only admin are..." but couchdb should ask me for
>> credentials since "require_valid_user" is true. Is this normal ?
>>
>> 2016-10-05 10:00 GMT+02:00 max <[email protected]>:
>>
>>> Hi,
>>>
>>> I'm using a View to fetch documents from _users database but when I
>>> query it with "include_docs=true", the doc field is "null".
>>>
>>> Some configuration properties:
>>> authentication_db : _users
>>> require_valid_user : true
>>> use_users_db : true
>>>
>>> I have also noticed that whane when I try to get this view with auth,
>>> couchdb answer is "only admin are..." but couchdb should ask me for
>>> credential since "require_valide_user" is true. Is this normal ?
>>>
>>> Thanks for couchdb 2.0 it's awesome.
>>>
>>> Max.
>>>
>>> PS: let me know if there is a way to use view with the public _users
>>> fonctionnality or at least to fetch a set of users from _users using or not
>>> the public part
>>>
>>
>>
>