Identity Domain Connector
The Identity Domain connector (sometimes called the Service Layer connector) implements the DirX Identity Java Connector Integration Framework’s DxmConnector interface and connects to an Identity domain.
The Identity Domain connector implements all of the functionality to create, update, delete and search all entries in a DirX Identity domain. It also allows the assignment of roles, groups and permissions to users. The assignments can be attributed, where they can have an end date and one or more role parameters. Rather than communicating on the low-level LDAP protocol, the Identity Domain connector uses the DirX Identity service layer component. This design allows the connector to use the service layer features: the object descriptions, and user resolution.
The Identity Domain connector supports all entry types in a domain: users, roles, groups, business objects, and more. The Identity Domain connector evaluates the object description for the creation of an entry. The object description name can be given explicitly or is determined from other attributes, normally from the type and object class. When an entry is to be created, a client needs to provide only a minimum set of attributes; no DN or naming attribute is required. The connector applies the object description rules for initial values and attributes dependencies.
The Identity Domain connector supports password changes; passwords can be part of both add and modify requests.
The following sections describe how the Identity Domain connector handles requests and responses as well as the connector’s configuration.
Prerequisites and Limitations
The Identity Domain connector is contained in the library dxmSvcLayerConnector.jar. It is based on the DirX Identity Java Connector Integration Framework and uses the DirX Identity service layer for access to the DirX Identity domain and for searching and maintaining the domain entries. The service layer is contained in the library dxrServices.jar and in turn depends on a number of other DirX Identity and external libraries.
The Identity Domain connector supports only one role parameter value per assignment and role parameter. An assignment can have multiple role parameters, but each parameter can have only one value. If you need more values, then you need to create more assignments. For example, if a user is a member of two projects, create two assignments, one for each project.
Request and Response Handling
This section describes how the connector handles requests and responses.
Object Description
The service layer requires an object description name for creating an entry, so the request needs to contain attributes that allow the connector to select an object description. The best way to satisfy this requirement is to pass the object description name in the virtual attribute odName. For example, to create a functional user, take the odName dxrFunctionalUser. You’ll find the object descriptions with their names in the domain configuration tree.
As an alternative, you can provide the LDAP attributes that are sufficient to identify an object description. Normally, these attributes are objectclass and optionally dxrType. Check the <mapping> section of the object descriptions to determine the attributes that are evaluated by the service layer. For a functional user, you only need to provide the objectclass value dxrFunctionalUser.
If the given values are not sufficient to identify an object description, the connector checks whether the new entry should become a container. If an object class value contains the string container, the connector uses the object description name dxrContainer.
Object Class
Only the object classes that are necessary to identify an object description need to be provided. If the request already contains an object description name, no object classes need to be provided; the service layer takes the missing object classes from the object description.
Parent Entry
An entry must be created under another existing entry, the parent. The easiest way to satisfy this requirement is to provide the DN of the parent in the virtual attribute parentDN. If the add request contains an identifier DN, the Identity Domain connector extracts the parent DN from this attribute.
If a parent cannot be identified this way, the connector inspects the found object description and its parent descriptions. If the new entry is a user, role or permission, the connector takes the corresponding root entry.
If a parent still cannot be identified, the connector places the new entry under the business objects container.
Approval
If the creation of a new entry requires approval, the service layer starts the approval workflow. If the workflow is still in progress, the Identity Domain connector returns the result code PENDING and takes the entry identifier from the workflow’s subject identifier. Note that the entry DN may be changed in the remainder of the workflow.
Password
The Identity Domain connector expects the password in the userPassword attribute. If the user or account is not in approval, it sets the password for the entry using the normal password support. Otherwise, it’s the workflow’s responsibility to define and set a password for a new user or account. With password support, the passwords are handled in the same way as, for example, with Web Center. Password support sends a password change event with the encrypted password. The workflow UserPasswordEventManager will process them in the standard way and update also corresponding accounts.
The connector does not use password support only if the suppressPwdEvent option is set to true; it simply stores the password in the entry’s user password attribute. In this case, in the object description the property type must be declared as “[B” (binary array).
Renaming
A modify request should contain the DN of the entry in its ID and the old DN in the dxrprimarykeyold attribute; this configuration should be standard for all Provisioning workflows. This configuration allows the connector to detect a requested move of the entry. In this case, it asks the service layer to perform the rename and then applies other modifications.
Delete
Before the Identity Domain connector deletes an entry, it asks the service layer to delete all of its children. Typically, an entry will not be physically deleted, but set to state TBDEL (to be deleted).
Search
The Identity Domain connector follows the standard rules for search requests:
-
It reads an entry, if the operational attributes in the request specify a scope of base.
-
It performs a paged search, if the operational attribute pagesize has a value greater than 0. In the other cases, it performs a normal search, evaluating search base, filter, requested attributes, sizelimit, timelimit, sortattribute and sortorder; except for search base and filter, all of these are operational attributes. If the operational attribute noattrs is given with a value of true, it doesn’t request any attribute.
References to other LDAP Entries
References to other LDAP entries in attributes such as owner or dxrLocationLink must be given as LDAP DNs. Typically, the source databases will not recognize these DNs. Instead, they have a unique value, often something like a primary key. A mapping function needs to search the entry based on this unique value. An example of how to do this is given in the source for the role mapping function.
Privilege Assignments
The Identity Domain connector provides special handling for privilege assignments.
For simple assignments, which do not have an end date or role parameters, it is sufficient to put the DN of the assigned role, permission or group into the respective attribute dxrRoleLink, dxrPermissionLink or dxrGroupLink.
For attributed assignments, the virtual attributes rolesassigned, permissionsassigned and groupsassigned must be used; they can also be used for simple assignments. The content of these attributes is a structured JSON object. Here is an example:
{
"privilegeLink": "cn=Project Member,cn=Project Specific,cn=Corporate Roles,cn=RoleCatalogue,cn=My-Company",
"dxrEndDate": "20181231230000.000Z",
"params": [
{
"paramDN": "cn=Project,cn=My-Company,cn=RoleParams,cn=Customer Extensions,cn=Configuration,cn=My-Company",
"paramUid": "uid-7f001-cee271-fed935aa6d--7eb4",
"paramKey": "MoreCustomers",
"paramValue": "cn=MoreCustomers,cn=Projects,cn=BusinessObjects,cn=My-Company"
}
]
}
The example above contains new lines, tabs and blanks for better reading. Note that before you pass this value to the join engine of a Provisioning workflow, you should trim it; that is, remove all white spaces (blanks and tabs). This would matter if you provided the value in an LDIF or CSV file. Otherwise, the value would not exactly match the value that is returned from the connector and the join engine would always request the connector to modify the entry in LDAP. So, the better way is to have some channel filter component between the source connector and the join engine as in the sample workflow. This filter component should use the provided class PrivilegeAssignedDTO to generate the attribute value. For an example of how to do this, see the sources of the method addAssignmentAttribute(…) in the filter class JdbcRoleAsgFilter; you’ll find it in the Additions folder of the product media.
In the request to the connector, the JSON object needs to contain the privilegeLink property with the DN of the privilege to assign. This is the minimum content and represents a simple assignment. An end date is expected in the dxrEndDate property; no start date is evaluated.
Role parameters are represented in the params array. They can have the DN of the parameter, its dxrUid and the key and value for the parameter value. A request must contain either the parameter UID or its DN in addition to the parameter value and value key.
The Identity Domain connector supports only one value per role parameter because the sequence of values cannot be determined in JSON. As a result, comparing mapped and actual existing values in the workflow might easily return the wrong result even when logically they are the same.
The Identity Domain connector returns only direct assignments in a search response; it does not return inherited and rule-based assignments. The result also contains assignments in approval. This helps to prevent duplicate request workflows, where an assignment is still in approval and the Provisioning workflow runs again.
The DN values of the privilege, a role parameter or even role parameter values are not usually present in a source database; instead, the source database contains only unique IDs. It’s the responsibility of filter and/or mapping functions in the Provisioning workflow to supply these DNs. For more information, see the section "Relational Database User Import Workflow" in the chapter "Using the Source Workflows" in the DirX Identity Application Development Guide.
Example Add Request
The following add request contains the minimum set of attributes that are necessary for creating a user:
<spml:addRequest
xmlns:spml=urn:oasis:names:tc:SPML:1:0
xmlns:dsml=urn:oasis:names:tc:DSML:2:0:core
>
<spml:attributes>
<spml:attr name=sn>
<dsml:value>UserWithJustObjectDescriptionName</dsml:value>
</spml:attr>
<spml:attr name=givenname>
<dsml:value>new</dsml:value>
</spml:attr>
<spml:attr name=parentDN>
<dsml:value>cn=Users,cn=My-Company</dsml:value>
</spml:attr>
<spml:attr name=odName>
<dsml:value>dxrUser</dsml:value>
</spml:attr>
</spml:attributes>
</spml:addRequest>
Configuration
The Identity Domain connector is configured according to the DirX Identity Java Connector Integration Framework. Its class is net.atos.dirx.dxi.connector.svclayer.ServiceLayerConnector.
The connector evaluates the following options:
-
server - the host name or IP address of the LDAP server.
-
port - the port number of the LDAP server.
-
user - the DN of the LDAP user for binding.
-
password - the password for binding.
-
ssl - true if TLS is to be used.
-
domain - the name of the Identity domain, including the prefix cn=. If it is missing, the top-level RDN of the user DN is used.
-
suppressPwdEvent - whether (true) or not (false) the connector stores the user password as is in the userpassword attribute or sends a password change event to the UserPasswordEventManager workflow.