[midPoint] Generate credentials through object template

Jason Everling jeverling at bshp.edu
Thu Aug 4 16:32:22 CEST 2016


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!



JASON

On Thu, Aug 4, 2016 at 1:35 AM, Pavol Mederly <mederly at evolveum.com> wrote:

> Hello Jason,
>
> 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.
>
> 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.
>
> 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.
>
> I've created a JIRA issue for this (MID-3330
> <https://jira.evolveum.com/browse/MID-3330>). It's not a much work, but
> most probably it would require a request of a subscriber or a little
> sponsoring.
>
> Best regards,
>
> --
> Pavol Mederly
> Software developerevolveum.com
>
>
> On 28.07.2016 21:02, Jason Everling wrote:
>
> 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.
>
> 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
>
>    <!-- example josm5983 -->
>    <mapping>
>       <source>
>          <name>tmpGivenName</name>
>          <path>$user/givenName</path>
>       </source>
>       <source>
>          <name>tmpFamilyName</name>
>          <path>$user/familyName</path>
>       </source>
>       <source>
>          <name>tmpUidnumber</name>
>          <path>
> declare namespace bshp='http://midpoint.bshp.edu/schema/bshp';
> $c:user/c:extension/bshp:uidnumber
> </path>
>       </source>
>       <expression>
>          <script>
>             <code>
>                         tmpGivenNameInit = basic.stringify(tmpGivenName)?.size()
> > 0 ? (basic.stringify(tmpGivenName)).substring(0,2) : ''
> tmpFamilyNameInit = basic.stringify(tmpFamilyName)?.size() > 0 ?
> (basic.stringify(tmpFamilyName)).substring(0,2) : ''
>      tmptmpUidnumberInit = basic.stringify(tmpUidnumber)?.size() > 0 ?
> (basic.stringify(tmpUidnumber)).substring(0,4) : ''
>
>                         newPasswd = basic.norm(tmpGivenNameInit +
> tmpFamilyNameInit + tmptmpUidnumberInit)
>
>                         basic.encrypt(newPasswd)
> </code>
>          </script>
>       </expression>
>       <target>
>          <path>credentials/password/value</path>
>       </target>
>    </mapping>
>
>
>
> CONFIDENTIALITY NOTICE:
> 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.
>
>
> _______________________________________________
> midPoint mailing listmidPoint at lists.evolveum.comhttp://lists.evolveum.com/mailman/listinfo/midpoint
>
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
>
>

-- 


CONFIDENTIALITY NOTICE:
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. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20160804/53ee546e/attachment.htm>


More information about the midPoint mailing list