Hi,

please add a mapping for the USER password in the (flag the field as password attribute).

Moreover assign DBPasswordPropagationActions to the resource sued to propagate users. Then you should find "password" variable populated in the groovy scripts.

Best regards,
Andrea


Il 12/08/2018 06:57, d.cheremnov ha scritto:
Thank you!

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.
0)
Parameter
password.cipher.algorithm = [BCRYPT]

https://gyazo.com/d25dc0e11c788ad004f8bb2a483b5c02

1)
Connector (scriptedsql):

https://gyazo.com/34ed370b64e9eb21581c32d6c3622357

2)
Resource:

https://gyazo.com/8394ce3f9a4dc7310cd1cfa853d2c013

3)
User provision:

https://gyazo.com/6fd7a2100c5479064e338c1adced4989

4)
Push task:

https://gyazo.com/b2da710a39aad58611942bedd529f2ae

5)
ActivitiCreateScript.groovy:

log.info("Entering " + action + " Script. attributes: " + attributes);
def sql = new Sql(connection);
def firstnameAttributes = attributes.get("FIRST_");
def lastnameAttributes = attributes.get("LAST_");
def emailAttributes = attributes.get("EMAIL_");
//def pwdAttributes = attributes.get("__HASHED_PASSWORD__");

switch ( objectClass ) {
case "__ACCOUNT__":
   sql.execute("INSERT INTO act_id_user (ID_,REV_,FIRST_,LAST_,EMAIL_,PWD_)
values (?,?,?,?,?,?)",
     [
       id,
       1,
       firstnameAttributes.isEmpty() ? null : firstnameAttributes.get(0),
       lastnameAttributes.isEmpty() ? null : lastnameAttributes.get(0),
       emailAttributes.isEmpty() ? null : emailAttributes.get(0),
       password
     ])
   break

case "__GROUP__":
   log.info("Create new group...");
   break

default:
   id;
}
return id;

6) Result of push task:

https://gyazo.com/b7c677f7c5f708cdc3f28af7fbe10a91

https://gyazo.com/7bcbf9a34383ffb761a0556881f5fa96

but password and PWD_ = null




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

--
Dott. Andrea Patricelli
Tel. +39 3204524292

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

Apache Syncope PMC Member

Reply via email to