Question concerning creation of a script attribute

Brewer, Edward L lee.brewer at Vanderbilt.Edu
Wed Jun 26 16:06:57 EDT 2013


To all,

I am currently running  an  IdP version 2.3.6 on  RHEL and VMware under JBOSS 5.  I have one scripted attribute that is working well and I am attempting to create a new one with some errors.  The attribute definition is as follows

<resolver:AttributeDefinition xsi:type="Script" xmlns="urn:mace:shibboleth:2.0:resolver:ad" id="softwareStoreAffiliation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:resolver="urn:mace:shibboleth:2.0:resolver"><!-- Dependency that provides the source attribute. --><resolver:Dependency ref="myLDAP" /><resolver:Dependency ref="activeStudent" /><resolver:Dependency ref="eduPersonAffiliation" /><!-- SAML 1 and 2 encoders for the attribute. --><resolver:AttributeEncoder xsi:type="SAML2String" xmlns="urn:mace:shibboleth:2.0:attribute:encoder" name="urn:oid:1.2.840.113556.1.4.261" friendlyName="eduPersonAffiliation" /><!-- The script, wrapped in a CDATA section so that special XML characters don't need to be removed --><Script>importPackage(Packages.edu.internet2.middleware.shibboleth.common.attribute.provider);
               // Create attribute to be returned from definition
softwareStoreAffiliation = new BasicAttribute("softwareStoreAffiliation");
softwareStoreAffiliation = eduPersonAffiliation.clone();
               // Determine if user is an active student
if ( (activeStudent.getValues().isEmpty()) || !(activeStudent.getValues().contains("ACTIVE")  ){
               softwareStoreAffiliation.getValues().remove("student");
} </Script></resolver:AttributeDefinition>


The error that I see in the idp-process log is

13:56:39.191 - DEBUG [edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.ShibbolethAttributeResolver:336] - Resolved attribute activeStudent containing 0 values
13:56:39.191 - DEBUG [edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.ShibbolethAttributeResolver:336] - Resolved attribute eduPersonAffiliation containing 4 values
13:56:39.199 - ERROR [edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.attributeDefinition.ScriptedAttributeDefinition:135] - ScriptletAttributeDefinition softwareStoreAffiliation unable to execute script
com.sun.phobos.script.util.ExtendedScriptException: org.mozilla.javascript.EvaluatorException: missing ) after condition (<Unknown source>#6) in <Unknown source> at line number 6

I just starting learning java and javascript and do not have a lot of experience so please bear with me.

TIA,
Lee Brewer


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shibboleth.net/pipermail/users/attachments/20130626/0c1b458a/attachment-0001.html 


More information about the users mailing list