[midPoint] Ambiguous method overloading
Wojciech Staszewski
wojciech.staszewski at diagnostyka.pl
Mon Oct 15 22:00:53 CEST 2018
Hello!
What can be the cause of this error message:
Can't process shadow: null (OID:null): Generic error in connector:
groovy.lang.GroovyRuntimeException(Ambiguous method overloading for
method
org.identityconnectors.common.security.SecurityUtil#decrypt.?Cannot
resolve which method to invoke for [null] due to overlapping prototypes
between:??[class
org.identityconnectors.common.security.GuardedByteArray]??[class
org.identityconnectors.common.security.GuardedString])
This error shows up randomly in the reconciliation tasks and always is
related to ScriptedSQL resources.
I have outbound password mapping, this is the Groovy script part
responsible for password handling:
case "__PASSWORD__":
// Read user password as clear text, then make sha1 hash with salt
def SALT =
org.apache.commons.lang.RandomStringUtils.randomAlphanumeric(8);
def clearpass =
SecurityUtil.decrypt(attributes?.get("__PASSWORD__")?.get(0)).toString()
+ SALT;
String.metaClass.toSHA1 = { salt = "" ->
def messageDigest = MessageDigest.getInstance("SHA1")
messageDigest.update(salt.getBytes())
messageDigest.update(delegate.getBytes())
new BigInteger(1, messageDigest.digest()).toString(16).padLeft(40, '0')
}
sha1pass = clearpass.toSHA1('');
sql.executeUpdate("UPDATE users SET password=?, salt=? WHERE
user_id=?",[sha1pass,SALT,uid]);
break;
Thanks for any tips.
Regards,
WS
--
Wojciech Staszewski
Administrator Systemów Sieciowych
www.diagnostyka.pl
Diagnostyka Sp. z o. o.
ul. Prof. M. Życzkowskiego 16, 31-864 Kraków
Numer KRS: 0000381559 (Sąd Rejonowy dla Krakowa-Śródmieścia w Krakowie, XI Wydział Gospodarczy KRS)
NIP: 675-12-65-009; REGON: 356366975
Kapitał zakładowy: 33 756 500 zł.
Pomyśl o środowisku zanim wydrukujesz ten e-mail.
More information about the midPoint
mailing list