/
resource-dummy-black.xml
267 lines (257 loc) · 9.9 KB
/
resource-dummy-black.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
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2010-2019 Evolveum and contributors
~
~ This work is dual-licensed under the Apache License 2.0
~ and European Union Public License. See LICENSE file for details.
-->
<!-- Black dummy resource for testing tolerant attributes
also there is a resource password policy
also this resource has lower connector error criticality
also there are provisioning scripts that may fail (default criticality) -->
<resource oid="10000000-0000-0000-0000-000000000305"
xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<name>Dummy Resource Black</name>
<connectorRef type="c:ConnectorType">
<filter>
<q:and>
<q:equal>
<q:path>connectorType</q:path>
<q:value>com.evolveum.icf.dummy.connector.DummyConnector</q:value>
</q:equal>
<q:equal>
<q:path>connectorVersion</q:path>
<q:value>2.0</q:value>
</q:equal>
</q:and>
</filter>
</connectorRef>
<connectorConfiguration xmlns:icfi="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/com.evolveum.icf.dummy/com.evolveum.icf.dummy.connector.DummyConnector"
xmlns:icfc="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-3">
<icfc:configurationProperties>
<icfi:instanceId>black</icfi:instanceId>
<icfi:supportValidity>true</icfi:supportValidity>
<icfi:addConnectorStateAttributes>true</icfi:addConnectorStateAttributes>
</icfc:configurationProperties>
</connectorConfiguration>
<schemaHandling>
<objectType>
<kind>account</kind>
<intent>default</intent>
<displayName>Default Account</displayName>
<default>true</default>
<objectClass>ri:AccountObjectClass</objectClass>
<attribute>
<ref>icfs:name</ref>
<displayName>Username</displayName>
<outbound>
<strength>weak</strength>
<source>
<path>name</path>
</source>
<expression>
<script>
<code>name + iterationToken</code>
</script>
</expression>
</outbound>
<inbound>
<target>
<path>$user/name</path>
</target>
</inbound>
</attribute>
<attribute>
<ref>icfs:uid</ref>
<displayName>UID</displayName>
</attribute>
<attribute>
<ref>ri:fullname</ref>
<displayName>Full Name</displayName>
<outbound>
<strength>weak</strength>
<source>
<path>$user/fullName</path>
</source>
</outbound>
<inbound>
<strength>weak</strength>
<target>
<path>$user/fullName</path>
</target>
</inbound>
</attribute>
<attribute>
<ref>ri:ship</ref>
<displayName>Ship</displayName>
<outbound>
<strength>weak</strength>
<source>
<path>$user/organizationalUnit</path>
</source>
</outbound>
</attribute>
<attribute>
<ref>ri:quote</ref>
<displayName>Quote</displayName>
<tolerantValuePattern>^res-.*</tolerantValuePattern>
<intolerantValuePattern>^.*</intolerantValuePattern>
<outbound>
<strength>weak</strength>
<source>
<path>$user/description</path>
</source>
</outbound>
</attribute>
<attribute>
<ref>ri:drink</ref>
<displayName>Drink</displayName>
<tolerant>false</tolerant>
<outbound>
<strength>strong</strength>
<expression>
<value>rum</value>
</expression>
</outbound>
</attribute>
<attribute>
<ref>ri:gossip</ref>
<displayName>Gossip</displayName>
<tolerant>true</tolerant>
<intolerantValuePattern>^gossip-.*</intolerantValuePattern>
<outbound>
<strength>strong</strength>
<source>
<path>$user/employeeNumber</path>
</source>
</outbound>
</attribute>
<iteration>
<maxIterations>5</maxIterations>
</iteration>
<activation>
<administrativeStatus>
<outbound>
<expression>
<asIs/>
</expression>
</outbound>
</administrativeStatus>
<validFrom>
<outbound>
<expression>
<asIs/>
</expression>
</outbound>
</validFrom>
<validTo>
<outbound>
<expression>
<asIs/>
</expression>
</outbound>
</validTo>
</activation>
<credentials>
<password>
<outbound/>
<!-- MID-3682 -->
<passwordPolicyRef oid="ed8026dc-569a-11e7-abdf-4fce56706755"/> <!-- Benevolent password policy -->
</password>
</credentials>
</objectType>
</schemaHandling>
<scripts>
<script>
<host>resource</host>
<language>powerfail</language>
<argument>
<script>
<code>user?.getEmployeeNumber()</code>
</script>
<name>error</name>
</argument>
<code>operation:add/after</code>
<operation>add</operation>
<kind>account</kind>
<order>after</order>
</script>
<script>
<host>resource</host>
<language>powerfail</language>
<argument>
<script>
<code>user?.getEmployeeNumber()</code>
</script>
<name>error</name>
</argument>
<code>operation:modify/after</code>
<operation>modify</operation>
<kind>account</kind>
<order>after</order>
</script>
<script>
<host>resource</host>
<language>powerfail</language>
<argument>
<script>
<code>user?.getEmployeeNumber()</code>
</script>
<name>error</name>
</argument>
<code>operation:delete/after</code>
<operation>delete</operation>
<kind>account</kind>
<order>after</order>
</script>
</scripts>
<consistency>
<!-- MID-3682 -->
<connectorErrorCriticality>
<network>partial</network>
<schema>partial</schema>
</connectorErrorCriticality>
</consistency>
<synchronization>
<objectSynchronization>
<enabled>true</enabled>
<correlation>
<q:equal>
<q:path>c:name</q:path>
<expression>
<script>
<code>
basic.getAttributeValue(account,
'http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3', 'name')
</code>
</script>
</expression>
</q:equal>
</correlation>
<reaction>
<situation>linked</situation>
<action><handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#modifyUser</handlerUri></action>
</reaction>
<reaction>
<situation>deleted</situation>
<action><handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlinkAccount</handlerUri></action>
</reaction>
<reaction>
<situation>unlinked</situation>
<action><handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#linkAccount</handlerUri></action>
</reaction>
<reaction>
<situation>unmatched</situation>
<channel>http://midpoint.evolveum.com/xml/ns/public/provisioning/channels-3#import</channel>
<action><handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#addUser</handlerUri></action>
</reaction>
</objectSynchronization>
</synchronization>
</resource>