[java-identity-provider] branch main updated: IDP-1877 - Allow ByReference filter to apply to multiple providers
Scott Cantor
cantor.2 at osu.edu
Fri Nov 5 20:10:40 UTC 2021
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=9940ead49dab1fee6bf2bd4ab6e49f542dd433bc
The following commit(s) were added to refs/heads/main by this push:
new 9940ead49 IDP-1877 - Allow ByReference filter to apply to multiple providers
9940ead49 is described below
commit 9940ead49dab1fee6bf2bd4ab6e49f542dd433bc
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri Nov 5 16:10:37 2021 -0400
IDP-1877 - Allow ByReference filter to apply to multiple providers
https://shibboleth.atlassian.net/browse/IDP-1877
---
.../relyingparty/metadata/filter/impl/ByReferenceParser.java | 5 ++++-
.../spring/relyingparty/metadata/filter/entityAttributesByRef.xml | 2 +-
idp-schema/src/main/resources/schema/shibboleth-metadata.xsd | 8 +++++++-
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/impl/ByReferenceParser.java b/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/impl/ByReferenceParser.java
index e5fefe6e6..3347d8301 100644
--- a/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/impl/ByReferenceParser.java
+++ b/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/impl/ByReferenceParser.java
@@ -25,6 +25,7 @@ import javax.xml.namespace.QName;
import org.opensaml.saml.metadata.resolver.filter.MetadataFilterChain;
import org.opensaml.saml.metadata.resolver.filter.impl.ByReferenceMetadataFilter;
import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.ManagedList;
import org.springframework.beans.factory.support.ManagedMap;
@@ -66,7 +67,9 @@ public class ByReferenceParser extends AbstractCustomBeanDefinitionParser {
final List<Element> filters = ElementSupport.getChildElements(child,
new QName(AbstractMetadataProviderParser.METADATA_NAMESPACE, "MetadataFilter"));
if (filters != null && !filters.isEmpty()) {
- final String providerRef = child.getAttributeNS(null, "providerRef");
+ final AbstractBeanDefinition providerRef =
+ SpringSupport.getAttributeValueAsList(child.getAttributeNodeNS(null, "providerRef"));
+
final ManagedList<BeanDefinition> filterBeans =
SpringSupport.parseCustomElements(filters, parserContext, builder);
if (filterBeans != null) {
diff --git a/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/entityAttributesByRef.xml b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/entityAttributesByRef.xml
index f538f19b7..6b4961084 100644
--- a/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/entityAttributesByRef.xml
+++ b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/entityAttributesByRef.xml
@@ -10,7 +10,7 @@
xsi:type="metadata:ByReference">
- <metadata:MetadataFilters providerRef="entityAttributes">
+ <metadata:MetadataFilters providerRef="entityAttributes fooMetadata barMetadata">
<metadata:MetadataFilter xsi:type="metadata:EntityAttributes">
<metadata:AttributeFilterRef>predicate.AlwaysFalse</metadata:AttributeFilterRef>
diff --git a/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd b/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd
index 679ec8cd6..6ee77b998 100644
--- a/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd
+++ b/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd
@@ -1334,7 +1334,7 @@
<sequence>
<element ref="shibmd:MetadataFilter" minOccurs="0" maxOccurs="unbounded" />
</sequence>
- <attribute name="providerRef" type="shibmd:string" use="required" />
+ <attribute name="providerRef" type="shibmd:listOfStrings" use="required" />
</complexType>
</element>
</sequence>
@@ -1415,10 +1415,16 @@
</annotation>
</attribute>
</complexType>
+
+ <simpleType name="listOfStrings">
+ <list itemType="shibmd:string"/>
+ </simpleType>
<simpleType name="string">
<restriction base="string">
<minLength value="1"/>
</restriction>
</simpleType>
+
+
</schema>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list