[java-identity-provider] branch master updated: OSJ-248 - remove NameIDFormat elements from metadata
Scott Cantor
cantor.2 at osu.edu
Tue Sep 4 12:00:46 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=4e91c2f103f6f877b235ebb87b9fb1714c76a823
The following commit(s) were added to refs/heads/master by this push:
new 4e91c2f OSJ-248 - remove NameIDFormat elements from metadata
4e91c2f is described below
commit 4e91c2f103f6f877b235ebb87b9fb1714c76a823
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Sep 4 12:00:02 2018 -0400
OSJ-248 - remove NameIDFormat elements from metadata
https://issues.shibboleth.net/jira/browse/OSJ-248
Add to schema, Spring parser.
---
.../metadata/filter/impl/NameIDFormatFilterParser.java | 4 ++++
.../profile/spring/relyingparty/metadata/filter/nameIDFormat.xml | 4 ++--
idp-schema/src/main/resources/schema/shibboleth-metadata.xsd | 7 +++++++
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/impl/NameIDFormatFilterParser.java b/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/impl/NameIDFormatFilterParser.java
index dc5a477..01c24e4 100644
--- a/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/impl/NameIDFormatFilterParser.java
+++ b/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/impl/NameIDFormatFilterParser.java
@@ -63,6 +63,10 @@ public class NameIDFormatFilterParser extends AbstractSingleBeanDefinitionParser
builder.setDestroyMethodName("destroy");
builder.setLazyInit(true);
+ if (element.hasAttributeNS(null, "removeExistingFormats")) {
+ builder.addPropertyValue("removeExistingFormats", element.getAttributeNS(null, "removeExistingFormats"));
+ }
+
// Accumulate formats to attach as rule values.
final List<String> accumulator = new ArrayList<>();
diff --git a/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/nameIDFormat.xml b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/nameIDFormat.xml
index 4f0046d..92d0a54 100644
--- a/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/nameIDFormat.xml
+++ b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/nameIDFormat.xml
@@ -7,7 +7,7 @@
failFastInitialization="false" requireValidMetadata="false"
id="nameIDFormat" xsi:type="metadata:InlineMetadataProvider">
- <metadata:MetadataFilter xsi:type="metadata:NameIDFormat">
+ <metadata:MetadataFilter xsi:type="metadata:NameIDFormat" removeExistingFormats="true">
<metadata:Format>foo</metadata:Format>
<metadata:Entity>https://sp.example.org/sp/shibboleth</metadata:Entity>
<metadata:Format>bar</metadata:Format>
@@ -33,7 +33,7 @@
<SPSSODescriptor
protocolSupportEnumeration="urn:oasis:names:tc:SAML:1.1:protocol urn:oasis:names:tc:SAML:2.0:protocol">
-
+ <NameIDFormat>baz</NameIDFormat>
<AssertionConsumerService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign"
Location="https://sp2.example.org/Shibboleth.sso/SAML2/POST-SimpleSign"
diff --git a/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd b/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd
index 07d7752..26a5616 100644
--- a/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd
+++ b/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd
@@ -1246,6 +1246,13 @@
</annotation>
</element>
</choice>
+ <attribute name="removeExistingFormats" type="boolean">
+ <annotation>
+ <documentation>
+ Whether to remove any existing formats when adding new ones (default is false).
+ </documentation>
+ </annotation>
+ </attribute>
</extension>
</complexContent>
</complexType>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list