<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} p
        {margin-top:0;
        margin-bottom:0}--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi list,</p>
<p><br>
</p>
<p>I am trying to create a AttributeResolver in Shibboleth 3.3 on debian 8 using oracle java 1.8.0_112 inside of tomcat8. I want to achieve the evaluation of groups in an AD based LDAP to resolve the eduPersonScopedAffiliation.</p>
<p><br>
</p>
<p>When testing my configuration I see the following error in the idp-process.log:</p>
<p><br>
</p>
<p><br>
</p>
<p>ERROR [net.shibboleth.idp.profile.impl.ResolveAttributes:299] - Profile Action ResolveAttributes: Error resolving attributes<br>
net.shibboleth.idp.attribute.resolver.ResolutionException: Attribute Definition 'eduPersonAffiliation': unable to execute script<br>
    at net.shibboleth.idp.attribute.resolver.ad.impl.ScriptedAttributeDefinition.doAttributeDefinitionResolve(ScriptedAttributeDefinition.java:190)<br>
Caused by: javax.script.ScriptException: sun.org.mozilla.javascript.EcmaError: ReferenceError: "Java" is not defined. (<Unknown Source>#1) in <Unknown Source> at line number 1<br>
    at com.sun.script.javascript.RhinoCompiledScript.eval(RhinoCompiledScript.java:64)<br>
Caused by: sun.org.mozilla.javascript.EcmaError: ReferenceError: "Java" is not defined. (<Unknown Source>#1)<br>
    at sun.org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3687)</p>
<p><br>
</p>
<p><br>
</p>
<p>This is confusing, as I expect Nashorn to be included in java 1.8, but the IdP seems to refer to Rhino. Here is my current minimal AttributeResolver snip:</p>
<p><br>
</p>
<p><br>
</p>
<p><AttributeDefinition id="eduPersonAffiliation" xsi:type="ScriptedAttribute"><br>
        <Script><![CDATA[<br>
scopedValueType =  Java.type("net.shibboleth.idp.attribute.ScopedStringAttributeValue");<br>
var localpart = "foo";<br>
eduPersonAffiliation.addValue(new scopedValueType(localpart, "%{idp.scope}"));<br>
        ]]></Script><br>
<br>
        <AttributeEncoder xsi:type="SAML1String" name="urn:mace:dir:attribute-def:eduPersonAffiliation" encodeType="false" /><br>
        <AttributeEncoder xsi:type="SAML2String" name="urn:oid:1.3.6.1.4.1.5923.1.1.1.1"<br>
friendlyName="eduPersonAffiliation" encodeType="false" /><br>
    </AttributeDefinition></p>
<p><br>
</p>
<p><br>
</p>
<p>Do I need to install Nashorn manually in order to solve this? As far as I understand it is included in java 1.8 out of the box. Any hints are appreciated.</p>
<p><br>
</p>
<p>Regards</p>
<p>Dennis Ahrens<br>
</p>
</body>
</html>