REST connector configuration

2018-08-10 Thread Wyllys Ingersoll
When using an external REST based resource, how does one define the
field that will map back to the internal "__ENABLED__" status?  What
do I need to include in the user records that the service returns that
will indicate whether or not the external user account is enabled or
not?  I don't see how to do this in the docs or demo system.


Re: How do export users, groups and membership from syncope to extern DB?

2018-08-10 Thread Andrea Patricelli

Hi,

Do you want to propagate users to an external SQL database right?
Which version of Syncope are you running?


Il 10/08/2018 11:52, d.cheremnov ha scritto:

Hi!

1.
Activiti DataBase:

CREATE TABLE IF NOT EXISTS `act_id_user` (
   `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
   `REV_` int(11) DEFAULT NULL,
   `FIRST_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
   `LAST_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
   `EMAIL_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
   `PWD_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
   `PICTURE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
   PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

CREATE TABLE IF NOT EXISTS `act_id_group` (
   `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
   `REV_` int(11) DEFAULT NULL,
   `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
   `TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
   PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


CREATE TABLE IF NOT EXISTS `act_id_membership` (
   `USER_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
   `GROUP_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
   PRIMARY KEY (`USER_ID_`,`GROUP_ID_`),
   KEY `ACT_FK_MEMB_GROUP` (`GROUP_ID_`),
   CONSTRAINT `ACT_FK_MEMB_GROUP` FOREIGN KEY (`GROUP_ID_`) REFERENCES
`act_id_group` (`ID_`),
   CONSTRAINT `ACT_FK_MEMB_USER` FOREIGN KEY (`USER_ID_`) REFERENCES
`act_id_user` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

2.
ActivitiUserDBConnector (users, 'table' connector):

https://gyazo.com/e13dda814cf587deb116a4a344faffe1

3. __ACCOUNT__ provision rules (users resource):

https://gyazo.com/387f96a1a4ef597fdb67bc2859d0451e

4.

I added 2 users on the syncode and do Push:

https://gyazo.com/421bdd80f3089c14d8856c4e4f7f8bfb



Question:

1. How to export 'password' field to `act_id_user` table ?
Please take a look at [1]. Especially to commented description: 
"password: password string, clear text".
N.B. If you want to enable cleartext passwords please flag 
clearTextPasswordToScript in connector configuration.




2. Exists groups. I can export the groups to `act_id_group` table, use
'scriptedsql' connector?


Yes you can. By properly managing objectClass in Groovy script.



3. How to export an 'user-group' membership to `act_id_membership` table?


You need a custom PropagationActions, something like [2].
In this custom action you have to implement the "before" method where 
you can, for example, create your own connid attribute to pass to groovy 
scripts, say __MEMBERSHIPS__. In __MEMBERSHIPS__ you can pass list of 
the groups of the user and then use this attribute in the groovy script 
(see examples in the code at [1]) in order to populate act_id_membership 
table.




--
Sent from: http://syncope-user.1051894.n5.nabble.com/

HTH,
Andrea

[1] 
https://github.com/apache/syncope/blob/2_0_X/fit/core-reference/src/test/resources/scriptedsql/CreateScript.groovy
[2] 
https://github.com/apache/syncope/blob/2_0_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java


--
Dott. Andrea Patricelli
Tel. +39 3204524292

Developer @ Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member



Re: Null password

2018-08-10 Thread d.cheremnov
I read doc, but I need to send the encrypted password from the syncope to the 
extern database ... 

It can be somehow done (for example with the help of action class)? 

Best regards, 
Dmitriy Cheremnov 


--
Sent from: http://syncope-user.1051894.n5.nabble.com/


Re: Null password

2018-08-10 Thread d.cheremnov
I read doc, but I need to send the encrypted password from the syncope to the
extern database ...

It can be somehow done (for example with the help of action class)?

Best regards,
Dmitriy Cheremnov

--
Sent from: http://syncope-user.1051894.n5.nabble.com/


Re: How do export users, groups and membership from syncope to extern DB?

2018-08-10 Thread d.cheremnov
I read doc and
http://syncope-user.1051894.n5.nabble.com/Re-Null-password-td5709805.html
but I need to send the encrypted password from the syncope to the extern
database ...

Best regards,
Dmitriy Cheremnov

--
Sent from: http://syncope-user.1051894.n5.nabble.com/