-
Notifications
You must be signed in to change notification settings - Fork 188
/
opendj-localhost-medium.xml
536 lines (493 loc) · 22.4 KB
/
opendj-localhost-medium.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2010-2014 Evolveum
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<!--
This file is an example of Resource definition. It defines an LDAP resource
using an Identity Connector Framework LDAP connector. It contains configuration
for use with stock OpenDJ and OpenDS servers.
This is "Medium difficulty" resource definition.
It contains outbound mappings to correctly populate new accounts.
It also contains inbound mappings and definition to enable synchronization.
-->
<objects xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
xmlns:icfc="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-3"
xmlns:my="http://whatever.com/my"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:mr="http://prism.evolveum.com/xml/ns/public/matching-rule-3">
<resource oid="ef2bc95b-76e0-48e2-86d6-3d4f02d3e1a2">
<!-- Resource name. It will be displayed in GUI. -->
<name>Localhost OpenDJ</name>
<description>
LDAP resource using an Identity Connector Framework LDAP connector. It contains configuration
for use with stock OpenDJ and OpenDS servers.
This resource definition contains also definition to enable synchronization.
</description>
<connectorRef type="ConnectorType">
<description>
Reference to the ICF LDAP connector. This is dynamic reference, it will be translated to
OID during import.
</description>
<filter>
<q:equal>
<q:path>c:connectorType</q:path>
<q:value>org.identityconnectors.ldap.LdapConnector</q:value>
</q:equal>
</filter>
</connectorRef>
<!-- Configuration section contains configuration of the connector,
such as hostnames and passwords -->
<connectorConfiguration>
<icfc:configurationProperties
xmlns:icfcldap="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/com.evolveum.polygon.connector-ldap/org.identityconnectors.ldap.LdapConnector">
<icfcldap:port>1389</icfcldap:port>
<icfcldap:host>localhost</icfcldap:host>
<icfcldap:baseContexts>dc=example,dc=com</icfcldap:baseContexts>
<icfcldap:principal>uid=idm,ou=Administrators,dc=example,dc=com</icfcldap:principal>
<icfcldap:credentials>
<clearValue>secret</clearValue>
</icfcldap:credentials>
<icfcldap:modifiersNamesToFilterOut>uid=idm,ou=Administrators,dc=example,dc=com</icfcldap:modifiersNamesToFilterOut>
<icfcldap:vlvSortAttribute>uid</icfcldap:vlvSortAttribute>
<icfcldap:accountOperationalAttributes>ds-pwp-account-disabled</icfcldap:accountOperationalAttributes>
<icfcldap:useBlocks>true</icfcldap:useBlocks>
<icfcldap:usePagedResultControl>true</icfcldap:usePagedResultControl>
</icfc:configurationProperties>
</connectorConfiguration>
<!-- Resource schema definition.
It defines all the object classes that are available to midPoint
(accounts, groups, ...).
This should be direct mapping of ICF schema (and therefore also
LDAP schema). This is not supposed to be customized during deployment
unless the underlying LDAP schema is non-standard (also see below).
This schema is normally generated from the resource on the first use.
Therefore it is not needed to provide the schema here during import.
This example has a schema definition to show how it looks like and also to
demonstrate that it can be provided during import if needed. -->
<schema>
<!-- Storing schema here and don't letting midpoint to generate it. Some tests work without running resource,
generating a schema would fail. -->
<cachingMetadata>
<retrievalTimestamp>2012-03-20T13:02:29.275+01:00</retrievalTimestamp>
<serialNumber>1798eed6def9f54c-3d4bce63faa79272</serialNumber>
</cachingMetadata>
<definition>
<xsd:schema elementFormDefault="qualified"
targetNamespace="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:a="http://prism.evolveum.com/xml/ns/public/annotation-3"
xmlns:ra="http://midpoint.evolveum.com/xml/ns/public/resource/annotation-3"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3" />
<xsd:import namespace="http://prism.evolveum.com/xml/ns/public/annotation-3" />
<xsd:complexType name="GroupObjectClass">
<xsd:annotation>
<xsd:appinfo>
<ra:resourceObject/>
<ra:identifier>icfs:uid</ra:identifier>
<ra:displayNameAttribute>icfs:name</ra:displayNameAttribute>
<ra:namingAttribute>icfs:name</ra:namingAttribute>
<ra:nativeObjectClass>__GROUP__</ra:nativeObjectClass>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="seeAlso" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="owner" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="o" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="description" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="objectClass" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="uniqueMember" type="xsd:string" />
<xsd:element maxOccurs="unbounded" name="cn" type="xsd:string" />
<xsd:element ref="icfs:name" />
<xsd:element minOccurs="0" ref="icfs:uid" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="businessCategory" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="ou" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="AccountObjectClass">
<xsd:annotation>
<xsd:appinfo>
<ra:resourceObject/>
<ra:identifier>icfs:uid</ra:identifier>
<ra:secondaryIdentifier>icfs:name</ra:secondaryIdentifier>
<ra:displayNameAttribute>icfs:name</ra:displayNameAttribute>
<ra:namingAttribute>icfs:name</ra:namingAttribute>
<ra:nativeObjectClass>__ACCOUNT__</ra:nativeObjectClass>
<ra:account/>
<ra:default/>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="internationaliSDNNumber" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="x121Address" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="employeeType" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="pager" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="audio" type="xsd:base64Binary" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="departmentNumber" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="x500UniqueIdentifier" type="xsd:base64Binary" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="postalAddress" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="objectClass" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="givenName" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="mail" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="photo" type="xsd:base64Binary" />
<xsd:element minOccurs="0" name="displayName" type="xsd:string" />
<xsd:element maxOccurs="unbounded" name="cn" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="userPassword" type="xsd:base64Binary" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="physicalDeliveryOfficeName" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="manager" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="homePhone" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="description" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="postOfficeBox" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="homePostalAddress" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="roomNumber" type="xsd:string" />
<xsd:element minOccurs="0" name="employeeNumber" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="facsimileTelephoneNumber" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="userSMIMECertificate" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="l" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="userCertificate" type="xsd:base64Binary" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="teletexTerminalIdentifier" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="jpegPhoto" type="xsd:base64Binary" />
<xsd:element ref="icfs:name" />
<xsd:element minOccurs="0" name="preferredDeliveryMethod" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="userPKCS12" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="postalCode" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="labeledURI" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="telexNumber" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="carLicense" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="street" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="registeredAddress" type="xsd:string" />
<xsd:element maxOccurs="unbounded" name="sn" type="xsd:string" />
<xsd:element minOccurs="0" name="ds-pwp-account-disabled" type="xsd:string">
<xsd:annotation>
<xsd:appinfo>
<a:ignore>true</a:ignore>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="seeAlso" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="secretary" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="mobile" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="uid" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="initials" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="businessCategory" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="telephoneNumber" type="xsd:string" />
<xsd:element minOccurs="0" ref="icfs:uid" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="o" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="title" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="destinationIndicator" type="xsd:string" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="st" type="xsd:string" />
<xsd:element minOccurs="0" ref="icfs:password" />
<xsd:element maxOccurs="unbounded" minOccurs="0" name="ou" type="xsd:string" />
<xsd:element minOccurs="0" name="preferredLanguage" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</definition>
</schema>
<!-- Resource Schema Handling definition.
This part defines how the schema defined above will be used by
midPoint. It defines expressions and limitations for individual
schema attributes.
The expressions that describe both inbound and outbound flow of
the attributes are defined in this section.
This is the part where most of the customization takes place.
-->
<schemaHandling>
<objectType>
<kind>account</kind>
<displayName>Normal Account</displayName>
<default>true</default>
<objectClass>ri:AccountObjectClass</objectClass>
<attribute>
<ref>icfs:name</ref>
<displayName>Distinguished Name</displayName>
<limitations>
<minOccurs>0</minOccurs>
<access>
<read>true</read>
<add>true</add>
<modify>true</modify>
</access>
</limitations>
<matchingRule>mr:stringIgnoreCase</matchingRule>
<outbound>
<source>
<path>$user/name</path>
</source>
<expression>
<script>
<!-- No explicit script language was specified. It means that this is Groovy -->
<code>
'uid=' + name + iterationToken + ',ou=people,dc=example,dc=com'
</code>
</script>
</expression>
</outbound>
</attribute>
<attribute>
<ref>icfs:uid</ref>
<displayName>Entry UUID</displayName>
<limitations>
<access>
<read>true</read>
<add>false</add>
<modify>true</modify>
</access>
</limitations>
<matchingRule>mr:stringIgnoreCase</matchingRule>
</attribute>
<attribute>
<ref>ri:cn</ref>
<displayName>Common Name</displayName>
<limitations>
<minOccurs>0</minOccurs>
<access>
<read>true</read>
<add>true</add>
<modify>true</modify>
</access>
</limitations>
<outbound>
<source>
<path>$user/fullName</path>
</source>
</outbound>
<inbound>
<target>
<path>$user/fullName</path>
</target>
</inbound>
</attribute>
<attribute>
<ref>ri:sn</ref>
<displayName>Surname</displayName>
<limitations>
<minOccurs>0</minOccurs>
</limitations>
<outbound>
<source>
<!-- The path can be shorteden like this. $user is a default source "context" in outbound -->
<path>familyName</path>
</source>
</outbound>
<inbound>
<target>
<!-- The path can be shorteden like this. $user is a default target "context" in inbound -->
<path>familyName</path>
</target>
</inbound>
</attribute>
<attribute>
<ref>ri:givenName</ref>
<displayName>Given Name</displayName>
<outbound>
<source>
<!-- Full namespace prefixes can be used in the path -->
<path>$c:user/c:givenName</path>
</source>
</outbound>
<inbound>
<target>
<path>$c:user/c:givenName</path>
</target>
</inbound>
</attribute>
<attribute>
<ref>ri:uid</ref>
<displayName>Login Name</displayName>
<matchingRule>mr:stringIgnoreCase</matchingRule>
<outbound>
<strength>weak</strength>
<source>
<description>Source may have description</description>
<path>$user/name</path>
</source>
<!-- We need to put iterationToken here as well, otherwise effect described in MID-2139 occurs -->
<expression>
<script>
<code>name + iterationToken</code>
</script>
</expression>
</outbound>
<inbound>
<target>
<description>Targets may have description</description>
<path>$c:user/c:name</path>
</target>
</inbound>
</attribute>
<attribute>
<ref>ri:description</ref>
<outbound>
<strength>weak</strength>
<expression>
<description>Expression that assigns a fixed value</description>
<value>Created by IDM</value>
</expression>
</outbound>
</attribute>
<attribute>
<ref>ri:l</ref>
<displayName>Location</displayName>
<outbound>
<source>
<path>$user/locality</path>
</source>
</outbound>
</attribute>
<attribute>
<ref>ri:employeeType</ref>
<displayName>Employee Type</displayName>
<tolerant>false</tolerant>
<outbound>
<source>
<path>$user/employeeType</path>
</source>
</outbound>
</attribute>
<iteration>
<maxIterations>5</maxIterations>
</iteration>
<protected>
<icfs:name>uid=idm,ou=Administrators,dc=example,dc=com</icfs:name>
</protected>
<activation>
<administrativeStatus>
<outbound/>
<inbound>
<strength>weak</strength>
<expression>
<asIs/>
</expression>
</inbound>
</administrativeStatus>
</activation>
<credentials>
<password>
<outbound>
<expression>
<asIs/>
</expression>
</outbound>
<inbound>
<strength>weak</strength>
<expression>
<generate/>
</expression>
</inbound>
</password>
</credentials>
</objectType>
</schemaHandling>
<capabilities xmlns:cap="http://midpoint.evolveum.com/xml/ns/public/resource/capabilities-3">
<configured>
<cap:activation>
<cap:status>
<cap:attribute>ri:ds-pwp-account-disabled</cap:attribute>
<cap:enableValue/>
<cap:disableValue>true</cap:disableValue>
</cap:status>
</cap:activation>
</configured>
</capabilities>
<!--
Synchronization section describes the synchronization policy, timing,
reactions and similar synchronization settings.
-->
<synchronization>
<objectSynchronization>
<!--
The synchronization for this resource is enabled.
It means that the synchronization will react to changes detected by
the system (live sync task, discovery or reconciliation) -->
<enabled>true</enabled>
<correlation>
<q:description>
Correlation expression is a search query.
Following search queury will look for users that have "name"
equal to the "uid" attribute of the account. Simply speaking,
it will look for match in usernames in the IDM and the resource.
The correlation rule always looks for users, so it will not match
any other object type.
</q:description>
<q:equal>
<q:path>name</q:path>
<expression>
<path>
declare namespace ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3";
$account/attributes/ri:uid
</path>
</expression>
</q:equal>
</correlation>
<!-- Confirmation rule may be here, but as the search above will
always return at most one match, the confirmation rule is not needed. -->
<!-- Following section describes reactions to a situations.
The setting here assumes that this resource is authoritative,
therefore all accounts created on the resource should be
reflected as new users in IDM.
See http://wiki.evolveum.com/display/midPoint/Synchronization+Situations
-->
<reaction>
<situation>linked</situation>
<synchronize>true</synchronize>
</reaction>
<reaction>
<situation>deleted</situation>
<synchronize>true</synchronize>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlink</handlerUri>
</action>
</reaction>
<reaction>
<situation>unlinked</situation>
<synchronize>true</synchronize>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#link</handlerUri>
</action>
</reaction>
<reaction>
<situation>unmatched</situation>
<synchronize>true</synchronize>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus</handlerUri>
</action>
</reaction>
</objectSynchronization>
</synchronization>
</resource>
<task oid="91919192-76e0-59e2-86d6-3d4f02d3ffff">
<name>Synchronization: Embedded Test OpenDJ (no extensions schema)</name>
<description>
Definition of a live sychnronization task. It will poll changelog and pull in changes
</description>
<taskIdentifier>91919191-76e0-59e2-86d6-3d4f02d3ffff</taskIdentifier>
<ownerRef oid="00000000-0000-0000-0000-000000000002"/>
<executionStatus>runnable</executionStatus>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/synchronization/task/live-sync/handler-3</handlerUri>
<objectRef oid="ef2bc95b-76e0-48e2-86d6-3d4f02d3e1a2" type="ResourceType"/>
<recurrence>recurring</recurrence>
<binding>tight</binding>
<schedule>
<interval>5</interval>
</schedule>
</task>
</objects>