Hi,
are you sure that you are using the Scripted SQL connector?
The Database Table connector, in fact, only provides support for the __ACCOUNT__ ObjectClass, e.g. only for users, as suggested by the error below.

In order to use the Scripted SQL connector, you must also provide the adequate Groovy scripts matching your own database schema; some samples can be found under the

core/src/test/resources/scriptedsql

directory of your generated Maven project.

HTH
Regards.

On 27/02/2017 17:47, Tech wrote:

Hello,

coming back to this point: we prepared the code to integrate the group propagation from a DB to Syncope but we encountered some problems.

Before integrating the code that we developed, we started to add the concept of Group into our system.

  * Our database has a column called "role", where the only content is
    "GroupTest".
  * We created the group "GroupTest" also in Syncope to have a 1:1
    relation.
  * We created the type "role" and we put it into the "BaseGroup" schema.
  * We go back to the resources and we Edit provision rules, we add a
    Group that we map with name:role.

Since now on, every Pull, also the one for the Users, will terminate in a FAILURE with the error:

org.quartz.JobExecutionException: While pulling from connector [See nested exception: java.lang.IllegalArgumentException: Operation requires an Account ObjectClass.] at org.apache.syncope.core.provisioning.java.pushpull.PullJobDelegate.doExecuteProvisioning(PullJobDelegate.java:284) at org.apache.syncope.core.provisioning.java.pushpull.PullJobDelegate.doExecuteProvisioning(PullJobDelegate.java:60) at org.apache.syncope.core.provisioning.java.pushpull.AbstractProvisioningJobDelegate.doExecute(AbstractProvisioningJobDelegate.java:558) at org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate.execute(AbstractSchedTaskJobDelegate.java:96)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)


Removing the mapping of the group, everything will turn back to normality.

Any idea why this could happen?

Thanks!

On 06/02/17 17:58, Marco Di Sabatino Di Diodoro wrote:

Il 06/02/2017 17:41, Marco Di Sabatino Di Diodoro ha scritto:

Hi,


Il 06/02/2017 17:11, Tech ha scritto:

Dear experts,

we're pulling information from a database. We want to assign automatically a group to a user.

The original table has a format like

-- "USERNAME" : "user01"

-- "ROLE": "employee"


In a pull task is possible to add a template. The template can be used for setting default values on entities during a pull task. To configure a template go to Topology --> select the external resource to pull --> Pull Task and click the Template icon [1 Pull Templates].

[1] https://syncope.apache.org/docs/reference-guide.html#provisioning-pull

If a User is associated to a Group in your Database, and you like assign the corresponding User as a member of the corresponding Group in Syncope, you must implement a Pull Action [1]. Connid doesn't implement the assignment of a membership, so to obviate we can use a pull action.

[1] https://syncope.apache.org/docs/reference-guide.html#pullactions

We want the user being created into Syncope associated to the already existing group "employee", but we don't see how to create this association.

Is there any reference that we should check?

Thanks

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/

Reply via email to