[java-identity-provider COMMIT] in /trunk: idp-conf/src/main/resources/conf/idp.properties idp-conf/src/main/resource...

noreply at shibboleth.net noreply at shibboleth.net
Fri Mar 6 16:04:08 EST 2015


Author: tzeller
Date: Fri Mar  6 16:04:08 2015
New Revision: 7398

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7398&view=rev
Log:
IDP-633 Default consent storage record expiration to 1 year.

Modified:
    trunk/idp-conf/src/main/resources/conf/idp.properties
    trunk/idp-conf/src/main/resources/system/conf/profile-intercept-system.xml
    trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/ConsentFlowDescriptor.java
    trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/storage/CreateGlobalConsentResult.java
    trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/storage/CreateResult.java
    trunk/idp-consent/src/test/java/net/shibboleth/idp/consent/flow/ConsentFlowDescriptorTest.java

Modified: trunk/idp-conf/src/main/resources/conf/idp.properties
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/conf/idp.properties?rev=7398&r1=7397&r2=7398&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/conf/idp.properties (original)
+++ trunk/idp-conf/src/main/resources/conf/idp.properties Fri Mar  6 16:04:08 2015
@@ -133,6 +133,9 @@
 # Set to -1 for unlimited server-side storage
 #idp.consent.maxStoredRecords = 10
 
+# Time in milliseconds to expire consent storage records.
+#idp.consent.storageRecordLifetime = P1Y
+
 # Whether to lookup metadata, etc. for every SP involved in a logout
 # for use by user interface logic; adds overhead so off by default.
 #idp.logout.elaboration = false

Modified: trunk/idp-conf/src/main/resources/system/conf/profile-intercept-system.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/system/conf/profile-intercept-system.xml?rev=7398&r1=7397&r2=7398&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/system/conf/profile-intercept-system.xml (original)
+++ trunk/idp-conf/src/main/resources/system/conf/profile-intercept-system.xml Fri Mar  6 16:04:08 2015
@@ -40,6 +40,7 @@
             p:globalConsentAllowed="%{idp.consent.allowGlobal:true}"
             p:perAttributeConsentEnabled="%{idp.consent.allowPerAttribute:false}"
             p:compareValues="%{idp.consent.compareValues:false}"
+            p:lifetime="%{idp.consent.storageRecordLifetime:P1Y}"
             p:maximumNumberOfStoredRecords="%{idp.consent.maxStoredRecords:10}"
             p:nonBrowserSupported="false">
         <property name="activationCondition">
@@ -61,6 +62,7 @@
         class="net.shibboleth.idp.consent.flow.ConsentFlowDescriptor"
         p:storageService-ref="%{idp.consent.StorageService:shibboleth.ClientPersistentStorageService}"
         p:compareValues="%{idp.consent.compareValues:false}"
+        p:lifetime="%{idp.consent.storageRecordLifetime:P1Y}"
         p:maximumNumberOfStoredRecords="%{idp.consent.maxStoredRecords:10}"
         p:nonBrowserSupported="false" />
 

Modified: trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/ConsentFlowDescriptor.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/ConsentFlowDescriptor.java?rev=7398&r1=7397&r2=7398&view=diff
==============================================================================
--- trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/ConsentFlowDescriptor.java (original)
+++ trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/ConsentFlowDescriptor.java Fri Mar  6 16:04:08 2015
@@ -18,13 +18,13 @@
 package net.shibboleth.idp.consent.flow;
 
 import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
 
 import net.shibboleth.idp.profile.interceptor.ProfileInterceptorFlowDescriptor;
 import net.shibboleth.utilities.java.support.annotation.Duration;
 import net.shibboleth.utilities.java.support.annotation.constraint.NonNegative;
 import net.shibboleth.utilities.java.support.component.ComponentSupport;
 import net.shibboleth.utilities.java.support.logic.Constraint;
+import net.shibboleth.utilities.java.support.xml.DOMTypeSupport;
 
 /**
  * Descriptor for a consent flow.
@@ -37,11 +37,16 @@
     /** Whether consent equality includes comparing consent values. */
     private boolean compareValues;
 
-    /** Maximum amount of time, in milliseconds, before a consent storage record expires. */
-    @Nullable @Duration @NonNegative private Long lifetime;
-    
+    /** Time in milliseconds to expire consent storage records. Default value: 1 year. */
+    @Nonnull @Duration @NonNegative private Long lifetime;
+
     /** Maximum number of records stored in the storage service. */
     @Nonnull private int maxStoredRecords;
+
+    /** Constructor. */
+    public ConsentFlowDescriptor() {
+        lifetime = DOMTypeSupport.durationToLong("P1Y");
+    }
 
     /**
      * Whether consent equality includes comparing consent values.
@@ -51,13 +56,13 @@
     public boolean compareValues() {
         return compareValues;
     }
-    
+
     /**

[... 85 lines stripped ...]


More information about the commits mailing list