[java-identity-provider COMMIT] in /trunk: idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filte...
noreply at shibboleth.net
noreply at shibboleth.net
Mon Sep 14 12:04:53 EDT 2015
Author: rdw
Date: Mon Sep 14 12:04:53 2015
New Revision: 7746
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7746&view=rev
Log:
IDP-774 Custom object injection for scripting contexts: Attributes
https://issues.shibboleth.net/jira/browse/IDP-774
This change adds a customObject to the Scripted AttributeResolver, DataConnector, Matcher, and PolicyRule.
It extends the syntax for the configuration of these (in the afp namespace only for the last two) to allow an
attribute customObjectRef to supplied the name of the bean, with "shibboleth.CustomScriptObject" being
the default.
The (no system) global.xml gains a bean of this name (otherwise the scripted parsers would fail to find the
bean and sadness would ensue.
Tests for the objects and for the parser.
Added:
trunk/idp-attribute-filter-spring/src/test/resources/net/shibboleth/idp/attribute/filter/matcher/customBean.xml
trunk/idp-attribute-resolver-impl/src/test/resources/data/net/shibboleth/idp/attribute/resolver/impl/ad/custom.script
trunk/idp-attribute-resolver-impl/src/test/resources/data/net/shibboleth/idp/attribute/resolver/impl/dc/custom.js (with props)
trunk/idp-attribute-resolver-impl/src/test/resources/data/net/shibboleth/idp/attribute/resolver/impl/dc/v8/custom.js (with props)
trunk/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/customBean.xml
Modified:
trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/impl/ScriptedMatcher.java
trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/impl/ScriptedPolicyRule.java
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/impl/ScriptedMatcherTest.java
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/impl/ScriptedPolicyRuleTest.java
trunk/idp-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/filter/spring/basic/impl/ScriptedMatcherParser.java
trunk/idp-attribute-filter-spring/src/test/java/net/shibboleth/idp/attribute/filter/spring/BaseAttributeFilterParserTest.java
trunk/idp-attribute-filter-spring/src/test/java/net/shibboleth/idp/attribute/filter/spring/basic/ScriptedTest.java
trunk/idp-attribute-filter-spring/src/test/resources/net/shibboleth/idp/attribute/filter/policyrule/afp/scripted.xml
trunk/idp-attribute-filter-spring/src/test/resources/net/shibboleth/idp/attribute/filter/policyrule/scripted.xml
trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/ad/impl/ScriptedAttributeDefinition.java
trunk/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/dc/impl/ScriptedDataConnector.java
trunk/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/ad/impl/ScriptedAttributeTest.java
trunk/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/impl/ScriptedDataConnectorTest.java
trunk/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/ad/impl/ScriptedAttributeDefinitionParser.java
trunk/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/impl/ScriptDataConnectorParser.java
trunk/idp-attribute-resolver-spring/src/test/java/net/shibboleth/idp/attribute/resolver/spring/BaseAttributeDefinitionParserTest.java
trunk/idp-attribute-resolver-spring/src/test/java/net/shibboleth/idp/attribute/resolver/spring/ad/ScriptedAttributeParserTest.java
trunk/idp-attribute-resolver-spring/src/test/java/net/shibboleth/idp/attribute/resolver/spring/dc/ScriptDataConnectorParserTest.java
trunk/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/scriptedAttributes.xml
trunk/idp-conf/src/main/resources/conf/global.xml
trunk/idp-schema/src/main/resources/schema/shibboleth-afp.xsd
trunk/idp-schema/src/main/resources/schema/shibboleth-attribute-resolver-ad.xsd
trunk/idp-schema/src/main/resources/schema/shibboleth-attribute-resolver-dc.xsd
Modified: trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/impl/ScriptedMatcher.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/impl/ScriptedMatcher.java?rev=7746&r1=7745&r2=7746&view=diff
==============================================================================
--- trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/impl/ScriptedMatcher.java (original)
+++ trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/impl/ScriptedMatcher.java Mon Sep 14 12:04:53 2015
@@ -73,6 +73,9 @@
/** Log prefix. */
private String logPrefix;
+ /** The custom object we inject into all scripts. */
+ @Nullable private Object customObject;
+
/**
* Constructor.
*
@@ -84,6 +87,22 @@
[... 670 lines stripped ...]
More information about the commits
mailing list