-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 6.5.0.4, 6.5.1.0
-
Fix Version/s: 6.5.1.0
-
Component/s: Module - Audit
-
Labels:
After updating user with PUT request, incorrect changedFields are logged
1. Add watched fields to activity config
{"watchedFields":["mail","telephoneNumber"]}
2. Create user
curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin" --header "If-None-Match: *" --header "Content-Type: application/json" --data '{"id": "ricksutter", "userName": "6xLKxA5a", "givenName": "rick", "sn": "sutter", "mail": "rick@example.com", "telephoneNumber": "6669876987", "password": "Th3Password", "description": "Just another user"}' --request PUT "http://localhost:8080/openidm/managed/user/6xLKxA5a" Response Content: {"_id":"6xLKxA5a","_rev":"000000008d8f2bbf","id":"ricksutter","userName":"6xLKxA5a","givenName":"rick","sn":"sutter","mail":"rick@example.com","telephoneNumber":"6669876987","password":{"$crypto":{"type":"x-simple-encryption","value":{"cipher":"AES/CBC/PKCS5Padding","stableId":"openidm-sym-default","salt":"Zxc/RUX+DzLIesAFzy+AbQ==","data":"bo7rtghecnbLfSJxsKowIQ==","keySize":16,"purpose":"idm.password.encryption","iv":"0ZBIltE0ap1M1GO0vY8YLA==","mac":"9TSJmwMVJ90c7EbWx0Y1XA=="}}},"description":"Just another user","accountStatus":"active","effectiveRoles":[],"effectiveAssignments":[],"lastSync":{"managedUser_rd":{"effectiveAssignments":[],"timestamp":"2020-07-13T13:56:55.436"}}}
3. Update user with PUT
curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin" --header "If-Match: 00000000f19626a8" --header "Content-Type: application/json" --data '{"id": "ricksutter", "userName": "6xLKxA5a", "givenName": "rick", "sn": "sutter", "mail": "newemailadress@miller.com", "telephoneNumber": "6669876987", "password": "Th3Password", "description": "Just another user"}' --request PUT "http://localhost:8080/openidm/managed/user/6xLKxA5a" Response Content: {"_id":"6xLKxA5a","_rev":"00000000f19626a8","id":"ricksutter","userName":"6xLKxA5a","givenName":"rick","sn":"sutter","mail":"newemailadress@miller.com","telephoneNumber":"6669876987","password":{"$crypto":{"type":"x-simple-encryption","value":{"cipher":"AES/CBC/PKCS5Padding","stableId":"openidm-sym-default","salt":"Zxc/RUX+DzLIesAFzy+AbQ==","data":"bo7rtghecnbLfSJxsKowIQ==","keySize":16,"purpose":"idm.password.encryption","iv":"0ZBIltE0ap1M1GO0vY8YLA==","mac":"9TSJmwMVJ90c7EbWx0Y1XA=="}}},"description":"Just another user","lastSync":{"managedUser_rd":{"effectiveAssignments":[],"timestamp":"2020-07-13T13:56:55.436"}},"effectiveRoles":[],"effectiveAssignments":[]}
4. Audit contains changedFields with values /mail, /telephoneNumber -> should be only /mail
- depends on
-
OPENIDM-10660 User metadata is logged in the audit log when an object is changed
-
- Closed
-