<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Thanks Rod. I can’t change the name in attributeEncoder because that is the name Vendor required. Instead I changed the sourceAttributeID that resolved the error. Now I got this error when ran <span style="font-family: Menlo; font-size: 11px;">aacli.sh</span>
<div><font face="Menlo"><span style="font-size: 11px;"><br>
</span></font></div>
<div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;">
<div style="margin: 0px;"><br>
</div>
<div style="margin: 0px;">2015-01-14 13:45:21,678 - ERROR [net.shibboleth.idp.profile.impl.ResolveAttributes:233] - Profile Action ResolveAttributes: Error resolving attributes</div>
<div style="margin: 0px;">net.shibboleth.idp.attribute.resolver.ResolutionException: Attribute Definition 'skillsoftdeptNumber': unable to execute script</div>
<div style="margin: 0px;"> at net.shibboleth.idp.attribute.resolver.ad.impl.ScriptedAttributeDefinition.doAttributeDefinitionResolve(ScriptedAttributeDefinition.java:152)</div>
<div style="margin: 0px;">Caused by: javax.script.ScriptException: ReferenceError: "importPackage" is not defined in <eval> at line number 1</div>
<div style="margin: 0px;"> at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:586)</div>
<div style="margin: 0px;">Caused by: jdk.nashorn.internal.runtime.ECMAException: ReferenceError: "importPackage" is not defined</div>
<div style="margin: 0px;"> at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:58)</div>
</div>
<div><br>
</div>
<div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br>
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;">I also see this warning in the log. The warning was generated when I restarted Tomcat. I don’t understand what it mean.</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;">2015-01-14 13:43:43,920 - WARN [net.shibboleth.idp.saml.attribute.mapping.AbstractSAMLAttributeMapper:223] - Scoped Attribute Mapper 'MapperForeduPersonScopedAffiliation': Attribute 'urn:oid:1.3.6.1.4.1.5923.1.1.1.9'
value conversion yielded no suitable values</div>
<div><br>
</div>
<div>From attribute-resolver.xml</div>
<div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"><resolver:AttributeDefinition id="skillsoftdeptNumber" xmlns="urn:mace:shibboleth:2.0:resolver:ad"</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> xsi:type="Script"</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> sourceAttributeID="uid"></div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">
<br>
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> <resolver:Dependency ref="myLDAP" /></div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">
<br>
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> <resolver:AttributeEncoder xsi:type="SAML2String" xmlns="urn:mace:shibboleth:2.0:attribute:encoder"</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> name="skillsoftdept"</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> friendlyName="dept name for skillsoft"</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> nameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified" /></div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">
<br>
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> <Script><![CDATA[</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">
<br>
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> importPackage(Packages.edu.internet2.middleware.shibboleth.common.attribute.provider);</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">
<br>
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> // Create attribute to be returned from definition</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> skillsoftdept = new BasicAttribute("skillsoftdept”);</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br>
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> ...</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">
<br>
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"> ]]></Script></div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">
<br>
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"></resolver:AttributeDefinition></div>
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br>
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;">
<div style="margin: 0px;">
<div style="margin: 0px;"><resolver:AttributeDefinition id="eduPersonScopedAffiliation"</div>
<div style="margin: 0px;"> xsi:type="Scoped" xmlns="urn:mace:shibboleth:2.0:resolver:ad"</div>
<div style="margin: 0px;"> scope="%{idp.scope}" sourceAttributeID="eduPersonAffiliation"></div>
<div style="margin: 0px; min-height: 13px;"><br>
</div>
<div style="margin: 0px;"> <resolver:Dependency ref="myLDAP" /></div>
<div style="margin: 0px; min-height: 13px;"><br>
</div>
<div style="margin: 0px;"> <resolver:AttributeEncoder xsi:type="enc:SAML1ScopedString"</div>
<div style="margin: 0px;"> name="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"</div>
<div style="margin: 0px;"> encodeType="false" /></div>
<div style="margin: 0px; min-height: 13px;"><br>
</div>
<div style="margin: 0px;"> <resolver:AttributeEncoder xsi:type="enc:SAML2ScopedString"</div>
<div style="margin: 0px;"> name="urn:oid:1.3.6.1.4.1.5923.1.1.1.9"</div>
<div style="margin: 0px;"> friendlyName="eduPersonScopedAffiliation"</div>
<div style="margin: 0px;"> encodeType="false" /></div>
<div style="margin: 0px;"></resolver:AttributeDefinition></div>
<div style="margin: 0px;"><br>
</div>
<div style="margin: 0px;"><br>
</div>
</div>
</div>
<div>
<div>
<div>On Jan 14, 2015, at 1:21 PM, Rod Widdowson <<a href="mailto:rdw@steadingsoftware.com">rdw@steadingsoftware.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">Well that was exciting. The trouble comes with the name for this encoder:<br>
<br>
<resolver:AttributeEncoder xsi:type="SAML2String"<br>
xmlns="urn:mace:shibboleth:2.0:attribute:encoder"<br>
name="skillsoftdept"<br>
friendlyName="dept name for skillsoft"<br>
nameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified" /><br>
<br>
By giving it the name "skillsoftdept", you override the name of the<br>
attribute "skillsoftdept". So when the attribute resolver goes to resolve<br>
the dependencies it say: "I don't see an attribute called skillsoftdept,<br>
just this encoder". Bang<br>
<br>
Actually, I'm surprised that this worked in V2, but for now change that name<br>
to something else and you should be all set. I'll do a fuller analysis as<br>
it why it worked in V2 and report back. If I can find a way of removing<br>
the regression we'll fix it.<br>
<br>
Rod<br>
<br>
-- <br>
To unsubscribe from this list send an email to <a href="mailto:users-unsubscribe@shibboleth.net">
users-unsubscribe@shibboleth.net</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</body>
</html>