Bug 54348 - UDM is logging password hashes
UDM is logging password hashes
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 5.0-1-errata
Assigned To: Johannes Lohmer
Florian Best
https://git.knut.univention.de/univen...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-01-17 13:57 CET by Dirk Ahrnke
Modified: 2022-04-06 17:31 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 5: Will affect all installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.171
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): bitesize, Security
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Ahrnke univentionstaff 2022-01-17 13:57:34 CET
It was noticed that password hashes are logged into directory-manager-rest.log.
In the scenario where we initially observed the behaviour the password is set through the Kelvin-API. Ít is reproducable in that way once the password was set the second time.

17.01.22 13:51:38        INFO      (     1218) : 200 GET /udm/users/user/uid=karlauer,cn=lehrer,cn=users,ou=SchuleA,dc=mydomain,dc=intranet (0.0.0.0) 11.19ms
17.01.22 13:51:38        INFO      (     1218) : 200 GET /udm/users/user/?filter=(%26(!(uid%3Dkarlauer))(mailPrimaryAddress%3Dkarlauer@mydomain.intranet))&position=dc%3Dmydomain,dc%3Dintranet&scope=sub&hidden=true (0.0.0.0) 115.27ms
17.01.22 13:51:38        INFO      (     1218) : 200 GET /udm/groups/group/cn=lehrer-schulea,cn=groups,ou=SchuleA,dc=mydomain,dc=intranet (0.0.0.0) 8.09ms
17.01.22 13:51:38.639  ADMIN       ( ERROR   ) : 
== [$6$CLaER3Q.QluXlaR7$mnVbxTWFbhMctowNO48sPoLRrq8mA2EJt/OudW5dyliS5mOkwDt2QOEEeU6oJsBO6a3F9HuewGCJaMFNUOnSS/]
== [$6$CLaER3Q.QluXlaR7$0qTXGesA6hV1PTu7YglvWAcZj6bvI970tMTJAtvDgZ0aOTi9VMvFMmgS3CtOA.McUgCmh8uD7.Mt4BBtTHzPc/]
17.01.22 13:51:38        INFO      (     1218) : 204 PATCH /udm/users/user/uid=karlauer,cn=lehrer,cn=users,ou=SchuleA,dc=mydomain,dc=intranet (0.0.0.0) 61.91ms

Note directory/manager/rest/debug/level was set "0" during the test

The problem most likely originates in 

modules/univention/admin/password.py:                           ud.debug(ud.ADMIN, ud.ERROR, '\n== [%s]\n== [%s]' % (password_hash, line))
Comment 2 Johannes Lohmer univentionstaff 2022-04-04 13:01:44 CEST
univention-directory-manager-modules (15.0.11-40)
11a63db0ef8c | Bug #54348: removed lines logging UDM password hashes
Comment 3 Florian Best univentionstaff 2022-04-04 15:45:24 CEST
OK: password hashes are not logged anymore
OK: YAML