[java-identity-provider] branch master updated: OSJ-200: Improve logging around expired metadata refresh attempts
Brent Putman
putmanb at georgetown.edu
Wed May 10 20:27:26 EDT 2017
This is an automated email from the git hooks/post-receive script.
putmanb 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=b68f869f421f473830adc195a455acdfb73a8737
The following commit(s) were added to refs/heads/master by this push:
new b68f869 OSJ-200: Improve logging around expired metadata refresh attempts
b68f869 is described below
commit b68f869f421f473830adc195a455acdfb73a8737
Author: Brent Putman <putmanb at georgetown.edu>
AuthorDate: Wed May 10 20:26:40 2017 -0400
OSJ-200: Improve logging around expired metadata refresh attempts
Add 'expirationWarningThreshold' duration property to schema and parser
for reloading metadata resolvers.
---
.../metadata/impl/AbstractReloadingMetadataProviderParser.java | 5 +++++
.../metadata/FileBackedHTTPMetadataProviderParserTest.java | 1 +
.../spring/relyingparty/metadata/FilesystemMetadataParserTest.java | 1 +
.../relyingparty/metadata/HTTPMetadataProviderParserTest.java | 1 +
.../idp/profile/spring/relyingparty/metadata/HTTPEntity.xml | 2 +-
.../profile/spring/relyingparty/metadata/fileBackedHTTPEntity.xml | 1 +
.../idp/profile/spring/relyingparty/metadata/fileEntities.xml | 2 +-
idp-schema/src/main/resources/schema/shibboleth-metadata.xsd | 7 +++++++
8 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/AbstractReloadingMetadataProviderParser.java b/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/AbstractReloadingMetadataProviderParser.java
index 1ad74ed..94e5d84 100644
--- a/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/AbstractReloadingMetadataProviderParser.java
+++ b/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/AbstractReloadingMetadataProviderParser.java
@@ -75,6 +75,11 @@ public abstract class AbstractReloadingMetadataProviderParser extends AbstractMe
StringSupport.trimOrNull(element.getAttributeNS(null, "minRefreshDelay")));
}
+ if (element.hasAttributeNS(null, "expirationWarningThreshold")) {
+ builder.addPropertyValue("expirationWarningThreshold",
+ StringSupport.trimOrNull(element.getAttributeNS(null, "expirationWarningThreshold")));
+ }
+
builder.addPropertyReference("parserPool", getParserPoolRef(element));
}
diff --git a/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/FileBackedHTTPMetadataProviderParserTest.java b/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/FileBackedHTTPMetadataProviderParserTest.java
index 3bd7025..f45cb87 100644
--- a/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/FileBackedHTTPMetadataProviderParserTest.java
+++ b/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/FileBackedHTTPMetadataProviderParserTest.java
@@ -56,6 +56,7 @@ public class FileBackedHTTPMetadataProviderParserTest extends AbstractMetadataPa
Assert.assertFalse(entities.hasNext());
Assert.assertEquals(resolver.getRefreshDelayFactor(), 0.75, 0.001);
+ Assert.assertEquals(resolver.getExpirationWarningThreshold(), 1000*60*60*12);
Assert.assertSame(resolver.getParserPool(), parserPool);
Assert.assertEquals(resolver.isInitializeFromBackupFile(), false);
diff --git a/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/FilesystemMetadataParserTest.java b/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/FilesystemMetadataParserTest.java
index 66025c0..c21c0a1 100644
--- a/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/FilesystemMetadataParserTest.java
+++ b/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/FilesystemMetadataParserTest.java
@@ -57,6 +57,7 @@ public class FilesystemMetadataParserTest extends AbstractMetadataParserTest {
Assert.assertEquals(resolver.getMaxRefreshDelay(), 1000*60*55);
Assert.assertEquals(resolver.getMinRefreshDelay(), 1000*60*15);
Assert.assertEquals(resolver.getRefreshDelayFactor(), 0.5, 0.001);
+ Assert.assertEquals(resolver.getExpirationWarningThreshold(), 1000*60*60*12);
Assert.assertNotSame(resolver.getParserPool(), parserPool);
final Iterator<EntityDescriptor> entities = resolver.resolve(criteriaFor(IDP_ID)).iterator();
diff --git a/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/HTTPMetadataProviderParserTest.java b/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/HTTPMetadataProviderParserTest.java
index 6695e13..8f35446 100644
--- a/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/HTTPMetadataProviderParserTest.java
+++ b/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/HTTPMetadataProviderParserTest.java
@@ -55,6 +55,7 @@ public class HTTPMetadataProviderParserTest extends AbstractMetadataParserTest {
Assert.assertFalse(entities.hasNext());
Assert.assertEquals(resolver.getRefreshDelayFactor(), 0.75, 0.001);
+ Assert.assertEquals(resolver.getExpirationWarningThreshold(), 1000*60*60*12);
Assert.assertSame(resolver.getParserPool(), parserPool);
Assert.assertNull(resolver.resolveSingle(criteriaFor(SP_ID)));
diff --git a/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/HTTPEntity.xml b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/HTTPEntity.xml
index 23e8fcf..6bcd8b2 100644
--- a/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/HTTPEntity.xml
+++ b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/HTTPEntity.xml
@@ -4,7 +4,7 @@
xsi:schemaLocation="urn:mace:shibboleth:2.0:metadata http://shibboleth.net/schema/idp/shibboleth-metadata.xsd
urn:oasis:names:tc:SAML:2.0:metadata http://docs.oasis-open.org/security/saml/v2.0/saml-schema-metadata-2.0.xsd"
- id="HTTPEntity" xsi:type="metadata:HTTPMetadataProvider" metadataURL="%{metadataURL}">
+ id="HTTPEntity" xsi:type="metadata:HTTPMetadataProvider" metadataURL="%{metadataURL}" expirationWarningThreshold="PT12H">
</metadata:MetadataProvider>
\ No newline at end of file
diff --git a/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/fileBackedHTTPEntity.xml b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/fileBackedHTTPEntity.xml
index bddd388..c048730 100644
--- a/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/fileBackedHTTPEntity.xml
+++ b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/fileBackedHTTPEntity.xml
@@ -8,6 +8,7 @@
backingFile="%{DIR}/spoolFileEntity.xml"
initializeFromBackupFile="false"
backupFileInitNextRefreshDelay="PT10S"
+ expirationWarningThreshold="PT12H"
metadataURL="%{metadataURL}">
</metadata:MetadataProvider>
diff --git a/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/fileEntities.xml b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/fileEntities.xml
index 4754bb5..a9a98c7 100644
--- a/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/fileEntities.xml
+++ b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/fileEntities.xml
@@ -4,7 +4,7 @@
xsi:schemaLocation="urn:mace:shibboleth:2.0:metadata http://shibboleth.net/schema/idp/shibboleth-metadata.xsd
urn:oasis:names:tc:SAML:2.0:metadata http://docs.oasis-open.org/security/saml/v2.0/saml-schema-metadata-2.0.xsd"
- parserPoolRef="myParserPool" refreshDelayFactor="0.5" maxRefreshDelay="PT55M" minRefreshDelay="PT15M"
+ parserPoolRef="myParserPool" refreshDelayFactor="0.5" maxRefreshDelay="PT55M" minRefreshDelay="PT15M" expirationWarningThreshold="PT12H"
id="fileEntities" xsi:type="metadata:FilesystemMetadataProvider" metadataFile="%{DIR}/entities.xml">
</metadata:MetadataProvider>
diff --git a/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd b/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd
index 7a9b96d..3d75fc1 100644
--- a/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd
+++ b/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd
@@ -840,6 +840,13 @@
</documentation>
</annotation>
</attribute>
+ <attribute name="expirationWarningThreshold" type="string">
+ <annotation>
+ <documentation>
+ Impending expiration warning threshold for metadata refresh.
+ </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