History log of /6.0.3/kv_engine/auditd/tests/testauditd.cc (Results 1 – 20 of 20)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v7.1.1, v7.0.4, v7.1.0, v6.6.5-MP1, v6.6.5, v6.6.4, v7.0.2, v7.0.1, v6.6.3, v7.0.0, v6.6.2, v6.5.2, v6.0.5, v6.6.1, v6.5.1-MP5, v6.6.0, v6.5.1-MP3, v6.5.1, v6.0.4, v6.5.0, v6.0.3, v5.5.6, v6.0.2, v5.5.5, v5.5.4, v6.0.1, v5.5.3, v5.1.3, v6.0.0, v5.5.2, v5.5.1, v5.1.2, v5.5.0, v5.1.1
# 319eccf9 07-Feb-2018 Daniel Owen <owend@couchbase.com>

MB-27839: Audit filtering using the full userid

Currently audit filtering is performed using only the user component
of a userid. However ns_server allows ldap users to have the same id as
internal

MB-27839: Audit filtering using the full userid

Currently audit filtering is performed using only the user component
of a userid. However ns_server allows ldap users to have the same id as
internal users. So {"source" : "external", "user" : "vova"} is not the
same as {"source":"local","user":"vova"}.

Therefore we need to change the filtering to compare the full userid
and not just the "user" component.

The configure parameter "disabled_users" is also updated to
"updated_userids" to reflect that it now contains full userids.

Change-Id: Ibd7d42684573e7e8d811ecd95b007a0b7a570c47
Reviewed-on: http://review.couchbase.org/88867
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


# 7d79b83c 02-Feb-2018 Trond Norbye <trond.norbye@gmail.com>

Use spdlogger for everything

Remove the old stderr and stdout loggers and use the spdlogger
everywhere (and remove the ability to install custom loggers).

Change-Id: Ibd5a5d6775970e33664341f2476dd2

Use spdlogger for everything

Remove the old stderr and stdout loggers and use the spdlogger
everywhere (and remove the ability to install custom loggers).

Change-Id: Ibd5a5d6775970e33664341f2476dd2dee709abff
Reviewed-on: http://review.couchbase.org/88781
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


Revision tags: v5.1.0
# 44c7b290 16-Jan-2018 Daniel Owen <owend@couchbase.com>

MB-27063: Read audit version from the configuration file

Now that we are introducing version 2 of the audit configuration file,
we should read the version number from the configuration file and
set

MB-27063: Read audit version from the configuration file

Now that we are introducing version 2 of the audit configuration file,
we should read the version number from the configuration file and
set the appropriate value in the config. Then we need to read
the config value as opposed to just returning a hard-coded value.

Change-Id: Ibddf0096d3f0b744d1d63981cd64e921e343884e
Reviewed-on: http://review.couchbase.org/87906
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


# 81727a2a 12-Jan-2018 Daniel Owen <owend@couchbase.com>

MB-27063: Add uuid attribute

To support the client optimsation of filtering events at source (and
hence not sending them to the audit daemon) we need to record in the
audit log what version of the c

MB-27063: Add uuid attribute

To support the client optimsation of filtering events at source (and
hence not sending them to the audit daemon) we need to record in the
audit log what version of the configuration file is being used, so we
can determine what filters are being used. Therefore a configuration
uuid attribute is being added, that is recorded in the audit log every
time the configuration changes.

The attribute is of type string and its value is set by ns_server.

Change-Id: Iec85641bb30f305a633b59988d8a10f06e29005e
Reviewed-on: http://review.couchbase.org/87807
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


# 181c13b4 23-Jan-2018 Daniel Owen <owend@couchbase.com>

MB-27063 Fix AuditFilteringTest test

Fix test that incorrectly waits for the string "uuid" to appear in the
audit log. It should be waiting for an event generated by the user
"another".

Also incre

MB-27063 Fix AuditFilteringTest test

Fix test that incorrectly waits for the string "uuid" to appear in the
audit log. It should be waiting for an event generated by the user
"another".

Also increase the maximum wait time for the string to appear in the
audit log from 5 seconds to 10 seconds. This ensures the test passes on
slow disk systems where it takes a long time for data to appear in the
audit log.

Change-Id: Ifb80f1a29ac51d620052690c42405b20490b6eb4
Reviewed-on: http://review.couchbase.org/88235
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>

show more ...


# 23ded47f 15-Dec-2017 Daniel Owen <owend@couchbase.com>

MB-27063: Add config flag to enable / disable filtering

Add a global configuration option "filtering_enabled" which if set to
true allows audit events to be filtered by user (from real_userid or
eff

MB-27063: Add config flag to enable / disable filtering

Add a global configuration option "filtering_enabled" which if set to
true allows audit events to be filtered by user (from real_userid or
effective_userid).

The option is is required to be defined in version 2 of the audit
configuration (similar to the diabled_users list).

Also adds an associated test.

Change-Id: Ibee723a41100e999c3fafdcea416722e395f20e5
Reviewed-on: http://review.couchbase.org/86972
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


# 298bc406 08-Jan-2018 Daniel Owen <owend@couchbase.com>

MB-22010: Fix disabled_users filtering bugs

Fix bug with the new configuation option: disabled_users. The bug is
that when converting the configuration to JSON the
disabled_users list was being popu

MB-22010: Fix disabled_users filtering bugs

Fix bug with the new configuation option: disabled_users. The bug is
that when converting the configuration to JSON the
disabled_users list was being populated from the disabled list.

In addition there was a memory leak when an audit event is filtered
by a user.

This patch fixes the bugs, and introduces a test to defend against
regression.

Change-Id: Ia2671ec05450716074a87565e9b4129154656e62
Reviewed-on: http://review.couchbase.org/87531
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


Revision tags: v5.0.1
# 929e6fbd 09-Nov-2017 Dave Rigby <daver@couchbase.com>

GSL: Use not_null<> in server API

Tag non-null pointer args in server_api.h as gsl::not_null<>

GSL provides not_null<T> - this is a wrapper template which can be
applied to pointer types to indicat

GSL: Use not_null<> in server API

Tag non-null pointer args in server_api.h as gsl::not_null<>

GSL provides not_null<T> - this is a wrapper template which can be
applied to pointer types to indicate that pointer should never be
null. Instances of this type have two features:

1. They cannot directly be assigned nullptr - this is enforced at
compile-time.

2. They throw an exception at runtime if they are ever assigned a
value which happens to be null.

Note with (2), the exception is thrown at the point the variable is
assigned, not when it is later read; as is commonly the case in manual
null checks (for example in the head of a function).

In this patch, annotate all the function arguments in the Server API
which cannot be null with not_null<>. This highlights some
existing errors in unit tests, so fix these.

Change-Id: If7f9624d76b7c395abdb3121d7d7571008e8ccb6
Reviewed-on: http://review.couchbase.org/85378
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


Revision tags: v5.0.0
# e9839026 22-May-2017 Sriram Ganesan <sriram@couchbase.com>

MB-24293: Modify tests to use the new cb::io::rmrf API

cb::io::rmrf has been modified to throw exceptions. Modify the
callers of the API accordingly

Change-Id: I16e81f3572e0b7d58af3d5ee1f7849aec8ca

MB-24293: Modify tests to use the new cb::io::rmrf API

cb::io::rmrf has been modified to throw exceptions. Modify the
callers of the API accordingly

Change-Id: I16e81f3572e0b7d58af3d5ee1f7849aec8cabf97
Reviewed-on: http://review.couchbase.org/78424
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


Revision tags: v4.6.2_ep, v4.6.2_mc, v4.6.1_ep, v4.6.0_ep, v4.6.0_mc, v4.6.1_mc, v4.5.1-MP1_mc, v4.6.0-DP_ep, v4.6.0-DP_mc
# bc9ab0d4 24-Oct-2016 Trond Norbye <trond.norbye@gmail.com>

Refactor: rename CouchbaseDirectoryUtilities to cb::io

Change-Id: I1c77aeeaa67b0262fffce4fcd57fd40d827cdef6
Reviewed-on: http://review.couchbase.org/69142
Tested-by: buildbot <build@couchbase.com>
R

Refactor: rename CouchbaseDirectoryUtilities to cb::io

Change-Id: I1c77aeeaa67b0262fffce4fcd57fd40d827cdef6
Reviewed-on: http://review.couchbase.org/69142
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# a8539713 24-Oct-2016 Trond Norbye <trond.norbye@gmail.com>

Refactor: Handle exceptions thrown by cb::io::mkdirp during failures

Change-Id: If56d97181eca96143313e5877472d3c4f7d8b63c
Reviewed-on: http://review.couchbase.org/69134
Reviewed-by: Dave Rigby <dave

Refactor: Handle exceptions thrown by cb::io::mkdirp during failures

Change-Id: If56d97181eca96143313e5877472d3c4f7d8b63c
Reviewed-on: http://review.couchbase.org/69134
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...


# 891ff842 18-Oct-2016 Trond Norbye <trond.norbye@gmail.com>

MB-20427: Intermittent failure in AuditDaemonTest.TimeRotationTest

Remove that (and the SizeRotationTest) as the functionality
is already tested in the AuditFile unit tests. As part of
that cleanup

MB-20427: Intermittent failure in AuditDaemonTest.TimeRotationTest

Remove that (and the SizeRotationTest) as the functionality
is already tested in the AuditFile unit tests. As part of
that cleanup nuke all code that isn't being called anymore.

Change-Id: I0fec21f0091077562973cafcda67f0082dc3c432
Reviewed-on: http://review.couchbase.org/68851
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Daniel Owen <owend@couchbase.com>

show more ...


Revision tags: v4.5.1-MP1_ep, v4.5.1_ep, v4.1.2-MP2_mc, v4.5.1_mc, v4.1.2-MP1_ep, v4.1.2-MP2_ep, v4.1.2_ep, v3.1.6_ep, v4.1.2-MP1_mc, v4.1.2_mc, v3.1.6_mc, v4.5.0_mc, v4.5.0_ep, v4.1.1_ep, v3.1.5_ep
# 489cde32 12-Apr-2016 Trond Norbye <trond.norbye@gmail.com>

Refactor: Add comments and pass on the audit handle

As part of reading code trying to figure out a bug on windows
I expanded the comments on the public API. In addition to
that some refactoring was

Refactor: Add comments and pass on the audit handle

As part of reading code trying to figure out a bug on windows
I expanded the comments on the public API. In addition to
that some refactoring was done:

* Remove the use of a global Audit instance and rather
have the start_auditdaemon create it (and the shutdown
delete it).

* Simplify some of the call paths

* Use the timetravel functionality from libplatform

Change-Id: I55ba195b61a9ca6e0c872247f3ca83b1757d4c89
Reviewed-on: http://review.couchbase.org/62898
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# 785a6042 22-Mar-2016 Trond Norbye <trond.norbye@gmail.com>

Refactor: Use gtest for unittesting of auditd

This makes it easier to run a single test case (and debug it
from within an IDE)

Change-Id: I4dc5bcacf733c3cdb48b361a58dac09320abff9b
Reviewed-on: http

Refactor: Use gtest for unittesting of auditd

This makes it easier to run a single test case (and debug it
from within an IDE)

Change-Id: I4dc5bcacf733c3cdb48b361a58dac09320abff9b
Reviewed-on: http://review.couchbase.org/61817
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Will Gardner <will.gardner@couchbase.com>

show more ...


# ecaa0502 21-Mar-2016 Trond Norbye <trond.norbye@gmail.com>

Refactor: Don't use global variables for class members

Change-Id: I39cde43ccb3ce0b432492d9debb3403418c1ecf2
Reviewed-on: http://review.couchbase.org/61764
Tested-by: buildbot <build@couchbase.com>
R

Refactor: Don't use global variables for class members

Change-Id: I39cde43ccb3ce0b432492d9debb3403418c1ecf2
Reviewed-on: http://review.couchbase.org/61764
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Will Gardner <will.gardner@couchbase.com>

show more ...


# ed869f10 17-Mar-2016 Dave Rigby <daver@couchbase.com>

Fix memory errors in tests detected by AddressSanitizer

Fix two issues detected by AddressSanitizer:

* Memory leak in Auditd tests (createEvent)
* Invalid memory access in basic_engine_testsuite

C

Fix memory errors in tests detected by AddressSanitizer

Fix two issues detected by AddressSanitizer:

* Memory leak in Auditd tests (createEvent)
* Invalid memory access in basic_engine_testsuite

Change-Id: Iadaa0fff4e1974c7f03cdec66a88516b5fb2a518
Reviewed-on: http://review.couchbase.org/61642
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Will Gardner <will.gardner@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


Revision tags: v4.1.1_mc, v3.1.5_mc, v3.1.4_ep, v3.1.4_mc, v3.1.3_ep, v4.1.0_ep, v4.1.0_mc, v3.1.2_ep
# 0b33b03b 30-Oct-2015 Daniel Owen <owend@couchbase.com>

Remove unrequired parameter from shutdown_auditdaemon

Currently the name of the audit_file is passed into
shutdown_auditdaemon. However the function gets the
audit filename from audit.config and th

Remove unrequired parameter from shutdown_auditdaemon

Currently the name of the audit_file is passed into
shutdown_auditdaemon. However the function gets the
audit filename from audit.config and therefore the
parameter is not required.

Change-Id: I23ae43401e5be476929e99bec94e6798a15fcc36
Reviewed-on: http://review.couchbase.org/56558
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...


Revision tags: v3.1.2_mc, v3.1.3_mc, v3.1.1_mc, v3.1.1_ep
# 4763da69 27-Aug-2015 Dave Rigby <daver@couchbase.com>

Fix ThreadSanziter warnings in auditd_tests

Fix warning from ThreadSanitizer - appears to have been triggered by
some recent refactoring:

WARNING: ThreadSanitizer: data race (pid=176554)
Re

Fix ThreadSanziter warnings in auditd_tests

Fix warning from ThreadSanitizer - appears to have been triggered by
some recent refactoring:

WARNING: ThreadSanitizer: data race (pid=176554)
Read of size 8 at 0x7f65cd0df200 by main thread:
#0 main memcached/auditd/tests/testauditd.cc:258 (memcached_auditd_tests+0x0000000c3437)

Previous write of size 8 at 0x7f65cd0df200 by thread T1 (mutexes: write M155):
#0 audit_processed_listener() memcached/auditd/tests/testauditd.cc:142 (memcached_auditd_tests+0x0000000c2526)
#1 consume_events(void*) memcached/auditd/src/auditd.cc:81 (libauditd.so.0.1.0+0x0000000109a1)
#2 platform_thread_wrap (libplatform.so.0.1.0+0x000000003da1)

Change-Id: I90c21b62f999953015eaa25f5957c1a0db280e99
Reviewed-on: http://review.couchbase.org/54888
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: buildbot <build@couchbase.com>

show more ...


Revision tags: v4.0.0_ep, v4.0.0_mc
# 16188cd0 22-Jul-2015 Dave Rigby <daver@couchbase.com>

Auditd: Fix intermittant test failure on WIN32

On WIN32 gethostname() (as used by auditd) requires that the Winsock DLL
is initialized using WSAStartup(). This call was missing, meaning the
hostname

Auditd: Fix intermittant test failure on WIN32

On WIN32 gethostname() (as used by auditd) requires that the Winsock DLL
is initialized using WSAStartup(). This call was missing, meaning the
hostname was essentially garbage when running memcached_auditd_tests.

Fix by calling cb_initialize_sockets() in testauditd.cc's main().

Change-Id: I6807d7c2b7207bf985f4c0f5276438953fe234b2
Reviewed-on: http://review.couchbase.org/53545
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>
Reviewed-by: Daniel Owen <owend@couchbase.com>

show more ...


Revision tags: v3.1.0_ep, v3.1.0_mc
# 22b4dde6 07-Jul-2015 Trond Norbye <trond.norbye@gmail.com>

Refactor: don't let auditd be a cmake project

It is a part of memcached and don't need special handling.

Change-Id: I372dec203b63a82c4a7e4dae6940c7d468c9b609
Reviewed-on: http://review.couchbase.or

Refactor: don't let auditd be a cmake project

It is a part of memcached and don't need special handling.

Change-Id: I372dec203b63a82c4a7e4dae6940c7d468c9b609
Reviewed-on: http://review.couchbase.org/52916
Reviewed-by: Daniel Owen <owend@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...