Upgrading to IDPV3, problems converting importPackage routines
Eric Wedaa
Eric.Wedaa at marist.edu
Thu May 5 13:07:16 EDT 2016
All
I am working on upgrading to IDP V3 and Java 1.8 and have hit a brickwall with importPackage no longer working. I have seen the webpage at https://wiki.shibboleth.net/confluence/display/SHIB2/IdPJava1.8 and tried (as best as I can) to follow the instructions but I am still getting an error
ERROR [edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.attributeDefinition.ScriptedAttributeDefinition:130] - 148.100.144.177 - firstname produced a null attribute
If anybody can help I would greatly appreciate it. (I'm sure it's something simple I'm missing, but I'm not a big Java person.)
Modified to match what the webpage says code sample below:
<resolver:AttributeDefinition id="firstname" xsi:type="Script"
xmlns="urn:mace:shibboleth:2.0:resolver:ad" sourceAttributeID="cn">
<resolver:Dependency ref="myLDAP" />
<resolver:AttributeEncoder xsi:type="SAML2String"
xmlns="urn:mace:shibboleth:2.0:attribute:encoder" name="firstname" />
<Script><![CDATA[
var BasicAttribute = Java.type("edu.internet2.middleware.shibboleth.common.attribute.provider.BasicAttribute");
firstname = new BasicAttribute("firstname");
var cn;
if (cn != null && cn.getValues().size() > 0) {
gnvalue = cn.getValues().get(0);
result=gnvalue.split(" ");
gnvalue = result[0];
} else {
gnvalue = "-";
}
firstname.getValues().add(gnvalue);
]]></Script>
</resolver:AttributeDefinition>
thanks lots!
>>>>>>Ericw
More information about the users
mailing list