From 5da51e5e7a1847d17e5ea2ade3b177969a57a4cd Mon Sep 17 00:00:00 2001 From: Paul Caskey Date: Sat, 27 Apr 2019 16:08:19 +0000 Subject: [PATCH] update rotation script --- container_files/rotateSealerKey.ps1 | 30 +++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/container_files/rotateSealerKey.ps1 b/container_files/rotateSealerKey.ps1 index 29385da..c481b1b 100644 --- a/container_files/rotateSealerKey.ps1 +++ b/container_files/rotateSealerKey.ps1 @@ -1,16 +1,35 @@ #this script reads the sealer key configuration from the IdP's idp.properties file and rotates the sealer key Try { - $runthis = $env:ENABLE_SEALER_KEY_ROTATION + $ENABLE_SEALER_KEY_ROTATION = $env:ENABLE_SEALER_KEY_ROTATION } Catch { - $runthis = 'True' + $ENABLE_SEALER_KEY_ROTATION = 'True' + } + +If ($ENABLE_SEALER_KEY_ROTATION -eq 'True') { + #assure IDP_HOME + Try { + $IDP_HOME = $env:IDP_HOME + If ($IDP_HOME = null$) { + $IDP_HOME="c:\opt\shibboleth-idp" + } + } + Catch { + $IDP_HOME="c:\opt\shibboleth-idp" + } + #assure JAVA_HOME + Try { + $JAVA_HOME = $env:JAVA_HOME + If ($JAVA_HOME = null$) { + $JAVA_HOME="c:\zulujava\zulu-8" + } + } + Catch { + $JAVA_HOME="c:\zulujava\zulu-8" } -If ($runthis -eq 'True') { #settings - $IDP_HOME="c:\opt\shibboleth-idp" $IDPPROP=$IDP_HOME + "\conf\idp.properties" - $JAVA_HOME="c:\zulujava\zulu-8" #item below is only used if you have configured additional hosts to sync your sealer to $SYNC_CRED="domain\user" @@ -32,7 +51,6 @@ If ($runthis -eq 'True') { $sync_hosts = $env:COMPUTERNAME } - #Write-Host "Keystore:" $storefile #Write-Host "Version File:" $versionfile #Write-Host "Store Pass:" $storepass