Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 7.0.0
-
Fix Version/s: 7.0.0
-
Labels:
-
Environment:7.0.0-SNAPSHOT ccba5cc
-
Target Version/s:
-
Verified Version/s:
-
Story Points:3
-
Sprint:2020.06 - IDM
-
Epic Link:
Description
One of our tests runs script on validTarget in recon and with Embedded DJ Explicit Managed User the target object has only _id, all other attributes are null. With generic embedded dj, the target object has all data.
EMBEDDED DJ EXPLICIT MANAGED USER: INFO: I am in the validTarget trigger with target given name {_id=ricksutter, userName=null, password=null, accountStatus=null, effectiveRoles=null, effectiveAssignments=null, postalCode=null, stateProvince=null, postalAddress=null, displayName=null, description=null, country=null, address2=null, city=null, givenName=null, sn=null, telephoneNumber=null, mail=null, siteImage=null, lastSync=null, consentedMappings=null, kbaInfo=null, preferences=null, active=null, anotherMail=null, basicProperty=null, birth=null, birthdate=null, cars=null, cn=null, conditionTrue=null, custom=null, department=null, email=null, employeeNumber=null, encrNotPrivate=null, evalCondTrue=null, eyeColor=null, failure=null, fax=null, fieldHistory=null, filterMatch=null, gender=null, hardware=null, hNotPBcrypt=null, hNotPScrypt=null, hNotPMd5=null, hNotPPbkdf2=null, hNotPSha1=null, hNotPSha256=null, hNotPSha384=null, hNotPSha512=null, jobTitle=null, lastName=null, ldapGroups=null, ldapPassword=null, ldap2Password=null, longitude=null, maritalStatus=null, onCreate=null, onRead=null, onRequestHook1=null, onRequestHook2=null, onRequestHook3=null, onRequestScript=null, onStore=null, onUpdate=null, onValidate=null, ou=null, password2=null, planet=null, valueOtherProp=null, returnByDefTrue=null, retry=null, propToRemove=null, propNoPolicy=null, provisionToCSV=null, sourceProperty=null, sunset=null, targetProperty=null, twitterId=null, userNameWork=null, _rev=000000008b3fe288} vs. GENERIC EMBEDDED DJ [222] Feb 26, 2019 1:46:08.433 PM org.forgerock.openidm.script.scope.FunctionFactory$3 call INFO: I am in the validTarget trigger with target given name {userName=rsutter, 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=vEMWknqzTzdxaQH2w16sNA==, data=7+35ughLa6kVgqMp6TYAKg==, keySize=16, purpose=idm.password.encryption, iv=eliTKk5XaTF09C1P8GHesw==, mac=NIMJnS6GIXIhSBr+NIF7Tg==}}}, description=Just another user, accountStatus=active, effectiveRoles=[], effectiveAssignments=[], _rev=00000000ab2bf193, _id=ricksutter}
To reproduce:
1. setup idm with embedded dj managed explicit user and run sync-with-ldap sample
2. add mapping to sync.json
{ "name" : "valid_target_use_target_in_script", "source" : "system/ldap/account", "target" : "managed/user", "validTarget" : { "type" : "text/javascript", "source" : "logger.info('I am in the validTarget trigger with target given name {}', target);true;" }, "properties" : [ { "source" : "cn", "target" : "displayName" }, { "source" : "description", "target" : "description" }, { "source" : "givenName", "target" : "givenName" }, { "source" : "mail", "target" : "mail" }, { "source" : "sn", "target" : "sn" }, { "source" : "uid", "target" : "userName" }, { "source" : "telephoneNumber", "target" : "telephoneNumber" }, { "target" : "accountStatus", "default" : "active" } ], "policies" : [ { "situation" : "ABSENT", "action" : "CREATE" }, { "situation" : "CONFIRMED", "action" : "UPDATE" } ] },
3. create managed user:
curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin" --header "If-None-Match: *" --header "Content-Type: application/json" --data '{"userName": "rsutter", "givenName": "rick", "sn": "sutter", "mail": "rick@example.com", "telephoneNumber": "6669876987", "password": "Th3Password", "description": "Just another user"}' --request PUT "http://localhost:8080/openidm/managed/user/ricksutter"
4. Run recon:
curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin" --header "Content-Type: application/json" --request POST "http://localhost:8080/openidm/recon?_action=recon&mapping=valid_target_use_target_in_script&waitForCompletion=True"
5. Check the logs for the target object
INFO: I am in the validTarget trigger with target given name {_id=ricksutter, userName=null, password=null, accountStatus=null, effectiveRoles=null, effectiveAssignments=null, postalCode=null, stateProvince=null, postalAddress=null, displayName=null, description=null, country=null, address2=null, city=null, givenName=null, sn=null, telephoneNumber=null, mail=null, siteImage=null, lastSync=null, consentedMappings=null, kbaInfo=null, preferences=null, _rev=000000001273e3c1}
Settings to run the automated test:
config.cfg - repo_type = embedded_dj_explicit_table
./run-pybot.py -i scripting -s *.javascript -t valid_target_use_target_in_script -n openidm
Attachments
Issue Links
- depends on
-
OPENIDM-13375 REST2LDAP: Null source on query-all-ids
-
- Closed
-
-
OPENDJ-6503 returnNullForMissingProperties=true supersedes _field specification
-
- Done
-
-
OPENIDM-13657 Implement Filter to map all queryId-based QueryRequests to queryFilter-based QueryRequests
-
- Closed
-
- relates to
-
OPENIDM-12635 Embedded DJ explicit user returns all NULL valued attributes for query-all-ids
-
- Closed
-