The JSON audit logging is prefixed with a JSON Authentication: and had a debug header on it. This makes log ingestion much harder then it needs to be.
Created attachment 14741 [details] patch for 4.9 To backport these changes, I had to backport the JSON API change as well. This is a user-visible change, but given that bug 13715 was not noticed until now either, I suspect there were no users, so we should pay good heed to the feedback we now have and make the logs easier to digest.
Under test at https://gitlab.com/samba-team/samba/merge_requests/168
Pushed to autobuild-v4-9-test.
Created attachment 14757 [details] Updated patch for 4.9 Fixed signature of the mock audit_log_json. diff --git a/source4/dsdb/samdb/ldb_modules/tests/test_group_audit.c b/source4/dsdb/samdb/ldb_modules/tests/test_group_audit.c index de3785463ec..2d868699b14 100644 --- a/source4/dsdb/samdb/ldb_modules/tests/test_group_audit.c +++ b/source4/dsdb/samdb/ldb_modules/tests/test_group_audit.c @@ -752,19 +752,16 @@ static void test_get_primary_group_dn(void **state) /* * Mocking for audit_log_json to capture the called parameters */ -const char *audit_log_json_prefix = NULL; struct json_object *audit_log_json_message = NULL; int audit_log_json_debug_class = 0; int audit_log_json_debug_level = 0; void audit_log_json( - const char* prefix, struct json_object* message, int debug_class, int debug_level) { - audit_log_json_prefix = prefix; audit_log_json_message = message; audit_log_json_debug_class = debug_class; audit_log_json_debug_level = debug_level;
Removed from autobuild-v4-9-test, breaks make. Waiting for review.
Re-tried to apply after applying patch from bug #13715, but it fails: Wende an: json: Modify API to use return codes error: Anwendung des Patches fehlgeschlagen: auth/auth_log.c:204 error: auth/auth_log.c: Patch konnte nicht angewendet werden Anwendung des Patches fehlgeschlagen bei 0001 json: Modify API to use return codes
Created attachment 14770 [details] Updated patch for 4.9
Re-assigning to Karolin for 4.9.next
(In reply to Gary Lockyer from comment #8) Pushed to autobuild-v4-9-test.
Pushed to v4-9-test. Closing out bug report. Thanks!