Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-15135

sustaining/6.5.x - Changed fields are incorrect in audit file

    Details

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                victor.ortega Victor Ortega
                Reporter:
                michal.orlik@profiq.cz Michal Orlik
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: