[java-identity-provider COMMIT] in /trunk: idp-distribution/src/main/resources/bin/build.xml idp-installer/src/main/j...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Sep 2 08:27:12 EDT 2014
Author: rdw
Date: Tue Sep 2 08:27:12 2014
New Revision: 6494
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6494&view=rev
Log:
IDP-469 Modify idp.properties as part of an initial install.
MSI will provide a second properties file to merge in. Non MSI will prompt
for entityID and use that to merge idp.entityID only.
Added:
trunk/idp-installer/src/main/java/net/shibboleth/idp/installer/ant/MergeProperties.java
Modified:
trunk/idp-distribution/src/main/resources/bin/build.xml
trunk/idp-installer/src/main/resources/net/shibboleth/idp/installer/ant.xml
Modified: trunk/idp-distribution/src/main/resources/bin/build.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-distribution/src/main/resources/bin/build.xml?rev=6494&r1=6493&r2=6494&view=diff
==============================================================================
--- trunk/idp-distribution/src/main/resources/bin/build.xml (original)
+++ trunk/idp-distribution/src/main/resources/bin/build.xml Tue Sep 2 08:27:12 2014
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project name="Shibboleth Identity Provider V3" basedir=".." default="upgrade">
+<project name="Shibboleth Identity Provider V3" basedir=".." default="install">
<taskdef resource="net/shibboleth/idp/installer/ant.xml"/>
@@ -29,7 +29,7 @@
idp.sealer.password:
idp.sealer.alias:
idp.keystore.password:
-
+ idp.merge.properties: The name of a property file to merge with idp.properties
The property idp.noprompt will cause a failure rather than a prompt.
-->
@@ -70,21 +70,28 @@
<target name="getsource" unless="idp.src.dir" depends="checkproperties">
<fail if="idp.noprompt">Input needed, silence demanded</fail>
- <input message="Source (Distribution) Directory" addproperty="idp.src.dir"/>
- </target>
-
- <target name="gettarget" depends="prompttarget, settarget"/>
-
- <target name="prompttarget" if="idp.ask.target" depends="checkproperties">
+ <input message="Source (Distribution) Directory" addproperty="idp.src.dir" defaultvalue="${basedir}"/>
+ </target>
+
+ <target name="gettarget" depends="target-properties, prompttarget, settarget"/>
+
+ <target name="prompttarget" if="idp.ask.target">
<fail if="idp.noprompt">Input needed, silence demanded</fail>
<input message="Target (Install to) Directory" addproperty="idp.target.dir" defaultvalue="${basedir}"/>
</target>
- <target name="settarget" if="idp.set.target" depends="checkproperties">
- <echo>ist=${idp.set.target} inp=${idp.noprompt} iat=${idp.ask.target} itd=${idp.target.dir}</echo>
+ <target name="settarget" if="idp.set.target" >
<property name="idp.target.dir" value="${basedir}"/>
</target>
+ <target name="getentityid" if="idp.ask.entityid" depends="checkproperties">
+ <fail if="idp.noprompt">Input needed, silence demanded</fail>
+ <local name="entityid"/>
+ <input message="EntityID" addproperty="entityid" defaultvalue="https://${idp.host.name}/shibboleth/idp"/>
+ <echo file="replace.properties">idp.entityID=${entityid}</echo>
+ <property name="idp.merge.properties" value="replace.properties"/>
+ </target>
+
<!--
KEY MANAGEMENT
@@ -95,11 +102,12 @@
<target name="genkeys" depends="init, checkproperties, signing-key, encryption-key, keystore, sealer"/>
- <target name="checkproperties">
+ <target name="checkproperties" depends="gettarget">
<available property="idp.signing.present" file="${idp.target.dir}/creds/idp-signing.crt"/>
<available property="idp.encryption.present" file="${idp.target.dir}/creds/idp-encryption.crt"/>
<available property="idp.keystore.present" file="${idp.target.dir}/creds/idp-tls.p12"/>
<available property="idp.sealer.present" file="${idp.target.dir}/creds/sealer.kver"/>
+ <available property="idp.properties.present" file="${idp.target.dir}/conf/idp.properties"/>
<condition property="idp.will.call.certgen">
<!-- we will call the cert gen if
EITHER we don't have a signing key
@@ -174,6 +182,21 @@
</and>
</condition>
+ <condition property="idp.ask.entityid">
+ <!-- Ask for EntityID if this is not an upgrade and the property file wasn't provided -->
+ <and>
+ <not>
+ <isset property="idp.merge.properties"/>
+ </not>
+ <not>
+ <istrue value="${idp.properties.present}"/>
+ </not>
+ </and>
+ </condition>
+
+ </target>
+
+ <target name="target-properties">
<condition property="idp.ask.target">
<and>
<not>
@@ -216,7 +239,7 @@
<echo>Creating TLS keystore, hostname ${idp.host.name} URI = ${idp.uri.subject.alt.name} password supressed</echo>
<selfsignedcert hostname="${idp.host.name}"
keystoreFile="${idp.target.dir}/creds/idp-tls.p12"
- keystorePassword="$(idp.keystore.password}"
+ keystorePassword="${idp.keystore.password}"
[... 85 lines stripped ...]
More information about the commits
mailing list