[java-identity-provider] 01/01: IDP-1927 WIP
Rod Widdowson
rdw at steadingsoftware.com
Wed Oct 5 12:19:46 UTC 2022
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch dev/IDP-1927
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=8d6f8879c57a67e1b96517b4274ae2e4b70db0df
commit 8d6f8879c57a67e1b96517b4274ae2e4b70db0df
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Wed Oct 5 13:19:30 2022 +0100
IDP-1927 WIP
---
idp-installer/src/main/wix/MergeModule.wxs | 2 +-
idp-installer/src/main/wix/ShibbolethIdP-main.wxs | 19 ++++++++++++----
.../src/main/wix/ShibbolethIdP-registry.wxs | 7 +++++-
idp-installer/src/main/wix/procrun.wxs | 25 +++++++++++++++-------
idp-installer/src/main/wix/scripts/shib_random.vbs | 8 +++++++
5 files changed, 47 insertions(+), 14 deletions(-)
diff --git a/idp-installer/src/main/wix/MergeModule.wxs b/idp-installer/src/main/wix/MergeModule.wxs
index be79d645b..46eaf5d2a 100644
--- a/idp-installer/src/main/wix/MergeModule.wxs
+++ b/idp-installer/src/main/wix/MergeModule.wxs
@@ -16,7 +16,7 @@
permissions and limitations under the License. -->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
- <Module Id="Jetty" Language="1033" Version="3.1.8.0">
+ <Module Id="Jetty" Language="1033" Version="4.2.1.2">
<Package Id="684b3207-0d64-43e6-9e6a-3acb8b7672d7" Manufacturer="The Shibboleth Consortium" InstallerVersion="310" Description="Merge Module for Jetty" Comments="This module is built by the Shibboleth Consortium. Includes Jetty (from Eclipse) and Procrun (from Apache)" Platform="x64" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="JETTYROOT" Name="Jetty" />
diff --git a/idp-installer/src/main/wix/ShibbolethIdP-main.wxs b/idp-installer/src/main/wix/ShibbolethIdP-main.wxs
index 7228d82b7..fa670ff82 100644
--- a/idp-installer/src/main/wix/ShibbolethIdP-main.wxs
+++ b/idp-installer/src/main/wix/ShibbolethIdP-main.wxs
@@ -19,7 +19,7 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
- <Product Id="*" Name="Shibboleth IdP V4" Language="1033" Version="4.1.8.0" Manufacturer="The Shibboleth Consortium" UpgradeCode="$(var.UpgradeUUID)">
+ <Product Id="*" Name="Shibboleth IdP V4" Language="1033" Version="4.2.1.2" Manufacturer="The Shibboleth Consortium" UpgradeCode="$(var.UpgradeUUID)">
<Package InstallerVersion="310" Compressed="yes" InstallScope="perMachine" Platform="x64" Description="Shibboleth IdP V4.1" Manufacturer="The Shibboleth Consortium" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." AllowSameVersionUpgrades="yes" Schedule="afterInstallInitialize" />
@@ -56,6 +56,8 @@
<Directory Id="ConfFolder" Name="conf" />
<Directory Id="JettyBaseFolder" Name="jetty-base">
<Directory Id="StartDotD" Name="start.d" />
+ <Directory Id="JettyLogs" Name="logs" />
+ <Directory Id="JettyTmp" Name="tmp" />
</Directory>
<Directory Id="BinFolder" Name="bin">
<Component Id="Shibd_idpw" Guid="{30E1130E-BEBF-4167-83A0-BBDE083968C4}" Win64="no">
@@ -67,17 +69,26 @@
<RegistryValue Id="SetPermissions" Root="HKLM" Key="SOFTWARE\Shibboleth\IdP" Name="SetPermissions" Value="TRUE" Type="string" KeyPath="yes" />
<CreateFolder Directory="CredsFolder">
<Permission User="Administrators" GenericAll="yes" />
+ <Permission User="SHIBD_IDP_USER" GenericRead="yes" />
</CreateFolder>
<CreateFolder Directory="ConfFolder">
<Permission User="Administrators" GenericAll="yes" />
+ <Permission User="SHIBD_IDP_USER" GenericRead="yes" />
</CreateFolder>
</Component>
<Component Id="JettyPermissions" Guid="{900980C5-CF3D-4816-9922-6142C12F6D13}" Win64="no">
<RegistryValue Id="SetPermissionsJetty" Root="HKLM" Key="SOFTWARE\Shibboleth\IdP" Name="SetPermissionsJetty" Value="TRUE" Type="string" KeyPath="yes" />
<CreateFolder Directory="StartDotD">
<Permission User="Administrators" GenericAll="yes" />
- </CreateFolder>
- </Component>
+ <Permission User="SHIBD_IDP_USER" GenericRead="yes" />
+ </CreateFolder>
+ <CreateFolder Directory="JettyLogs">
+ <Permission User="SHIBD_IDP_USER" GenericAll="yes" Append="yes"/>
+ </CreateFolder>
+ <CreateFolder Directory="JettyTmp">
+ <Permission User="SHIBD_IDP_USER" GenericAll="yes" Append="yes"/>
+ </CreateFolder>
+ </Component>
</Directory>
</Directory>
</Directory>
@@ -89,7 +100,7 @@
</DirectorySearch>
</Property>
- <Property Id="UCRTBASE_DLL" Secure="yes">
+ <Property Id="UCRTBASE_DLL" Secure="yes">
<DirectorySearch Id="UcrtBaseSearch" Depth="0" Path="[System64Folder]">
<FileSearch Id="UcrtnSearch" Name="ucrtbase.dll" />
</DirectorySearch>
diff --git a/idp-installer/src/main/wix/ShibbolethIdP-registry.wxs b/idp-installer/src/main/wix/ShibbolethIdP-registry.wxs
index fb4627de2..c18c38cde 100644
--- a/idp-installer/src/main/wix/ShibbolethIdP-registry.wxs
+++ b/idp-installer/src/main/wix/ShibbolethIdP-registry.wxs
@@ -37,9 +37,11 @@
<RegistryKey Key="SOFTWARE\Apache Software Foundation\Procrun 2.0\$(var.ServiceName)\Parameters\Java" Root="HKLM" ForceCreateOnInstall="yes">
<Permission User="Administrators" GenericAll="yes" />
<Permission User="SYSTEM" GenericAll="yes" />
+ <Permission User="SHIBD_IDP_USER" GenericRead="yes" />
<RegistryValue Name="Options" Type="multiString">
<Permission User="Administrators" GenericAll="yes" />
<Permission User="SYSTEM" GenericAll="yes" />
+ <Permission User="SHIBD_IDP_USER" GenericRead="yes" />
<MultiStringValue>-Didp.home=[JAVA_IDP_HOME]</MultiStringValue>
<MultiStringValue>-Djdk.tls.ephemeralDHKeySize=2048</MultiStringValue>
<MultiStringValue>-Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.Slf4jLog</MultiStringValue>
@@ -50,6 +52,7 @@
<!-- Its an integer, but we added the # -->
<Permission User="Administrators" GenericAll="yes" />
<Permission User="SYSTEM" GenericAll="yes" />
+ <Permission User="SHIBD_IDP_USER" GenericRead="yes" />
</RegistryValue>
</RegistryKey>
<RegistryKey Key="SOFTWARE\Apache Software Foundation\Procrun 2.0\$(var.ServiceName)\Parameters\Start" Root="HKLM" ForceCreateOnInstall="yes">
@@ -58,7 +61,8 @@
<RegistryValue Name="Params" Type="multiString" Action="append">
<Permission User="Administrators" GenericAll="yes" />
<Permission User="SYSTEM" GenericAll="yes" />
- <MultiStringValue>jetty.http.compliance=RFC7230_NO_AMBIGUOUS_URIS</MultiStringValue>
+ <Permission User="SHIBD_IDP_USER" GenericRead="yes" />
+ <MultiStringValue>jetty.http.compliance=RFC7230_NO_AMBIGUOUS_URIS</MultiStringValue>
<MultiStringValue>jetty.base=[INSTALLDIR]\jetty-base</MultiStringValue>
<MultiStringValue>jetty.logging.dir=[INSTALLDIR]\jetty-base\logs</MultiStringValue>
</RegistryValue>
@@ -70,6 +74,7 @@
<RegistryValue Name="Params" Type="multiString" Action="append">
<Permission User="Administrators" GenericAll="yes" />
<Permission User="SYSTEM" GenericAll="yes" />
+ <Permission User="SHIBD_IDP_USER" GenericRead="yes" />
<MultiStringValue>jetty.base=[INSTALLDIR]\jetty-base</MultiStringValue>
<MultiStringValue>jetty.logging.dir=[INSTALLDIR]\jetty-base\logs</MultiStringValue>
</RegistryValue>
diff --git a/idp-installer/src/main/wix/procrun.wxs b/idp-installer/src/main/wix/procrun.wxs
index 3d7a13779..b0d6bd3d0 100644
--- a/idp-installer/src/main/wix/procrun.wxs
+++ b/idp-installer/src/main/wix/procrun.wxs
@@ -14,7 +14,8 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing
permissions and limitations under the License. -->
-<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:fw="http://schemas.microsoft.com/wix/FirewallExtension">
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:fw="http://schemas.microsoft.com/wix/FirewallExtension"
+ xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<?define ServiceStart="auto"?>
<?define ServiceName="shibd_idp"?>
<Fragment>
@@ -28,6 +29,7 @@
</InstallExecuteSequence>
</Fragment>
<Fragment>
+ <Property Id="PROCRUN_PASS" Hidden="yes" Secure="yes"/>
<ComponentGroup Id="ProcrunGroup">
<Component Id="procrun_license" Directory="PROCRUNROOT" Guid="{97B4CECC-5D1E-47BB-87B9-8F9FCEBB8158}">
<File Id="file_procrun_license" KeyPath="yes" Source="$(var.ProcrunSrc)\LICENSE.txt" />
@@ -41,12 +43,9 @@
<Component Id="procrun_relnotes" Directory="PROCRUNROOT" Guid="{F0B94ECE-2029-43E6-B9AE-11A6C782D7D5}">
<File Id="procrun_relnotes" KeyPath="yes" Source="$(var.ProcrunSrc)\RELEASE-NOTES.txt" />
</Component>
- <!-- Install the service. The X64 case is cumbersome since in that case we want to install both the 32 and 64 bit exe
-
- Any 64 bit architecture - do not install the 32 bit service, otherwise do
- X64 install the 32 bit file and the x64 service
-
- -->
+
+ <!-- Install the service. -->
+
<Component Id="procrun_32_service" Directory="PROCRUNROOT" Guid="{544A5D33-CF99-4384-A74D-79FB29DE904D}">
<File Id="file_procrun_32_service" KeyPath="yes" Source="$(var.ProcrunSrc)\prunsrv.exe" Name="$(var.ServiceName).exe" />
</Component>
@@ -56,9 +55,12 @@
</Component>
<Component Id="procrun_AMD64_service" Directory="dir64" Guid="{2673BCBE-3659-4AC6-B39C-DF1EEDF72C0E}">
+ <util:User CreateUser="yes" Disabled="no" LogonAsService="yes" Name="SHIBD_IDP_USER", Password="[PROCRUN_PASS]" RemoveOnUninstall="no"/>
<Condition>VersionNT64 And Not Intel64</Condition>
<File Id="file_procrun_AMD64_service" KeyPath="yes" Source="$(var.ProcrunSrc)\amd64\prunsrv.exe" Name="$(var.ServiceName).exe" />
- <ServiceInstall Id="ServiceX64" Name="$(var.ServiceName)" DisplayName="Shibboleth IdP Daemon" Description="Runs the Jetty Container" Arguments="service $(var.ServiceName)" Type="ownProcess" Start="$(var.ServiceStart)" ErrorControl="ignore" />
+ <ServiceInstall Id="ServiceX64" Name="$(var.ServiceName)" DisplayName="Shibboleth IdP Daemon" Description="Runs the Jetty Container"
+ Arguments="service $(var.ServiceName)" Type="ownProcess" Start="$(var.ServiceStart)" ErrorControl="ignore"
+ Account=".\SHIBD_IDP_USER" Password="[PROCRUN_PASS]"/>
</Component>
<Component Id="procrun_AMD64_Firewall" Directory="dir64" Guid="{BC605FF4-0233-4332-BC90-0C2E5FEC37D2}" KeyPath="yes">
<Condition>NOT NO_FIREWALL And VersionNT64 And Not Intel64</Condition>
@@ -79,17 +81,21 @@
<RegistryKey ForceDeleteOnUninstall="yes" ForceCreateOnInstall="yes" Key="SOFTWARE\Apache Software Foundation\Procrun 2.0\$(var.ServiceName)\Parameters\Start" Root="HKLM">
<Permission User="Administrators" GenericAll="yes" />
<Permission User="SYSTEM" GenericAll="yes" />
+ <Permission User="SHIBD_IDP_USER" GenericRead="yes" />
<RegistryValue Name="Class" Value="$(var.JettyClass)" Type="string">
<Permission User="Administrators" GenericAll="yes" />
<Permission User="SYSTEM" GenericAll="yes" />
+ <Permission User="SHIBD_IDP_USER" GenericRead="yes" />
</RegistryValue>
<RegistryValue Name="Mode" Value="jvm" Type="string">
<Permission User="Administrators" GenericAll="yes" />
<Permission User="SYSTEM" GenericAll="yes" />
+ <Permission User="SHIBD_IDP_USER" GenericRead="yes" />
</RegistryValue>
<RegistryValue Name="Params" Type="multiString" Action="append">
<Permission User="Administrators" GenericAll="yes" />
<Permission User="SYSTEM" GenericAll="yes" />
+ <Permission User="SHIBD_IDP_USER" GenericRead="yes" />
<MultiStringValue>STOP.PORT=8963</MultiStringValue>
<MultiStringValue>STOP.Key=[JETTY_PASS]</MultiStringValue>
</RegistryValue>
@@ -102,14 +108,17 @@
<RegistryValue Name="Class" Value="$(var.JettyClass)" Type="string">
<Permission User="Administrators" GenericAll="yes" />
<Permission User="SYSTEM" GenericAll="yes" />
+ <Permission User="SHIBD_IDP_USER" GenericRead="yes" />
</RegistryValue>
<RegistryValue Name="Mode" Value="jvm" Type="string">
<Permission User="Administrators" GenericAll="yes" />
<Permission User="SYSTEM" GenericAll="yes" />
+ <Permission User="SHIBD_IDP_USER" GenericRead="yes" />
</RegistryValue>
<RegistryValue Name="Params" Type="multiString" Action="append">
<Permission User="Administrators" GenericAll="yes" />
<Permission User="SYSTEM" GenericAll="yes" />
+ <Permission User="SHIBD_IDP_USER" GenericRead="yes" />
<MultiStringValue>--stop</MultiStringValue>
<MultiStringValue>STOP.PORT=8963</MultiStringValue>
<MultiStringValue>STOP.Key=[JETTY_PASS]</MultiStringValue>
diff --git a/idp-installer/src/main/wix/scripts/shib_random.vbs b/idp-installer/src/main/wix/scripts/shib_random.vbs
index aad00de6a..fab3e83b4 100644
--- a/idp-installer/src/main/wix/scripts/shib_random.vbs
+++ b/idp-installer/src/main/wix/scripts/shib_random.vbs
@@ -6,3 +6,11 @@ Set TypeLib = CreateObject("Scriptlet.TypeLib")
JettyPassword=left(TypeLib.Guid, 38)
' Prefix the property with the MM GUID....
Session.Property("JETTY_PASS.684B3207_0D64_43E6_9E6A_3ACB8B7672D7") = JettyPassword
+
+if (Session.Property("PROCRUN_PASS.684B3207_0D64_43E6_9E6A_3ACB8B7672D7") = "") then
+ Set p2 = left(TypeLib.Guid, 38)
+ Session.Property("PROCRUN_PASS.684B3207_0D64_43E6_9E6A_3ACB8B7672D7") = p2
+end if
+
+Set WshShell = CreateObject("WScript.Shell")
+WshShell.popup("Jetty " & Session.Property("JETTY_PASS.684B3207_0D64_43E6_9E6A_3ACB8B7672D7") & " procrun " & Session.Property("PROCRUN_PASS.684B3207_0D64_43E6_9E6A_3ACB8B7672D7"))
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list