You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@syncope.apache.org by Maarten Winkels <Ma...@iwelcome.com> on 2013/04/16 11:33:31 UTC
Usage of ConnId connector API
Hello,
We're currently developing a new connector with the connid framework. We run into some question on how the conn if connector API is used by Syncope.
Implementing and integrating the create method was very simple: We can see account being provisioned to the resource.
Question 1:
Syncope seems (however) not to use the delete method correctly if the connector doesn't implement the SearchOp interface: First the current data is requested using the search operation and ONLY if this returns a ConnectorObject the delete is executed. If the SearchOp is not implemented or returns NULL, Syncope silently ignores the delete operation.
<code location="org.apache.syncope.core.propagation.impl.AbstractPropagationTaskExecutor:287">
// Try to read remote object (user / group) BEFORE any actual operation
beforeObj = getRemoteObject(task, connector, false);
</code>
<code location="org.apache.syncope.core.propagation.impl.AbstractPropagationTaskExecutor:234">
if (beforeObj == null) {
LOG.debug("{} not found on external resource: ignoring delete", task.getAccountId());
} else {...
</code>
Can this behaviour be configured?
Question 2:
The resource assigns it's own id's, based on the location of the account in the tree. The connector returns the created ID as a Uid to Syncope. When deleting the account from Syncope, the assigned Uid is not used, but only the "Syncope-ID" is provided to the connector to delete the account.
How should the connector retrieve the assigned ID?
Thanks in advance!
Maarten Winkels | IWelcome BV
Wiersedreef 5-7
3433 ZX Nieuwegein
The Netherlands
Tel: +31 (0) 30 6592254
Mob. +31 (0) 6 10038878
Email: maarten.winkels@iwelcome.com
Website: http://www.iwelcome.com
The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Internet email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing Everett terms of business or client engagement letter.
Re: Am I missing something?
Posted by Francesco Chicchiriccò <il...@apache.org>.
On 19/04/2013 17:06, Nik wrote:
> Thanks Francesco.
>
> I guess I'm obliged to use this persistence method to keep my new data.
>
> I have noticed a drop in performance when I do this change (expected
> but this is very noticeable).
> Is there anyway of getting back to the great perf of the in memory h2
> or is this the price to pay for
> persistence?
I have updated today the wiki page [2]: in order to improve performance
you should use
jpa.url=jdbc:h2:syncopedb;DB_CLOSE_DELAY=-1
> Also, one puzzle for me (perhaps it is available through hard coding
> data at compile time - a guess).
> When the syncope standalone1.1.0 is used out of the box there is
> persistence for the data it
> comes with, obviously, my second thought is it should be possible to
> somehow get new data out of volatile
> memory to some sort of cache file (so you don't lose data when you
> stop the tomcat because it is written to a cache).
> On restart of the tomcat the syncope can read this cache back into
> volatile memory and hence you keep the great
> perf - I'm sure you have thought of this?
This shouldn't be necessary if you use the URL reported above.
Anyway, there is an export / import mechanism for internal storage
component and a wiki page that's just waiting to be written... (see
SYNCOPE-126 [3]).
Regards.
>> On 18/04/2013 10:40, Nik wrote:
>>> Hi Guys,
>>>
>>> Call me a twit, if I missed something, obvious ;-)
>>
>> Hi Nik,
>> first of all, you are right, what you have found below is true:
>> in-memory H2 lasts until Tomcat is running.
>>
>> There has recently been a discussion around this [1], that should
>> have resulted in updating [2], not yet done.
>>
>> I am sorry for not making this clear from the documentation: I will
>> try to update [2] with
>> 1. warning about the volatile persistence
>> 2. instructions about how to turn the H2 configuration into
>> something persistent
>>
>> Basically, it is enough to replace
>>
>> jpa.url=jdbc:h2:mem:syncopedb;DB_CLOSE_DELAY=-1
>>
>> with
>>
>> jpa.url=jdbc:h2:syncopedb
>>
>> in $CATALINA_HOME/webapps/syncope/WEB-INF/classes/persistence.properties
>>
>> I'll keep you posted.
>> Regards.
>>
>> P.S. Please don't hijack other e-mail threads (e.g. reply to existing
>> e-mails, change subject and body) otherwise our mailing list archives
>> will go crazy :-)
>>
>> [1] http://markmail.org/message/o326pp3bioxigl5f
>> [2]
>> https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+standalone+distribution
[3] https://issues.apache.org/jira/browse/SYNCOPE-126
--
Francesco Chicchiriccò
ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/
Re: Am I missing something?
Posted by Nik <ni...@usharesoft.com>.
Thanks Francesco.
I guess I'm obliged to use this persistence method to keep my new data.
I have noticed a drop in performance when I do this change (expected but
this is very noticeable).
Is there anyway of getting back to the great perf of the in memory h2 or
is this the price to pay for
persistence?
Also, one puzzle for me (perhaps it is available through hard coding
data at compile time - a guess).
When the syncope standalone1.1.0 is used out of the box there is
persistence for the data it
comes with, obviously, my second thought is it should be possible to
somehow get new data out of volatile
memory to some sort of cache file (so you don't lose data when you stop
the tomcat because it is written to a cache).
On restart of the tomcat the syncope can read this cache back into
volatile memory and hence you keep the great
perf - I'm sure you have thought of this?
rgds,
Nik
> On 18/04/2013 10:40, Nik wrote:
>> Hi Guys,
>>
>> Call me a twit, if I missed something, obvious ;-)
>
> Hi Nik,
> first of all, you are right, what you have found below is true:
> in-memory H2 lasts until Tomcat is running.
>
> There has recently been a discussion around this [1], that should have
> resulted in updating [2], not yet done.
>
> I am sorry for not making this clear from the documentation: I will
> try to update [2] with
> 1. warning about the volatile persistence
> 2. instructions about how to turn the H2 configuration into something
> persistent
>
> Basically, it is enough to replace
>
> jpa.url=jdbc:h2:mem:syncopedb;DB_CLOSE_DELAY=-1
>
> with
>
> jpa.url=jdbc:h2:syncopedb
>
> in $CATALINA_HOME/webapps/syncope/WEB-INF/classes/persistence.properties
>
> I'll keep you posted.
> Regards.
>
> P.S. Please don't hijack other e-mail threads (e.g. reply to existing
> e-mails, change subject and body) otherwise our mailing list archives
> will go crazy :-)
>
> [1] http://markmail.org/message/o326pp3bioxigl5f
> [2]
> https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+standalone+distribution
>
>> I installed a standalone 1.1.0 syncope distro - was very impressed.
>> Started to link it up to my
>> own ldap service (after downloading an ldap connector and installing
>> it as described in the doc).
>>
>> Made quick progress in learning some of the details of how to set-up
>> ldap resources/connectors, got a bit stuck
>> with how to get roles propagated through to the ldap server (doc is
>> not on this, at least for opendj requirements).
>> Followed the advice from this users group to follow my nose instead
>> of asking questions too soon.
>>
>> Noticed that there was a apache ldap resource example already. Used
>> this as a comparison model (resource) to get IDM role propagation to
>> my ldap server (resource/connector working - didn't succeed yet, but
>> worked out that a syncope define IDM role gets propagated at the time
>> of the "save" of a (new) user to your remote resource ldap, after you
>> assign that role to the user (still have to
>> work to do to work out what ldap attributes to set up in the
>> connector and how to enable that the get propagated to the ldap to
>> create a group of the same "name" as the role in the backend
>> ou=groups,o=isp for example, cn=propagatednewrole,ou=groups,o=isp).
>>
>> ***So to cut this long story short*** I decided the restart my tomcat
>> and whoosh all my resource and connector work was lost! I'm
>> guessing 1) I have not done something right to save it or 2) this is
>> a side effect of a demo distro that stores data in H2 ram memory
>> without syncing it to some sort of persistent storage? Can you please
>> help me with this as I'm re-doing all my work of the last 3 days
>> now from scratch :-( and would not like to have it disappear if I
>> clear my volatile memory.
>
Re: Am I missing something?
Posted by Francesco Chicchiriccò <il...@apache.org>.
On 18/04/2013 10:40, Nik wrote:
> Hi Guys,
>
> Call me a twit, if I missed something, obvious ;-)
Hi Nik,
first of all, you are right, what you have found below is true:
in-memory H2 lasts until Tomcat is running.
There has recently been a discussion around this [1], that should have
resulted in updating [2], not yet done.
I am sorry for not making this clear from the documentation: I will try
to update [2] with
1. warning about the volatile persistence
2. instructions about how to turn the H2 configuration into something
persistent
Basically, it is enough to replace
jpa.url=jdbc:h2:mem:syncopedb;DB_CLOSE_DELAY=-1
with
jpa.url=jdbc:h2:syncopedb
in $CATALINA_HOME/webapps/syncope/WEB-INF/classes/persistence.properties
I'll keep you posted.
Regards.
P.S. Please don't hijack other e-mail threads (e.g. reply to existing
e-mails, change subject and body) otherwise our mailing list archives
will go crazy :-)
[1] http://markmail.org/message/o326pp3bioxigl5f
[2]
https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+standalone+distribution
> I installed a standalone 1.1.0 syncope distro - was very impressed.
> Started to link it up to my
> own ldap service (after downloading an ldap connector and installing
> it as described in the doc).
>
> Made quick progress in learning some of the details of how to set-up
> ldap resources/connectors, got a bit stuck
> with how to get roles propagated through to the ldap server (doc is
> not on this, at least for opendj requirements).
> Followed the advice from this users group to follow my nose instead of
> asking questions too soon.
>
> Noticed that there was a apache ldap resource example already. Used
> this as a comparison model (resource) to get IDM role propagation to
> my ldap server (resource/connector working - didn't succeed yet, but
> worked out that a syncope define IDM role gets propagated at the time
> of the "save" of a (new) user to your remote resource ldap, after you
> assign that role to the user (still have to
> work to do to work out what ldap attributes to set up in the connector
> and how to enable that the get propagated to the ldap to create a
> group of the same "name" as the role in the backend ou=groups,o=isp
> for example, cn=propagatednewrole,ou=groups,o=isp).
>
> ***So to cut this long story short*** I decided the restart my tomcat
> and whoosh all my resource and connector work was lost! I'm
> guessing 1) I have not done something right to save it or 2) this is a
> side effect of a demo distro that stores data in H2 ram memory
> without syncing it to some sort of persistent storage? Can you please
> help me with this as I'm re-doing all my work of the last 3 days
> now from scratch :-( and would not like to have it disappear if I
> clear my volatile memory.
--
Francesco Chicchiriccò
ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/
Am I missing something?
Posted by Nik <ni...@usharesoft.com>.
Hi Guys,
Call me a twit, if I missed something, obvious ;-)
I installed a standalone 1.1.0 syncope distro - was very impressed.
Started to link it up to my
own ldap service (after downloading an ldap connector and installing it
as described in the doc).
Made quick progress in learning some of the details of how to set-up
ldap resources/connectors, got a bit stuck
with how to get roles propagated through to the ldap server (doc is not
on this, at least for opendj requirements).
Followed the advice from this users group to follow my nose instead of
asking questions too soon.
Noticed that there was a apache ldap resource example already. Used this
as a comparison model (resource) to get IDM role propagation to my ldap
server (resource/connector working - didn't succeed yet, but worked out
that a syncope define IDM role gets propagated at the time of the "save"
of a (new) user to your remote resource ldap, after you assign that role
to the user (still have to
work to do to work out what ldap attributes to set up in the connector
and how to enable that the get propagated to the ldap to create a group
of the same "name" as the role in the backend ou=groups,o=isp for
example, cn=propagatednewrole,ou=groups,o=isp).
***So to cut this long story short*** I decided the restart my tomcat
and whoosh all my resource and connector work was lost! I'm
guessing 1) I have not done something right to save it or 2) this is a
side effect of a demo distro that stores data in H2 ram memory
without syncing it to some sort of persistent storage? Can you please
help me with this as I'm re-doing all my work of the last 3 days
now from scratch :-( and would not like to have it disappear if I clear
my volatile memory.
rgds,
Nik
Re: Usage of ConnId connector API
Posted by Fabio Martelli <fa...@gmail.com>.
Maarten Winkels <ma...@iwelcome.com> ha scritto:
>Hi Fabio
>
>@1: How can I map it to an item? It is the result of the create method
>and not available as a field in the schema of the resource. Is there a
>way to map the result of the create method?
Please, provide a mapping example of your configuration (or a screenshot) in order to be able to provide you a precise answer/tips.
>@2: Does that mean that Syncope doesn't work with resource assigned
>ids? I would need the id the resource assigned to be able to delete the
>account, not the is Syncope has assigned.
No it doesn't. Your issue is just a mapping problem. As per 1, please let me have your use case in order to be of your help.
>
>Cheers!
>
>-Maarten Winkels
>
>On Apr 16, 2013, at 4:03 PM, Fabio Martelli <fa...@gmail.com>
>wrote:
>
>>
>> Il giorno 16/apr/2013, alle ore 15.41, Maarten Winkels ha scritto:
>>
>>> Hi Fabio,
>>>
>>> Thanks for your reply.
>>>
>>> I think I have a number of very basic questions on how syncope works
>with the connector:
>>> 1. Is Uid, that is created by the connector when the Account is
>created, stored by Syncope? Can I make Syncope pass it to the delete
>operation when that Account is deleted?
>> It have to be a mapping item.
>>> 2. How does the accountLink property work with creating/deleting
>Accounts? I understand that the __NAME__ attribute will be filled with
>the evaluated accountLink and the __UID__ with the AccountId (which is
>configured in the mapping).
>> __UID__ will be used during dele and update to resolve user/group
>>> 3. Should I store the Syncope ID in the resource as a separate
>field, to be able to search the resource on it?
>> not necessary
>>>
>>> Thanks!
>>>
>>> Maarten Winkels | IWelcome BV
>>>
>>> Wiersedreef 5-7
>>> 3433 ZX Nieuwegein
>>> The Netherlands
>>>
>>> Tel: +31 (0) 30 6592254
>>> Mob. +31 (0) 6 10038878
>>> Email: maarten.winkels@iwelcome.com
>>> Website: http://www.iwelcome.com
>>>
>>> <iWelcome Signature - ISO.jpg>
>>>
>>>
>>>
>>> The information in this Internet email is confidential and may be
>legally privileged. It is intended solely for the addressee. Access to
>this Internet email by anyone else is unauthorised. If you are not the
>intended recipient, any disclosure, copying, distribution or any action
>taken or omitted to be taken in reliance on it is prohibited and may be
>unlawful. When addressed to our clients any opinions or advice
>contained in this Internet email are subject to the terms and
>conditions expressed in any applicable governing Everett terms of
>business or client engagement letter.
>>>
>>>
>>>
>>> On Apr 16, 2013, at 2:38 PM, Fabio Martelli
><fa...@gmail.com> wrote:
>>>
>>>>
>>>> Il giorno 16/apr/2013, alle ore 11.33, Maarten Winkels ha scritto:
>>>>
>>>>> Hello,
>>>>>
>>>>> We're currently developing a new connector with the connid
>framework. We run into some question on how the conn if connector API
>is used by Syncope.
>>>>>
>>>>> Implementing and integrating the create method was very simple: We
>can see account being provisioned to the resource.
>>>>>
>>>>> Question 1:
>>>>> Syncope seems (however) not to use the delete method correctly if
>the connector doesn't implement the SearchOp interface: First the
>current data is requested using the search operation and ONLY if this
>returns a ConnectorObject the delete is executed. If the SearchOp is
>not implemented or returns NULL, Syncope silently ignores the delete
>operation.
>>>>
>>>> Hi Maarten, yes this is the current behavior: Syncope search for
>user (collect profile), then remove it if exists, and search again
>(collect new profile - empty if deleted).
>>>> The two searches are currently used to report differences between
>before and after op.
>>>>>
>>>>> <code
>location="org.apache.syncope.core.propagation.impl.AbstractPropagationTaskExecutor:287">
>>>>> // Try to read remote object (user / group) BEFORE any
>actual operation
>>>>> beforeObj = getRemoteObject(task, connector, false);
>>>>> </code>
>>>>>
>>>>> <code
>location="org.apache.syncope.core.propagation.impl.AbstractPropagationTaskExecutor:234">
>>>>> if (beforeObj == null) {
>>>>> LOG.debug("{} not found on external resource: ignoring
>delete", task.getAccountId());
>>>>> } else {...
>>>>> </code>
>>>>>
>>>>> Can this behaviour be configured?
>>>>
>>>> This behavior cannot be cunfigured. You can change it only
>overriding methods.
>>>>
>>>>>
>>>>> Question 2:
>>>>> The resource assigns it's own id's, based on the location of the
>account in the tree. The connector returns the created ID as a Uid to
>Syncope. When deleting the account from Syncope, the assigned Uid is
>not used, but only the "Syncope-ID" is provided to the connector to
>delete the account.
>>>>> How should the connector retrieve the assigned ID?
>>>>
>>>> This is a configuration error: accountLink (if not empty) or
>AccountId (if accountLink is empty) will always used as __NAME__
>attribute; __UID__ attribute will be propagated with AccountId value.
>>>>
>>>> Regards,
>>>> F.
>>>
>>
-- Inviato dal mio cellulare Android con K-9 Mail.
Re: Usage of ConnId connector API
Posted by Maarten Winkels <ma...@iwelcome.com>.
Hi Fabio
@1: How can I map it to an item? It is the result of the create method and not available as a field in the schema of the resource. Is there a way to map the result of the create method?
@2: Does that mean that Syncope doesn't work with resource assigned ids? I would need the id the resource assigned to be able to delete the account, not the is Syncope has assigned.
Cheers!
-Maarten Winkels
On Apr 16, 2013, at 4:03 PM, Fabio Martelli <fa...@gmail.com> wrote:
>
> Il giorno 16/apr/2013, alle ore 15.41, Maarten Winkels ha scritto:
>
>> Hi Fabio,
>>
>> Thanks for your reply.
>>
>> I think I have a number of very basic questions on how syncope works with the connector:
>> 1. Is Uid, that is created by the connector when the Account is created, stored by Syncope? Can I make Syncope pass it to the delete operation when that Account is deleted?
> It have to be a mapping item.
>> 2. How does the accountLink property work with creating/deleting Accounts? I understand that the __NAME__ attribute will be filled with the evaluated accountLink and the __UID__ with the AccountId (which is configured in the mapping).
> __UID__ will be used during dele and update to resolve user/group
>> 3. Should I store the Syncope ID in the resource as a separate field, to be able to search the resource on it?
> not necessary
>>
>> Thanks!
>>
>> Maarten Winkels | IWelcome BV
>>
>> Wiersedreef 5-7
>> 3433 ZX Nieuwegein
>> The Netherlands
>>
>> Tel: +31 (0) 30 6592254
>> Mob. +31 (0) 6 10038878
>> Email: maarten.winkels@iwelcome.com
>> Website: http://www.iwelcome.com
>>
>> <iWelcome Signature - ISO.jpg>
>>
>>
>>
>> The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Internet email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing Everett terms of business or client engagement letter.
>>
>>
>>
>> On Apr 16, 2013, at 2:38 PM, Fabio Martelli <fa...@gmail.com> wrote:
>>
>>>
>>> Il giorno 16/apr/2013, alle ore 11.33, Maarten Winkels ha scritto:
>>>
>>>> Hello,
>>>>
>>>> We're currently developing a new connector with the connid framework. We run into some question on how the conn if connector API is used by Syncope.
>>>>
>>>> Implementing and integrating the create method was very simple: We can see account being provisioned to the resource.
>>>>
>>>> Question 1:
>>>> Syncope seems (however) not to use the delete method correctly if the connector doesn't implement the SearchOp interface: First the current data is requested using the search operation and ONLY if this returns a ConnectorObject the delete is executed. If the SearchOp is not implemented or returns NULL, Syncope silently ignores the delete operation.
>>>
>>> Hi Maarten, yes this is the current behavior: Syncope search for user (collect profile), then remove it if exists, and search again (collect new profile - empty if deleted).
>>> The two searches are currently used to report differences between before and after op.
>>>>
>>>> <code location="org.apache.syncope.core.propagation.impl.AbstractPropagationTaskExecutor:287">
>>>> // Try to read remote object (user / group) BEFORE any actual operation
>>>> beforeObj = getRemoteObject(task, connector, false);
>>>> </code>
>>>>
>>>> <code location="org.apache.syncope.core.propagation.impl.AbstractPropagationTaskExecutor:234">
>>>> if (beforeObj == null) {
>>>> LOG.debug("{} not found on external resource: ignoring delete", task.getAccountId());
>>>> } else {...
>>>> </code>
>>>>
>>>> Can this behaviour be configured?
>>>
>>> This behavior cannot be cunfigured. You can change it only overriding methods.
>>>
>>>>
>>>> Question 2:
>>>> The resource assigns it's own id's, based on the location of the account in the tree. The connector returns the created ID as a Uid to Syncope. When deleting the account from Syncope, the assigned Uid is not used, but only the "Syncope-ID" is provided to the connector to delete the account.
>>>> How should the connector retrieve the assigned ID?
>>>
>>> This is a configuration error: accountLink (if not empty) or AccountId (if accountLink is empty) will always used as __NAME__ attribute; __UID__ attribute will be propagated with AccountId value.
>>>
>>> Regards,
>>> F.
>>
>
Re: Usage of ConnId connector API
Posted by Fabio Martelli <fa...@gmail.com>.
Il giorno 16/apr/2013, alle ore 15.41, Maarten Winkels ha scritto:
> Hi Fabio,
>
> Thanks for your reply.
>
> I think I have a number of very basic questions on how syncope works with the connector:
> 1. Is Uid, that is created by the connector when the Account is created, stored by Syncope? Can I make Syncope pass it to the delete operation when that Account is deleted?
It have to be a mapping item.
> 2. How does the accountLink property work with creating/deleting Accounts? I understand that the __NAME__ attribute will be filled with the evaluated accountLink and the __UID__ with the AccountId (which is configured in the mapping).
__UID__ will be used during dele and update to resolve user/group
> 3. Should I store the Syncope ID in the resource as a separate field, to be able to search the resource on it?
not necessary
>
> Thanks!
>
> Maarten Winkels | IWelcome BV
>
> Wiersedreef 5-7
> 3433 ZX Nieuwegein
> The Netherlands
>
> Tel: +31 (0) 30 6592254
> Mob. +31 (0) 6 10038878
> Email: maarten.winkels@iwelcome.com
> Website: http://www.iwelcome.com
>
> <iWelcome Signature - ISO.jpg>
>
>
>
> The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Internet email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing Everett terms of business or client engagement letter.
>
>
>
> On Apr 16, 2013, at 2:38 PM, Fabio Martelli <fa...@gmail.com> wrote:
>
>>
>> Il giorno 16/apr/2013, alle ore 11.33, Maarten Winkels ha scritto:
>>
>>> Hello,
>>>
>>> We're currently developing a new connector with the connid framework. We run into some question on how the conn if connector API is used by Syncope.
>>>
>>> Implementing and integrating the create method was very simple: We can see account being provisioned to the resource.
>>>
>>> Question 1:
>>> Syncope seems (however) not to use the delete method correctly if the connector doesn't implement the SearchOp interface: First the current data is requested using the search operation and ONLY if this returns a ConnectorObject the delete is executed. If the SearchOp is not implemented or returns NULL, Syncope silently ignores the delete operation.
>>
>> Hi Maarten, yes this is the current behavior: Syncope search for user (collect profile), then remove it if exists, and search again (collect new profile - empty if deleted).
>> The two searches are currently used to report differences between before and after op.
>>>
>>> <code location="org.apache.syncope.core.propagation.impl.AbstractPropagationTaskExecutor:287">
>>> // Try to read remote object (user / group) BEFORE any actual operation
>>> beforeObj = getRemoteObject(task, connector, false);
>>> </code>
>>>
>>> <code location="org.apache.syncope.core.propagation.impl.AbstractPropagationTaskExecutor:234">
>>> if (beforeObj == null) {
>>> LOG.debug("{} not found on external resource: ignoring delete", task.getAccountId());
>>> } else {...
>>> </code>
>>>
>>> Can this behaviour be configured?
>>
>> This behavior cannot be cunfigured. You can change it only overriding methods.
>>
>>>
>>> Question 2:
>>> The resource assigns it's own id's, based on the location of the account in the tree. The connector returns the created ID as a Uid to Syncope. When deleting the account from Syncope, the assigned Uid is not used, but only the "Syncope-ID" is provided to the connector to delete the account.
>>> How should the connector retrieve the assigned ID?
>>
>> This is a configuration error: accountLink (if not empty) or AccountId (if accountLink is empty) will always used as __NAME__ attribute; __UID__ attribute will be propagated with AccountId value.
>>
>> Regards,
>> F.
>
Re: Usage of ConnId connector API
Posted by Maarten Winkels <ma...@iwelcome.com>.
Hi Fabio,
Thanks for your reply.
I think I have a number of very basic questions on how syncope works with the connector:
1. Is Uid, that is created by the connector when the Account is created, stored by Syncope? Can I make Syncope pass it to the delete operation when that Account is deleted?
2. How does the accountLink property work with creating/deleting Accounts? I understand that the __NAME__ attribute will be filled with the evaluated accountLink and the __UID__ with the AccountId (which is configured in the mapping).
3. Should I store the Syncope ID in the resource as a separate field, to be able to search the resource on it?
Thanks!
Maarten Winkels | IWelcome BV
Wiersedreef 5-7
3433 ZX Nieuwegein
The Netherlands
Tel: +31 (0) 30 6592254
Mob. +31 (0) 6 10038878
Email: maarten.winkels@iwelcome.com
Website: http://www.iwelcome.com
The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Internet email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing Everett terms of business or client engagement letter.
On Apr 16, 2013, at 2:38 PM, Fabio Martelli <fa...@gmail.com> wrote:
>
> Il giorno 16/apr/2013, alle ore 11.33, Maarten Winkels ha scritto:
>
>> Hello,
>>
>> We're currently developing a new connector with the connid framework. We run into some question on how the conn if connector API is used by Syncope.
>>
>> Implementing and integrating the create method was very simple: We can see account being provisioned to the resource.
>>
>> Question 1:
>> Syncope seems (however) not to use the delete method correctly if the connector doesn't implement the SearchOp interface: First the current data is requested using the search operation and ONLY if this returns a ConnectorObject the delete is executed. If the SearchOp is not implemented or returns NULL, Syncope silently ignores the delete operation.
>
> Hi Maarten, yes this is the current behavior: Syncope search for user (collect profile), then remove it if exists, and search again (collect new profile - empty if deleted).
> The two searches are currently used to report differences between before and after op.
>>
>> <code location="org.apache.syncope.core.propagation.impl.AbstractPropagationTaskExecutor:287">
>> // Try to read remote object (user / group) BEFORE any actual operation
>> beforeObj = getRemoteObject(task, connector, false);
>> </code>
>>
>> <code location="org.apache.syncope.core.propagation.impl.AbstractPropagationTaskExecutor:234">
>> if (beforeObj == null) {
>> LOG.debug("{} not found on external resource: ignoring delete", task.getAccountId());
>> } else {...
>> </code>
>>
>> Can this behaviour be configured?
>
> This behavior cannot be cunfigured. You can change it only overriding methods.
>
>>
>> Question 2:
>> The resource assigns it's own id's, based on the location of the account in the tree. The connector returns the created ID as a Uid to Syncope. When deleting the account from Syncope, the assigned Uid is not used, but only the "Syncope-ID" is provided to the connector to delete the account.
>> How should the connector retrieve the assigned ID?
>
> This is a configuration error: accountLink (if not empty) or AccountId (if accountLink is empty) will always used as __NAME__ attribute; __UID__ attribute will be propagated with AccountId value.
>
> Regards,
> F.
Re: Usage of ConnId connector API
Posted by Fabio Martelli <fa...@gmail.com>.
Il giorno 16/apr/2013, alle ore 11.33, Maarten Winkels ha scritto:
> Hello,
>
> We're currently developing a new connector with the connid framework. We run into some question on how the conn if connector API is used by Syncope.
>
> Implementing and integrating the create method was very simple: We can see account being provisioned to the resource.
>
> Question 1:
> Syncope seems (however) not to use the delete method correctly if the connector doesn't implement the SearchOp interface: First the current data is requested using the search operation and ONLY if this returns a ConnectorObject the delete is executed. If the SearchOp is not implemented or returns NULL, Syncope silently ignores the delete operation.
Hi Maarten, yes this is the current behavior: Syncope search for user (collect profile), then remove it if exists, and search again (collect new profile - empty if deleted).
The two searches are currently used to report differences between before and after op.
>
> <code location="org.apache.syncope.core.propagation.impl.AbstractPropagationTaskExecutor:287">
> // Try to read remote object (user / group) BEFORE any actual operation
> beforeObj = getRemoteObject(task, connector, false);
> </code>
>
> <code location="org.apache.syncope.core.propagation.impl.AbstractPropagationTaskExecutor:234">
> if (beforeObj == null) {
> LOG.debug("{} not found on external resource: ignoring delete", task.getAccountId());
> } else {...
> </code>
>
> Can this behaviour be configured?
This behavior cannot be cunfigured. You can change it only overriding methods.
>
> Question 2:
> The resource assigns it's own id's, based on the location of the account in the tree. The connector returns the created ID as a Uid to Syncope. When deleting the account from Syncope, the assigned Uid is not used, but only the "Syncope-ID" is provided to the connector to delete the account.
> How should the connector retrieve the assigned ID?
This is a configuration error: accountLink (if not empty) or AccountId (if accountLink is empty) will always used as __NAME__ attribute; __UID__ attribute will be propagated with AccountId value.
Regards,
F.