#50279 Issue 50026 - Audit log does not capture the operation where nsslapd-lookthroughlimit is modified
Closed by spichugi. Opened by bsmejkal.
bsmejkal/389-ds-base ds50026  into  master

Download 50279.patch

Description:
Added test case to check modification of nsslapd-lookthroughlimit in audit log, because it wasn't logged in correct format.

Also removed function in test_internal_log_level_131076 that I used for debugging when making that test and forgot to delete it.

https://pagure.io/389-ds-base/issue/50026

Reviewed by: ???

Bind opens a new connection and bind with the entry.
Also, it doesn't affect your test case because DS instance in lib389 usually is bound as DM.

Besides that moment, the code looks good and the test passes.

@bsmejkal the original push added a test case https://pagure.io/389-ds-base/c/a1578a9bc.

You may prefer to update it than to introduce a new one.

@spichugi Yeah, I knew it is bound as DM by default, I just thought of a case if someone put a test before mine that binds as user and won't rebind as DM, then my test would fail because of insufficient rights. At least this is how I think it works, so please correct me if I am wrong :)

@tbordaz Ah, sorry, I missed this test case. Sure, I will update that one, then.
I see it already searches the logs with helper function because it modifies multiple attributes, so there is propably no need for my use of searchAuditLog()?

@spichugi Yeah, I knew it is bound as DM by default, I just thought of a case if someone put a test before mine that binds as user and won't rebind as DM, then my test would fail because of insufficient rights. At least this is how I think it works, so please correct me if I am wrong :)

Yes, you are right. But the bind you used opens a new connection and binds with the entry.
So you have to use the returned connection in your future operations.

conn = dm.bind()
config_ldbm = LDBMConfig(conn)
assert conn.config.set('nsslapd-auditlog-logging-enabled', 'on')
assert config_ldbm.set('etc')

@tbordaz Ah, sorry, I missed this test case. Sure, I will update that one, then.
I see it already searches the logs with helper function because it modifies multiple attributes, so there is propably no need for my use of searchAuditLog()?

Your use of searchAuditLog is better because it uses lib389 functionality instead of implementing a new one.

Thanks @spichugi this is good feedback :)

rebased onto 6d7283ac95cb354bc32066a7ca46833f1c83deb5

@spichugi
Updated the test case with suggested changes, could you please review? Thanks.

LGTM! Thanks!

rebased onto 9e4ce5fad6f36baf8db88bf1820df28cc6e4e1a5

Pull-Request has been merged by vashirov

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3338

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

Metadata