/
resource.xml
165 lines (153 loc) · 7.61 KB
/
resource.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
<?xml version="1.0" encoding="UTF-8"?>
<objects xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
xmlns:mr="http://prism.evolveum.com/xml/ns/public/matching-rule-3">
<resource oid="275ea738-5bb6-40ce-96fb-5941dbbc6bb5">
<name>Confluence WIKI profile picture Scripted REST</name>
<description>Example resource to ONLY push profile picture (avatar) to Atlassian Confluence (wiki)
over JSON-RPC API (https://developer.atlassian.com/confdev/confluence-rest-api/confluence-json-rpc-apis).
Now default.png we need to have in icf-connectors to correctly remove profile picture.
</description>
<connectorRef type="ConnectorType">
<filter>
<q:equal>
<q:path>c:connectorType</q:path>
<q:value>org.forgerock.openicf.connectors.scriptedrest.ScriptedRESTConnector</q:value>
</q:equal>
</filter>
</connectorRef>
<connectorConfiguration
xmlns:icfc="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-3">
<icfc:configurationProperties
xmlns:icscscriptedrest="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/org.forgerock.openicf.connectors.scriptedrest-connector/org.forgerock.openicf.connectors.scriptedrest.ScriptedRESTConnector">
<icscscriptedrest:login>admin</icscscriptedrest:login>
<icscscriptedrest:password>
<clearValue>secret</clearValue>
</icscscriptedrest:password>
<icscscriptedrest:endPoint>https://wiki.evolveum.com/rpc/json-rpc/confluenceservice-v2/</icscscriptedrest:endPoint>
<icscscriptedrest:reloadScriptOnExecution>true</icscscriptedrest:reloadScriptOnExecution>
<icscscriptedrest:defaultContentType>JSON</icscscriptedrest:defaultContentType>
<icscscriptedrest:defaultAuthMethod>BASIC_PREEMPTIVE</icscscriptedrest:defaultAuthMethod>
<!--<icscscriptedrest:basePath>something</icscscriptedrest:basePath>-->
<icscscriptedrest:testScriptFileName>TestScript.groovy</icscscriptedrest:testScriptFileName>
<icscscriptedrest:schemaScriptFileName>SchemaScript.groovy</icscscriptedrest:schemaScriptFileName>
<icscscriptedrest:createScriptFileName>CreateScript.groovy</icscscriptedrest:createScriptFileName>
<icscscriptedrest:deleteScriptFileName>DeleteScript.groovy</icscscriptedrest:deleteScriptFileName>
<icscscriptedrest:updateScriptFileName>UpdateScript.groovy</icscscriptedrest:updateScriptFileName>
<icscscriptedrest:searchScriptFileName>SearchScript.groovy</icscscriptedrest:searchScriptFileName>
</icfc:configurationProperties>
</connectorConfiguration>
<schemaHandling>
<objectType>
<kind>account</kind>
<intent>account</intent>
<displayName>Default Account</displayName>
<default>true</default>
<objectClass>ri:AccountObjectClass</objectClass>
<attribute>
<c:ref>icfs:name</c:ref>
<displayName>userName</displayName>
<limitations>
<minOccurs>0</minOccurs>
</limitations>
<matchingRule>mr:stringIgnoreCase</matchingRule>
<inbound>
<strength>normal</strength>
<target>
<c:path>$user/name</c:path>
</target>
</inbound>
<!-- to detect existing users as AlreadyExistsException over CreateScript -->
<outbound>
<strength>normal</strength>
<source>
<c:path>$user/name</c:path>
</source>
</outbound>
</attribute>
<attribute>
<c:ref>ri:avatar</c:ref>
<displayName>avatar</displayName>
<limitations>
<minOccurs>0</minOccurs>
</limitations>
<outbound>
<strength>normal</strength>
<source>
<c:path>$user/jpegPhoto</c:path>
</source>
</outbound>
</attribute>
<protected>
<icfs:name>admin</icfs:name>
</protected>
</objectType>
</schemaHandling>
<capabilities>
<cachingMetadata>
<retrievalTimestamp>2015-06-20T07:52:41.912+02:00</retrievalTimestamp>
<serialNumber>ea50ed1821e1d1f6-d9905c941fb779e1</serialNumber>
</cachingMetadata>
<native xmlns:cap="http://midpoint.evolveum.com/xml/ns/public/resource/capabilities-3">
<cap:addRemoveAttributeValues/>
<cap:credentials>
<cap:password>
<cap:returnedByDefault>false</cap:returnedByDefault>
</cap:password>
</cap:credentials>
<cap:liveSync/>
<cap:testConnection/>
<cap:create/>
<cap:read/>
<cap:update/>
<cap:delete/>
<cap:script>
<cap:host>
<cap:type>connector</cap:type>
</cap:host>
</cap:script>
</native>
</capabilities>
<synchronization>
<objectSynchronization>
<kind>account</kind>
<intent>account</intent>
<enabled>true</enabled>
<correlation>
<q:equal>
<q:path>name</q:path>
<expression>
<c:path>$account/attributes/icfs:name</c:path>
</expression>
</q:equal>
</correlation>
<reaction>
<situation>linked</situation>
<synchronize>true</synchronize>
</reaction>
<reaction>
<situation>deleted</situation>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlink</handlerUri>
</action>
</reaction>
<reaction>
<situation>unlinked</situation>
<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>
</objects>