support overriding certificate lifetime by means of an environment option - SIDP-286
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 11 Jan 2011 11:38:03 +0000 (11:38 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 11 Jan 2011 11:38:03 +0000 (11:38 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/branches/REL_2@2981 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

doc/RELEASE-NOTES.txt
pom.xml
src/installer/resources/build.xml

index 485fc8f..8a914f2 100644 (file)
@@ -1,5 +1,6 @@
 Changes in Release 2.2.1
 =============================================
+[SIDP-286] - Configurable validity period for self signed certificate
 [SIDP-417] - Shib deployed to root web context, SSOProfileHandler forwards to "/null/AuthnEngine"
 [SIDP-421] - Error logging SOAP queries
 [SIDP-422] - aacli.sh Exception in thread "main" 
diff --git a/pom.xml b/pom.xml
index 925f818..0ff08ed 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <dependency>
             <groupId>edu.internet2.middleware</groupId>
             <artifactId>ant-extensions</artifactId>
-            <version>13Apr2008</version>
+            <version>11Jan2011</version>
             <scope>runtime</scope>
             <exclusions>
                 <exclusion>
index 89838bf..e126145 100755 (executable)
@@ -5,10 +5,13 @@
     <property name="tools.dir" value="${basedir}/src/tools" />
     <property name="webapp.dir" value="${basedir}/src/main/webapp" />
     <property name="war.name" value="idp" />
+       
+    <!-- Load property from the environment -->
+    <property environment="env" />
 
     <!-- Installation specific property file -->
     <property file="${resources.dir}/install.properties" />
-
+       
     <!-- Load ant-contrib tasks -->
     <taskdef resource="net/sf/antcontrib/antlib.xml" />
 
                 <regexSplit input="${idp.hostname}" regex="^.*\.(.*\..*$)" addproperty="idp.scope" />
 
                 <echo message="Generating signing and encryption key, certificate, and keystore. " />
+               
+               <if>
+                   <isset property="env.IdPCertLifetime" />
+                       <then>
+                               <var name="idp.cert.lifetime" value="${env.IdPCertLifetime}" />
+                       </then>
+                       <else>
+                               <var name="idp.cert.lifetime" value="20" />
+                       </else>
+               </if>
+                       
                 <selfSignedCert hostname="${idp.hostname}"
                                 privateKeyFile="${idp.home.path}/credentials/idp.key"
                                 certificateFile="${idp.home.path}/credentials/idp.crt"
                                 keystoreFile="${idp.home.path}/credentials/idp.jks"
                                 keystorePassword="${idp.keystore.pass}"
-                                uriSubjectAltNames="${idp.entity.id}" />
+                                uriSubjectAltNames="${idp.entity.id}" 
+                                certificateLifetime="${idp.cert.lifetime}" />
 
                 <copy todir="${idp.home.path}/bin" preservelastmodified="true" overwrite="true">
                     <fileset dir="${tools.dir}/bash" />