[midPoint] Self post-registration issue. Suspicions notification handler does not work for userRegistrationNotifier
Oleksandr Nekriach
o.nekriach at dynatech.lv
Fri Sep 15 17:32:56 CEST 2017
Hello guys,
Please help me to understand what is wrong with Self post-registration. It
does not send email after user modification from "proposed" to draft
"LifecycleState"
as expected. Notification works in
There are no any errors in idm.log . Feeling that handler does not work.
Midpoin Version 3.6
Please find configuration details in attach.
Best regards, Oleksandr
*The part of configuration from SystemConfiguration*
<notificationConfiguration>
<handler>
<userRegistrationNotifier>
<recipientExpression>
<script xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="c:ScriptExpressionEvaluatorType">
<code>
return requestee.getEmailAddress()
</code>
</script>
</recipientExpression>
<bodyExpression>
<script xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="c:ScriptExpressionEvaluatorType">
<code>
import
com.evolveum.midpoint.notifications.api.events.ModelEvent
modelEvent = (ModelEvent) event
newUser =
modelEvent.getFocusContext().getObjectNew();
userType = newUser.asObjectable();
plainTextPassword =
midpoint.getPlaintextUserPassword(userType);
bodyMessage = "Dear " + userType.getGivenName() +
",\n\n" +"your account was successfully created. To activate your account
click on the confirmation link bellow in the email."+"\n" +"After your
account is activated, use following credentials to log in: \n" +"username:
" + userType.getName().getOrig() + "\n" +"password: " + plainTextPassword+
"\n\n" +midpoint.createRegistrationConfirmationLink(userType);
return bodyMessage;
</code>
</script>
</bodyExpression>
<transport>mail</transport>
<confirmationMethod>link</confirmationMethod>
</userRegistrationNotifier>
</handler>
</notificationConfiguration>
*The part of configuration from Security policy*
<authentication>
<mailAuthentication>
<name>confirmationLink</name>
<displayName>Additional mail authentication</displayName>
<mailNonce>mailNonce</mailNonce>
</mailAuthentication>
</authentication>
<credentials>
<password>
<lockoutMaxFailedAttempts>3</lockoutMaxFailedAttempts>
<lockoutFailedAttemptsDuration>PT3M</lockoutFailedAttemptsDuration>
<lockoutDuration>PT15M</lockoutDuration>
<valuePolicyRef xmlns:tns="
http://midpoint.evolveum.com/xml/ns/public/common/common-3"
oid="00000004-0000-0000-0000-000000000001"
relation="org:default"
type="tns:ValuePolicyType"><!-- Password Policy
for password reset --></valuePolicyRef>
</password>
<nonce>
<maxAge>PT10M</maxAge>
<lockoutMaxFailedAttempts>3</lockoutMaxFailedAttempts>
<lockoutFailedAttemptsDuration>PT3M</lockoutFailedAttemptsDuration>
<lockoutDuration>PT15M</lockoutDuration>
<valuePolicyRef oid="00000004-0000-0000-0000-000000000001"
relation="org:default"
type="c:ValuePolicyType"><!-- Password Policy for
password reset --></valuePolicyRef>
<name>mailNonce</name>
</nonce>
</credentials>
<registration>
<selfRegistration>
<name>selfRegistration</name>
<initialLifecycleState>proposed</initialLifecycleState>
<requiredLifecycleState>draft</requiredLifecycleState>
<displayName>Self Registration</displayName>
<additionalAuthenticationName>confirmationLink</additionalAuthenticationName>
<defaultRole oid="00000000-0000-0000-0000-000000000008"
relation="org:default"
type="c:RoleType"><!-- End user --></defaultRole>
</selfRegistration>
</registration>
--
Best regards,
Oleksandr Nekriach | Identity and access management engineer
Dynatech, Mednieku str. 4a, Riga, LV-1010, Latvia
+37125314685 <+371%2025%20314%20685>
,
o.nekriach at dynatech.lv
|
www.dynatech.lv
Stay connected:
<https://www.facebook.com/DynatechLatvia/?ref=br_rs>
<https://www.linkedin.com/company-beta/17893047/>
Confidentiality Notice: This message contains confidential information and
is intended only for the named recipient(s). If you are not the addressee
you may not copy, distribute or perform any other activities with this
information. If you have received this transmission in error, please notify
us by e-mail immediately. E-mail transmission cannot be guaranteed to be
secure or error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170915/8f5f2fc0/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: o.nekriach at dynatech.lv1502777022855-7770
Type: image/png
Size: 2602 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170915/8f5f2fc0/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: o.nekriach at dynatech.lv1502777022855-7771
Type: image/png
Size: 790 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170915/8f5f2fc0/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: o.nekriach at dynatech.lv1502777022855-7772
Type: image/png
Size: 786 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170915/8f5f2fc0/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ExportedData_SecurityPolicyType_1505488337892.xml
Type: text/xml
Size: 4341 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170915/8f5f2fc0/attachment.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ExportedData_SystemConfigurationType_1505488322777.xml
Type: text/xml
Size: 15215 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170915/8f5f2fc0/attachment-0001.xml>
More information about the midPoint
mailing list