[java-opensaml] branch master updated: OSJ-200: Improve logging around expired metadata refresh attempts

Brent Putman putmanb at georgetown.edu
Mon May 22 15:07: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-opensaml.

View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=39f9043e338243ef9af48cd7bdcae8a26c5080e7

The following commit(s) were added to refs/heads/master by this push:
       new  39f9043   OSJ-200: Improve logging around expired metadata refresh attempts
39f9043 is described below

commit 39f9043e338243ef9af48cd7bdcae8a26c5080e7
Author: Brent Putman <putmanb at georgetown.edu>
AuthorDate: Mon May 22 15:06:23 2017 -0400

    OSJ-200: Improve logging around expired metadata refresh attempts
    
    Change default of expirationWarningThreshold to 0ms (disabled).
---
 .../resolver/impl/AbstractReloadingMetadataResolver.java         | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractReloadingMetadataResolver.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractReloadingMetadataResolver.java
index 70dea01..19cb178 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractReloadingMetadataResolver.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractReloadingMetadataResolver.java
@@ -91,8 +91,8 @@ public abstract class AbstractReloadingMetadataResolver extends AbstractBatchMet
     private DateTime expirationTime;
     
     /** Impending expiration warning threshold for metadata refresh, in milliseconds. 
-     * Default value: 432000000ms (12 hours). */
-    @Duration @Positive private long expirationWarningThreshold = 12*60*60*1000;
+     * Default value: 0ms (disabled). */
+    @Duration @Positive private long expirationWarningThreshold = 0;
 
     /** Last time the metadata was updated. */
     private DateTime lastUpdate;
@@ -217,7 +217,7 @@ public abstract class AbstractReloadingMetadataResolver extends AbstractBatchMet
         ComponentSupport.ifDestroyedThrowDestroyedComponentException(this);
         
         if (threshold < 0) {
-            throw new IllegalArgumentException("Expiration warning threshold must be greater than 0");
+            throw new IllegalArgumentException("Expiration warning threshold must be greater than or equal to 0");
         }
         expirationWarningThreshold = threshold;
     }
@@ -393,7 +393,8 @@ public abstract class AbstractReloadingMetadataResolver extends AbstractBatchMet
         } else if (cached instanceof TimeBoundSAMLObject) {
             final TimeBoundSAMLObject timebound = (TimeBoundSAMLObject) cached;
             if (isRequireValidMetadata() && timebound.getValidUntil() != null) {
-                if (timebound.getValidUntil().isBefore(now.plus(getExpirationWarningThreshold()))) {
+                if (getExpirationWarningThreshold() > 0 
+                        && timebound.getValidUntil().isBefore(now.plus(getExpirationWarningThreshold()))) {
                     log.warn("{} Metadata root from '{}' currently live (post-refresh) will expire "
                             + "within the configured threshhold at '{}'",
                             getLogPrefix(), mdId, timebound.getValidUntil());

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list