multiple IdPAttributes returned from a scriptedAttributeDefinition?
cneberg
cneberg at gmail.com
Wed Aug 12 16:27:50 EDT 2015
I have multiple attributes I need to extract almost every time using
scriptedAttributeDefinition's in the attribute resolver, so rather than
having several extremely similar scriptedAttributeDefinitions I want to
know if its possible/advisable to return multiple IdPAttributes from a
single ScriptedAttributeDefinition. Specifically for IDP3 and JDK 8.
I tried the config below but the value at the SP for "
http://url.com/saml/test1" is test2 instead of test1 like I was hoping. So
I guess it ignored the sourceAttributeID attribute value, and just used the
value of test_get_vals.
<resolver:AttributeDefinition xsi:type="ad:Simple" id="test1"
sourceAttributeID="test1src">
<resolver:Dependency ref="test_get_vals" />
<resolver:AttributeEncoder xsi:type="enc:SAML1String"
name="urn:mace:dir:attribute-def:test1" />
<resolver:AttributeEncoder xsi:type="enc:SAML2String" name="
http://url.com/saml/test1" friendlyName="test1" />
</resolver:AttributeDefinition>
<resolver:AttributeDefinition xsi:type="Script"
xmlns="urn:mace:shibboleth:2.0:resolver:ad"
id="test_get_vals">
<Script><![CDATA[
load("nashorn:mozilla_compat.js");
importPackage(Packages.net.shibboleth.idp.attribute);
logger =
Java.type("org.slf4j.LoggerFactory").getLogger("net.shibboleth.idp.attribute");
IdPAttributeType =
Java.type("net.shibboleth.idp.attribute.IdPAttribute");
test1src = new IdPAttributeType("test1src");
jsArray = [new StringAttributeValue("test1")];
var tmp = Java.to(jsArray, Java.type('java.util.List'))
test1src.setValues(tmp);
test_get_vals.getValues().add("test2");
]]></Script>
</resolver:AttributeDefinition>
Thanks,
Christopher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20150812/b4905628/attachment.html>
More information about the users
mailing list