Description
Steps to reproduce:
- Create any rbac user - say user1
- Add this user to the disabled_user list under audit settings as follows:
- As expected, we do observe a new couchdb system event log notifying the change from: {disabled_users,[]} to {disabled_users,[user1, local]}
curl -X GET -u Administrator:asdasd http://localhost:9000/events | jq '.events | .[] | select(.component == "views") | select(.node == "node1.couchbase.com")'
|
- Remove this user from the disabled_users list and hit Save:
There should be a new system event log specifying disabled_user list going from {disabled_users,[user1, local]} back to {disabled_users,[]}
Observation:
No new system event log is generated.
—
After putting some extra logging in the ns_config -> ns_couchdb -> couchdb codepaths, I can confirm that ns_server for some reason isn't pushing new "notable_change" "audit" events:
Just to confirm this behaviour, place a log message at
deps/ns_couchdb/src/cb_config_couch_sync.erl :
handle_config_event({Key, _Value}) -> |
case is_notable_key(Key) of |
true ->
|
?log_info("pushing a notable change to gen_server. Key ~p", [Key]), |
?MODULE ! {notable_change, Key}; |
_ ->
|
ok
|
end; |
handle_config_event(_) ->
|
ok.
|
The log message in the above snippet triggers for other audit changes, but doesn't get triggered under the following conditions:
1. When disabled_user list is changed from a non-empty to an empty list.
2. Also doesn't triggers if any of the views audit events are disabled.
Attachments
Issue Links
- duplicates
-
MB-50452 UI doesn't correctly update Audit setting on removing disabled users
- Closed