<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
xe<br>
w<br>
Sent from my Huawei Mobile<br>
<br>
Jason Everling <jeverling@bshp.edu> wrote:<br>
<br>
<div dir="ltr">Thanks! I'll change it. This piece of code is attached to a template used for the "unlinked" situation on the resource which basically enables their resource accounts, moves them into their correct orgs, adds the groups, etc. When I initially
imported all of our accounts I generated random passwords within midpoint before attaching other resources so we should not have any "blank" passwords out there but I will test and see. I have submitted paperwork to get you all added as an approved vendor
so we can start a subscription, I haven't kept up with the changes since 3.2 so I am hoping to get help from you all with the upgrade process!
<div>x, </div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div class="gmail_signature">
<div dir="ltr">JASON</div>
</div>
</div>
<br>
<div class="gmail_quote">On Thu, Aug 4, 2016 at 1:35 AM, Pavol Mederly <span dir="ltr">
<<a href="mailto:mederly@evolveum.com">mederly@evolveum.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>Hello Jason,</p>
<p>The Java code is almost OK - I would just change "> 0" to ">= 2" or ">= 4" (i.e. >=2, >=4) in first two and the third line, respectively, in order to threat short names/UIDnumber that would lead to IndexOutOfBoundsException.</p>
<p>And, as for the target path: It's hard to say. The way you've chosen seems to be logical. This part of midPoint is not much documented, so the only documentation is the code. And the code that implements credentials mappings is quite old and in some aspects
not adequate (as I've learned recently), so it will be probably changed in near future. Therefore we are on thin ice here.</p>
<p>My suggestion: leave it as it is (if it's working). Maybe you could test it on a user that has no password at all, if it works also in this situation. And before any upgrade of midPoint (e.g. to 3.4.1 or 3.5), just retest it.</p>
<p>I've created a JIRA issue for this (<a href="https://jira.evolveum.com/browse/MID-3330" target="_BLANK">MID-3330</a>). It's not a much work, but most probably it would require a request of a subscriber or a little sponsoring.<br>
</p>
<p>Best regards,</p>
<pre cols="72">--
Pavol Mederly
Software developer
<a href="http://evolveum.com" target="_BLANK">evolveum.com</a>
</pre>
<div>
<div class="h5"><br>
<div>On 28.07.2016 21:02, Jason Everling wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div dir="ltr">I need to generate new temp credentials for returning users that have not used their account for years, most of them do not remember their security questions or they have changed mobile phone numbers so they cannot utilize our forgotten password
process.
<div><br>
</div>
<div>I have tested the below and it seems to be working, but since I am not a java guru I am not 100% confident it is correct. Can someone confirm? Mainly the target path</div>
<div><br>
</div>
<div> <!-- example josm5983 --></div>
<div>
<div style="font-size:12.8px"> <mapping></div>
<div style="font-size:12.8px"> <source></div>
<div style="font-size:12.8px"> <name>tmpGivenName</name></div>
<div style="font-size:12.8px"> <path>$user/givenName</path></div>
<div style="font-size:12.8px"> </source></div>
<div style="font-size:12.8px"> <source></div>
<div style="font-size:12.8px"> <name>tmpFamilyName</name></div>
<div style="font-size:12.8px"> <path>$user/familyName</path></div>
<div style="font-size:12.8px"> </source></div>
<div style="font-size:12.8px"> <source></div>
<div style="font-size:12.8px"> <name>tmpUidnumber</name></div>
<div style="font-size:12.8px"> <path></div>
<div style="font-size:12.8px"><span style="white-space:pre-wrap"></span>declare namespace bshp='<a href="http://midpoint.bshp.edu/schema/bshp" target="_BLANK">http://midpoint.bshp.<wbr>edu/schema/bshp</a>';</div>
<div style="font-size:12.8px"><span style="white-space:pre-wrap"></span>$c:user/c:extension/bshp:<wbr>uidnumber</div>
<div style="font-size:12.8px"><span style="white-space:pre-wrap"></span></path></div>
<div style="font-size:12.8px"> </source></div>
<div style="font-size:12.8px"> <expression></div>
<div style="font-size:12.8px"> <script></div>
<div style="font-size:12.8px"> <code></div>
<div style="font-size:12.8px"> tmpGivenNameInit = basic.stringify(tmpGivenName)?<wbr>.size() > 0 ? (basic.stringify(tmpGivenName)<wbr>).substring(0,2) : ''</div>
<div style="font-size:12.8px"><span style="white-space:pre-wrap"></span>tmpFamilyNameInit = basic.stringify(tmpFamilyName)<wbr>?.size() > 0 ? (basic.stringify(<wbr>tmpFamilyName)).substring(0,2) : ''</div>
<div style="font-size:12.8px"> <span style="white-space:pre-wrap"> </span>tmp<span style="font-size:12.8px">tmpUidnumber</span>Init = basic.stringify(<span style="font-size:12.8px">tmpUidnumber</span>)?<wbr>.size() > 0 ? (basic.stringify(<span style="font-size:12.8px">tmpUidnumber</span>)<wbr>).substring(0,4)
: ''</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px"> newPasswd = basic.norm(tmpGivenNameInit + tmpFamilyNameInit + tmp<span style="font-size:12.8px">tmpUidnumber</span>Init)</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px"> basic.encrypt(newPasswd)</div>
<div style="font-size:12.8px"><span style="white-space:pre-wrap"></span></code></div>
<div style="font-size:12.8px"> </script></div>
<div style="font-size:12.8px"> </expression></div>
<div style="font-size:12.8px"> <target></div>
<div style="font-size:12.8px"> <path>credentials/password/<wbr>value</path></div>
<div style="font-size:12.8px"> </target></div>
<div style="font-size:12.8px"> </mapping></div>
</div>
</div>
<br>
</div>
</div>
<font size="2"><br>
<br>
CONFIDENTIALITY NOTICE:<br>
This e-mail together with any attachments is proprietary and confidential; intended for only the recipient(s) named above and may contain information that is privileged. You should not retain, copy or use this e-mail or any attachments for any purpose, or disclose
all or any part of the contents to any person. Any views or opinions expressed in this e-mail are those of the author and do not represent those of the Baptist School of Health Professions. If you have received this e-mail in error, or are not the named recipient(s),
you are hereby notified that any review, dissemination, distribution or copying of this communication is prohibited by the sender and to do so might constitute a violation of the Electronic Communications Privacy Act, 18 U.S.C. section 2510-2521. Please immediately
notify the sender and delete this e-mail and any attachments from your computer.
</font><br>
<br>
<fieldset></fieldset> <br>
<pre>______________________________<wbr>_________________
midPoint mailing list
<a href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_BLANK">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a>
</pre>
</blockquote>
<br>
</div>
<br>
______________________________<wbr>_________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_BLANK">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<font size="2"><br>
<br>
CONFIDENTIALITY NOTICE:<br>
This e-mail together with any attachments is proprietary and confidential; intended for only the recipient(s) named above and may contain information that is privileged. You should not retain, copy or use this e-mail or any attachments for any purpose, or disclose
all or any part of the contents to any person. Any views or opinions expressed in this e-mail are those of the author and do not represent those of the Baptist School of Health Professions. If you have received this e-mail in error, or are not the named recipient(s),
you are hereby notified that any review, dissemination, distribution or copying of this communication is prohibited by the sender and to do so might constitute a violation of the Electronic Communications Privacy Act, 18 U.S.C. section 2510-2521. Please immediately
notify the sender and delete this e-mail and any attachments from your computer.
</font><br>
</body>
</html>