<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-family:arial,sans-serif;font-size:13px">Unfortunately another script I need to invoke for another attribute is<br>

</span><span style="font-family:arial,sans-serif;font-size:13px">a Perl script.</span></blockquote><div class="gmail_extra"><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div class="gmail_extra">

Why not rewrite the perl script in a supported language?  You&#39;ll be better of in the long run.<br></div><div><br></div><div class="gmail_extra"><div class="gmail_quote">On Thu, Aug 7, 2014 at 3:25 PM, Jason <span dir="ltr">&lt;<a href="mailto:shibboleth@happycat.org.uk" target="_blank">shibboleth@happycat.org.uk</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id=":2f5" class="" style="overflow:hidden">Does anyone have an example of some ecmascript I can use in the<br>


scripted attribute that would invoke an external script?</div></blockquote></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div>You can do it in jython..</div><div class="gmail_extra"><br></div><div class="gmail_extra">

<div class="gmail_extra">    val = os.popen(&quot;TLS_CACERT=/usr/local/shibboleth-idp/credentials/ldap.pem /usr/bin/ldapsearch -H %s -D %s -w &#39;%s&#39; -LLL -b &#39;%s&#39; &#39;%s&#39; dn | /usr/bin/perl -p0e &#39;s/\n //g&#39;|sort -u&quot; % ( ldap_server, ldap_user, ldap_pass, s_base, s_filter )).readlines()</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">    for i in val:</div><div class="gmail_extra">        m = re.search( r&#39;.+(cn=.*)&#39;, i.rstrip(), re.IGNORECASE)</div><div class="gmail_extra">        if m is None:</div>

<div class="gmail_extra">            continue</div><div class="gmail_extra">        else:</div><div class="gmail_extra">            serviceGroupMembership.getValues().add( m.group(1) )</div><div class="gmail_extra"><br></div>

<div class="gmail_extra"><br></div><div class="gmail_extra">Liam</div></div></div>