Bug 51082 - directory-logger lines should be prefixed by an ID to allow external tools to identify related lines
directory-logger lines should be prefixed by an ID to allow external tools to...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: LDAP
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 4.4-4-errata
Assigned To: Arvid Requate
Sönke Schwardt-Krummrich
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-04-09 20:17 CEST by Arvid Requate
Modified: 2020-04-27 12:58 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Feature Request
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2020-04-09 20:17:40 CEST
Customers and partners asked that the directory-logger.log lines should be prefixed by an ID to allow external tools to identify related lines that make up a record.

The new behavior must not disturb the "block chain" feature of the directory-logger.log, where each record contains a hash over the record, including the previous hash.

This new behavior should be configurable via UCR variable and enabled by default for new installations.
Comment 1 Arvid Requate univentionstaff 2020-04-09 20:35:50 CEST
* https://git.knut.univention.de/univention/ucs/-/commit/73c2b7d093cfbfbc3c3d38cc6038b05a418f25fa
* Imported and built in errata4.4-4:

Successful build
Package: univention-directory-logger
Version: 10.0.1-1A~4.4.0.202004092025
Branch: ucs_4.4-0
Scope: errata4.4-4
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2020-04-14 22:36:18 CEST
[4.4-4] 94c531af6c Bug #51082: add advisory entry

Added missing advisory entry.

REOPEN: 
- UCR variable description
- changelog entry
- missing newline after bunch of lines 

...
ID 0: ENDID 337: START                              ← newline missing
ID 337: Old Hash: 0cb9779bbf9366caf7a04a3aa1f24f2d
ID 337: DN: dc=nstx,dc=ucs
ID 337: ID: 337                                     ← newline missing
ID 337: Modifier: cn=admin,dc=nstx,dc=ucs
ID 337: Timestamp: 14.04.2020 19:41:38
...

Pushed some fixes/suggestions to sschwardt/4.4-4/bug51082 → please review.
Comment 3 Arvid Requate univentionstaff 2020-04-15 11:09:44 CEST
c73d49ab56 | Merge QA suggestions into 4.4-4
c7610cdfd8 | Advisory

Package: univention-directory-logger
Version: 10.0.2-2A~4.4.0.202004151107
Branch: ucs_4.4-0
Scope: errata4.4-4
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2020-04-16 22:18:42 CEST
By default on fresh installations of univention-directory-logger, log entries in /var/log/univention/directory-logger.log are now prefixed by the corresponding notifier transaction ID:

ID 342: START
ID 342: Old Hash: 70069d51a7e2e168d7c7defd19349985
ID 342: DN: uid=Administrator,cn=users,dc=nstx,dc=ucs
ID 342: ID: 342
ID 342: Modifier: cn=admin,dc=nstx,dc=ucs
ID 342: Timestamp: 15.04.2020 09:20:40
ID 342: Action: modify
ID 342: 
ID 342: Old values:
ID 342: description: foo3
ID 342: entryCSN: 20200415091936.317108Z#000000#000#000000
ID 342: modifyTimestamp: 20200415091936Z
ID 342: 
ID 342: New values:
ID 342: description: foo4
ID 342: entryCSN: 20200415092040.430976Z#000000#000#000000
ID 342: modifyTimestamp: 20200415092040Z
ID 342: END
ID 343: START
ID 343: Old Hash: d11c50b0fb8f2c15f315507d14324ee2
ID 343: DN: uid=Administrator,cn=users,dc=nstx,dc=ucs
ID 343: ID: 343
ID 343: Modifier: cn=admin,dc=nstx,dc=ucs
ID 343: Timestamp: 15.04.2020 09:20:46
ID 343: Action: modify
ID 343: 
ID 343: Old values:
ID 343: description: foo4
ID 343: entryCSN: 20200415092040.430976Z#000000#000#000000
ID 343: modifyTimestamp: 20200415092040Z
ID 343: 
ID 343: New values:
ID 343: description: foo5
ID 343: entryCSN: 20200415092046.323520Z#000000#000#000000
ID 343: modifyTimestamp: 20200415092046Z
ID 343: END

The new prefix is activated upon installation by setting automatically the UCR variable ldap/logging/id-prefix=yes. On updated system with preinstalled univention-directory-logger the old behaviour is retained.

OK: code change
OK: installation
OK: update
OK: changelog entry
OK: advisory
OK: functional change
OK: package built and installable
REOPEN: the manual is no yet updated. I pushed a suggestion to the branch
        sschwardt/4.4-4/bug51082 for review. Please note, that the errata 
        number 529 is simply the next "free" errata number.
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2020-04-17 18:01:54 CEST
(In reply to Sönke Schwardt-Krummrich from comment #4)
> REOPEN: the manual is no yet updated. I pushed a suggestion to the branch
>         sschwardt/4.4-4/bug51082 for review. Please note, that the errata 
>         number 529 is simply the next "free" errata number.

Manual extension has been checked and merged to 4.4-4 by Arvid and me.
→ VERIFIED
Comment 6 Erik Damrose univentionstaff 2020-04-22 15:30:34 CEST
<http://errata.software-univention.de/ucs/4.4/536.html>
Comment 7 Philipp Hahn univentionstaff 2020-04-27 12:56:41 CEST
Fix spell checker issues:
[4.4-4] de9ca1bc7b Bug #51082 doc: new ID prefix for univention-directory-logger
 doc/manual/domain-ldap-de.xml | 6 ++++--
 doc/manual/domain-ldap-en.xml | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)
Comment 8 Philipp Hahn univentionstaff 2020-04-27 12:58:56 CEST
(In reply to Sönke Schwardt-Krummrich from comment #5)
> (In reply to Sönke Schwardt-Krummrich from comment #4)
> >  Please note, that the errata number 529 is simply the next "free" errata number.

[4.4-4] f6524ce7c7 Bug #51082 doc: Fix erratum number
 doc/manual/domain-ldap-de.xml | 2 +-
 doc/manual/domain-ldap-en.xml | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)