Hi Mani Vellingiri,

AFAIK there is no reason why debian packages installation should not work with the same configuration as the standalone. I think that connectors location is not involved in your problem.



Il 22/09/2016 11:49, Mani, Vellingiri (Nokia - IN) ha scritto:

Hi Andrea,

Thanks a lot for your response.

We are able to do bulk user creation via CSV connector in standalone Syncope distribution.

As we cannot proceed with standalone version for deployment evaluation, now we are trying to replicate the configuration of CSV connector from standalone syncope to debian version and then check it works or not.

_When creating CSV connector:_

In syncope standalone, Location is: connid://testconnectorserver@localhost:4554

In debian syncope, Location is: file:/var/lib/apache-syncope/bundles/

***Location field in both standalone and debian version is read-only

So can I assume csv connector server is not required in debian environment ?

Can we use any absolute path like ‘/opt/csv-files’ for the ‘Source path*’ field during csv connector creation?


ConnID locations specify how to look for connector bundles (the jars). Please refer to [1], maybe that paragraph will clarify what I'm saying.
You can add whatever path to scan.

Regards,

Vellingiri


[1] http://syncope.apache.org/docs/reference-guide.html#configure-connid-locations

Best regards,
Andrea


*From:*andrea [mailto:andrea.patrice...@tirasa.net]
*Sent:* Thursday, September 22, 2016 1:33 PM
*To:* user@syncope.apache.org
*Subject:* Re: Syncope user creation from REST client

Hi Mani Vellingiri,

You could start from a working example to see a complete (and working) configuration of CSV connector.

You could run the standalone Syncope distribution and see how it works, please refer to [1] for Syncope <= 1.2 and to [2] for later versions. After running the tomcat, you'll find the console at http://localhost:9080/syncope-console/ <http://localhost:9080/syncope-console/>

You might also check logs to have hints about what's happening during tasks. To configure log levels please refer to [3] for Syncope <= 1.2 and [4] for later versions You will find logs for the standalone distribution into the log directory of the Apache Tomcat (core-*.log are very useful).

HTH,
Andrea

[1] https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+standalone+distribution
[2] http://syncope.apache.org/docs/getting-started.html#standalone
[3] https://cwiki.apache.org/confluence/display/SYNCOPE/Log+levels
[4] http://syncope.apache.org/docs/reference-guide.html

Il 20/09/2016 15:57, Mani, Vellingiri (Nokia - IN) ha scritto:

    Hi Francesco,

    Thanks for your suggestion.

    I tried the below steps to create users from .csv file.

    I could see pull tasks “execution status” are SUCCESS but I don’t
    find users are getting created in syncope. If any configuration is
    missed, please let me know.

    1.Verified csvdir bundle exists in /var/lib/apache-syncope/bundles/

    2.Created “/opt/csv-files/test.csv”

    _cat test.csv_

    username,testcolumn

    usr1,test

    3.From admin console, created csvdir connector instance with below
    values

    Display name=csv-conn

    Location=/var/lib/apache-syncope/bundles

    Bundle=net.tirasa.connid.bundles.csvdir

    Source path=/opt/csv-files [override selected]

    File mask=*.csv [override selected]

    Key column name=username

    Column names=testcolumn [override selected]

    Capabilities=CREATE

    *** other values are default

    4.Created csv resource with below values

    Key=csv-resource

    Connector=csv-conn

    Source path=/opt/csv-files [override selected]

    File mask=*.csv [override selected]

    Column names=testcolumn [override selected]

    *** other values are default

    5.Created pull task

    Name=pulltest

    Destination Realm=/

    Pull mode=FULL_RECONCILIATION

    Schedule=Every 5 minutes

    *** other values are default

    Regards,

    Vellingiri

    *From:*Francesco Chicchiriccò [mailto:ilgro...@apache.org]
    *Sent:* Monday, September 19, 2016 4:22 PM
    *To:* user@syncope.apache.org <mailto:user@syncope.apache.org>
    *Subject:* Re: Syncope user creation from REST client

    On 19/09/2016 12:49, Mani, Vellingiri (Nokia - IN) wrote:

        Ok.  I understand your response.

        > which is the source for these users?

        Actually, we have user information in text/excel file.
        Creating users manually is a difficult job. We don’t have
        external connector.


    You might want to consider the CSVDir connector:

    https://connid.atlassian.net/wiki/display/BASE/CSV+Directory

    You will need to play around a bit with its configuration, but it
    should work.

    Regards.



    *From:*Francesco Chicchiriccò [mailto:ilgro...@apache.org]
    *Sent:* Monday, September 19, 2016 4:00 PM
    *To:* user@syncope.apache.org <mailto:user@syncope.apache.org>
    *Subject:* Re: Syncope user creation from REST client

    On 19/09/2016 12:22, Mani, Vellingiri (Nokia - IN) wrote:

        Hi Francesco,

        I have a use case where I need to add thousands or more users
        in a single request.  i.e. bulk user creation.

        Is it possible in Syncope ?


    Bulk actions are available for the operations defined at [1] (see
    some samples at [2] under the "Delete several users at once"
    example) - which does not include create.

    Instead of bulk creating thousand users via REST, I would rather
    suggest to rely on some external connector: which is the source
    for these users? Can't they be pulled from DB / LDAP / ...?

    Regards.

    [1]
    
https://github.com/apache/syncope/blob/2_0_X/common/lib/src/main/java/org/apache/syncope/common/lib/to/BulkAction.java#L41-L46
    [2] http://syncope.apache.org/docs/reference-guide.html#client-library




    *From:*Francesco Chicchiriccò [mailto:ilgro...@apache.org]

    *Sent:*Monday, September 19, 2016 3:46 PM
    *To:* user@syncope.apache.org <mailto:user@syncope.apache.org>
    *Subject:* Re: Syncope user creation from REST client

    On 19/09/2016 12:15, Mani, Vellingiri (Nokia - IN) wrote:

        Thanks Francesco!!

        After adding username, it works.


    Glad it helped :-)
    Regards.





    *From:*Francesco Chicchiriccò [mailto:ilgro...@apache.org]
    *Sent:* Monday, September 19, 2016 3:39 PM
    *To:* user@syncope.apache.org <mailto:user@syncope.apache.org>
    *Subject:* Re: Syncope user creation from REST client

    On 19/09/2016 12:03, Mani, Vellingiri (Nokia - IN) wrote:

        Hi,

        Currently, I am evaluating syncope for our usage. I would need
        to do bulk user creation from REST. I started to create single
        user from REST client and it fails.

        From postman, I tried to create a user with below inputs. I
        get '400 Bad Request'.

        If there is anything wrong in the request, please correct me.
        Is all fields mandatory during user creation.

        POST - http://135.249.22.223:8080/syncope/rest/users

        Authorization:
        Basic Auth - admin/password

        Headers:
        Content-type: application/json

        Body:

        {

          "@class": "org.apache.syncope.common.lib.to.UserTO",

          "creator": "admin",

          "lastModifier": "admin",

          "key": "rest1",

          "type": "USER",

          "realm": "/",

          "status": "Active",

          "auxClasses": [],

          "plainAttrs": [],

          "derAttrs": [],

          "virAttrs": [],

          "resources": []

        }


    Hi,
    you should remove (not troublesome, just ignored):

    * creator
    * lastModifier
    * key
    * status

    About what is mandatory, I can see there is no username.
    Moreover, it depends on how you can your schemas and classes
    configured.

    Please also take a look at logs to figure out what might go wrong.

    Regards.

--
    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/
    <http://home.apache.org/%7Eilgrosso/>


Reply via email to