Skip to content

Add applyMappings sync action - #276

Open
karelmaxa wants to merge 1 commit into
WrenSecurity:mainfrom
karelmaxa:feat-add-applymappings-action
Open

Add applyMappings sync action#276
karelmaxa wants to merge 1 commit into
WrenSecurity:mainfrom
karelmaxa:feat-add-applymappings-action

Conversation

@karelmaxa

Copy link
Copy Markdown
Member

This PR adds a new applyMappings action to the synchronization service that evaluates
property mappings and transformation scripts against a caller-supplied source object and returns
the resulting target object.

Usage

curl \
  --request POST \
  --header "Content-Type: application/json" \
  --header "X-OpenIDM-Username: openidm-admin" \
  --header "X-OpenIDM-Password: openidm-admin" \
  --data '{
    "source": {
      "userName": "jdoe",
      "givenName": "John",
      "sn": "Doe",
      "mail": "jdoe@example.com"
    }
  }' \
  "http://localhost:8080/openidm/sync?_action=applyMappings&mapping=managedUser_ldapAccount"

Example response

{
  "dn": "uid=jdoe,ou=people,dc=example,dc=com",
  "uid": "jdoe",
  "cn": "John Doe",
  "sn": "Doe",
  "mail": "jdoe@example.com"
}

Request parameters:

Parameter Location Required Description
mapping query yes Name of the mapping to evaluate
linkQualifier query no Link qualifier (defaults to default)
source body yes Source object to map
oldSource body no Previous source state, exposed to transform scripts
target body no Starting target state (defaults to empty)
existingTarget body no Existing target for reference in default mapping / role scripts

@karelmaxa
karelmaxa requested a review from pavelhoral June 12, 2026 12:27
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
9.1% Coverage on New Code (required ≥ 80%)
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant