Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-61294

Audits might be added after Audit daemon has been disabled.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Morpheus
    • None
    • couchbase-bucket
    • None
    • Untriaged
    • 0
    • Unknown
    • March-June 24

    Description

      Found a tiny bug while reading the audit daemon code - where we might add audits after the audit daemon is disabled. The odds of this happening is very low though since the window is very small.

      Description:
      We currently process audits via consume_events - https://src.couchbase.org/source/xref/trunk/kv_engine/auditd/src/audit.cc?r=2581ea32#274.

      It is possible more audits are enqueued into the filleventqueue before we toggle the enabled bool while processing the config change event (which prevents new audit events from being added) here: https://src.couchbase.org/source/xref/trunk/kv_engine/auditd/src/audit.cc?r=2581ea32#178

      Reproduced via this patch: https://review.couchbase.org/c/kv_engine/+/207670

       /Users/hareen.kancharla/cb/master-ninja-1/build/kv_engine/memcached_testapp "--gtest_filter=TransportProtocols/AuditTest.TestAuditsAddedAfterBeingDisabled/Mcbp"
      Note: Google Test filter = TransportProtocols/AuditTest.TestAuditsAddedAfterBeingDisabled/Mcbp
      [==========] Running 1 test from 1 test suite.
      [----------] Global test environment set-up.
      [----------] 1 test from TransportProtocols/AuditTest
      [ RUN      ] TransportProtocols/AuditTest.TestAuditsAddedAfterBeingDisabled/Mcbp
      /Users/hareen.kancharla/cb/master-ninja-1/kv_engine/tests/testapp/testapp_audit.cc:829: Failure
      Value of: searchAuditLogForID(20492, "Luke", bucketName)
        Actual: true
      Expected: false
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hareen.kancharla Hareen Kancharla
            hareen.kancharla Hareen Kancharla
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There is 1 open Gerrit change

                PagerDuty