V3 -- Scripted Attribute Definition
Joel Levin
joel.aaron.levin at gmail.com
Tue Jun 6 11:20:24 EDT 2017
We are also in the midst of migrating from v2 to v3.
And have a similar question w.r.t a scripted value for an attribute --
definition below.
The 'logger.info' is showing the correct value calculated -- however the
attribute value calculated is not sent to the SP --- we have checked,
triple checked -- the release steps -- all seems good --and starting to
think something is not quite right with script below for v3.
Could anyone help?
<resolver:AttributeDefinition id="fooBarEntitlement" xsi:type="Script"
xmlns="urn:mace:shibboleth:2.0:resolver:ad"
sourceAttributeID="InComing_Attribute">
<resolver:Dependency ref="InComing_Source_DataSource" />
<resolver:AttributeEncoder xsi:type="SAML2String"
xmlns="urn:mace:shibboleth:2.0:attribute:encoder"
name="urn:mace:dir:attribute-def:fooBarEntitlement"
friendlyName="fooBarEntitlement" />
<Script>
<![CDATA[
load("nashorn:mozilla_compat.js");
importPackage(Packages.edu.internet2.middleware.shibboleth.common.attribute.provider);
importPackage(Packages.org.slf4j);
logger =
LoggerFactory.getLogger("edu.internet2.middleware.shibboleth.resolver.Script.fooBarEntitlement");
scriptedValueEntitlement = new
BasicAttribute("scriptedValueEntitlement");
if (InComing_Attribute.getValues() ==
'BLAH')
{
scriptedValueEntitlement.getValues().add("Blue Sky);
}
else
{
scriptedValueEntitlement.getValues().add("Cloudy Sky);
}
logger.info("Values of
scriptedValueEntitlement are: " + scriptedValueEntitlement.getValues());
]]>
</Script>
</resolver:AttributeDefinition>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20170606/22e1a6c0/attachment.html>
More information about the users
mailing list