security - Is there a way to get a list of users currently logged in to CouchDB? -
i've had suspicion might snooping around on couchdb else's credentials i'm not sure how check @ server level.
i've tried query through _session
api it's not designed that.
i'm open looking random files on server, alternative me.
i'm not ready couchdb source code, if that's comes to.
yes there is. start couchdb in interactive mode sudo couchdb -i
now in shell type
ets:match(auth_by_user_ets,{'$1','_'})
, should result
[[<<"user1012">>],[<<"abba">>]]
that names of authenticated users.
if want finish result set can utilize
ets:match(auth_by_user_ets,'$1')
result
[[{<<"user1012">>, {[{<<"_id">>,<<"org.couchdb.user:user1012">>}, {<<"_rev">>,<<"1-495d19f995d985c52c8fbe4444a3e32d">>}, {<<"password_scheme">>,<<"pbkdf2">>}, {<<"iterations">>,10}, {<<"name">>,<<"user1012">>}, {<<"roles">>,[]}, {<<"type">>,<<"user">>}, {<<"derived_key">>, <<"84266c5c57e0efe15a50cc5a9a48a7af958ba2d1">>}, {<<"salt">>,<<"c7acfd644bbcd37a79efd03712f48b7e">>}], {1414,563784,127875}}}], [{<<"abba">>, {[{<<"_id">>,<<"org.couchdb.user:abba">>}, {<<"_rev">>,<<"1-6b00c9f9a5cd675310dbf50c46797c5a">>}, {<<"password_scheme">>,<<"pbkdf2">>}, {<<"iterations">>,10}, {<<"name">>,<<"abba">>}, {<<"roles">>,[]}, {<<"type">>,<<"user">>}, {<<"derived_key">>, <<"f11d5d89880438182c4ba4644cf47aafb0231ada">>}, {<<"salt">>,<<"344780e9b0222613ea826c48804913df">>}], {1414,564902,847623}}}]]
auth_by_user_ets
in memory cache holds list of authenticated users. number of users held in memory depend upon auth_cache_size
parameter in config
file. can set parameter big number accommodate users in auth_by_user_ets
table.
security couchdb
No comments:
Post a Comment