[java-identity-provider] branch master updated: IDP-1315 - Adding a relyingPartyID="" attribute to custom Syntaxes
Scott Cantor
cantor.2 at osu.edu
Wed Sep 26 15:40:48 EDT 2018
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=c8df6a6d7d828f125e3321ca4df87c3057791881
The following commit(s) were added to refs/heads/master by this push:
new c8df6a6 IDP-1315 - Adding a relyingPartyID="" attribute to custom Syntaxes
c8df6a6 is described below
commit c8df6a6d7d828f125e3321ca4df87c3057791881
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Sep 26 15:40:43 2018 -0400
IDP-1315 - Adding a relyingPartyID="" attribute to custom Syntaxes
https://issues.shibboleth.net/jira/browse/IDP-1315
This got documented for AttributeEncoder, but never added to it.
---
.../attribute/resolver/spring/BaseResolverPluginParser.java | 2 +-
.../resolver/spring/enc/BaseAttributeEncoderParser.java | 11 +++++++++++
.../main/resources/schema/shibboleth-attribute-resolver.xsd | 13 +++++++++++--
3 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/BaseResolverPluginParser.java b/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/BaseResolverPluginParser.java
index 3591cb2..b110492 100644
--- a/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/BaseResolverPluginParser.java
+++ b/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/BaseResolverPluginParser.java
@@ -70,7 +70,7 @@ public abstract class BaseResolverPluginParser extends AbstractSingleBeanDefinit
if (config.hasAttributeNS(null, "activationConditionRef")) {
if (config.hasAttributeNS(null, "relyingParties")) {
- log.warn("relyingParties ignore, using activationConditionRef");
+ log.warn("relyingParties ignored, using activationConditionRef");
}
builder.addPropertyReference("activationCondition",
StringSupport.trimOrNull(config.getAttributeNS(null, "activationConditionRef")));
diff --git a/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/enc/BaseAttributeEncoderParser.java b/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/enc/BaseAttributeEncoderParser.java
index eafe641..7eedcee 100644
--- a/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/enc/BaseAttributeEncoderParser.java
+++ b/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/enc/BaseAttributeEncoderParser.java
@@ -19,7 +19,9 @@ package net.shibboleth.idp.attribute.resolver.spring.enc;
import javax.annotation.Nonnull;
+import net.shibboleth.ext.spring.util.SpringSupport;
import net.shibboleth.idp.attribute.resolver.spring.impl.AttributeResolverNamespaceHandler;
+import net.shibboleth.idp.profile.logic.RelyingPartyIdPredicate;
import net.shibboleth.idp.profile.logic.ScriptedPredicate;
import net.shibboleth.idp.profile.spring.relyingparty.metadata.ScriptTypeBeanParser;
import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
@@ -74,8 +76,17 @@ public abstract class BaseAttributeEncoderParser extends AbstractSingleBeanDefin
}
if (config.hasAttributeNS(null, "activationConditionRef")) {
+ if (config.hasAttributeNS(null, "relyingParties")) {
+ log.warn("relyingParties ignored, using activationConditionRef");
+ }
builder.addPropertyReference("activationCondition",
StringSupport.trimOrNull(config.getAttributeNS(null, "activationConditionRef")));
+ } else if (config.hasAttributeNS(null, "relyingParties")) {
+ final BeanDefinitionBuilder rpBuilder =
+ BeanDefinitionBuilder.genericBeanDefinition(RelyingPartyIdPredicate.class);
+ rpBuilder .addConstructorArgValue(
+ SpringSupport.getAttributeValueAsList(config.getAttributeNodeNS(null, "relyingParties")));
+ builder.addPropertyValue("activationCondition", rpBuilder.getBeanDefinition());
} else {
final Element child = ElementSupport.getFirstChildElement(config);
if (child != null && ElementSupport.isElementNamed(child,
diff --git a/idp-schema/src/main/resources/schema/shibboleth-attribute-resolver.xsd b/idp-schema/src/main/resources/schema/shibboleth-attribute-resolver.xsd
index 1cef233..b414e44 100644
--- a/idp-schema/src/main/resources/schema/shibboleth-attribute-resolver.xsd
+++ b/idp-schema/src/main/resources/schema/shibboleth-attribute-resolver.xsd
@@ -107,14 +107,14 @@
<attribute name="sourceAttributeID" type="string">
<annotation>
<documentation>
+ DEPRECATED
+
The name of the attribute from a data connector dependency which should be
used to populate this attribute definition.
Whether this attribute is required or optional depends on whether the dependency
set contains data connectors or attribute definitions. It may be left out for
attribute dependencies but MUST be set if there are data connector dependencies.
-
- This was a flawed schema design and may eventually be altered.
</documentation>
</annotation>
</attribute>
@@ -158,6 +158,15 @@
<annotation>
<documentation>
A reference to a Predicate which controls whether this encoder will run
+ Mutually exclusive with relyingParties
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="relyingParties" type="string">
+ <annotation>
+ <documentation>
+ A (space separated) list of entities for which this plugin is to be active
+ Mutually exclusive with activationConditionRef
</documentation>
</annotation>
</attribute>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list