-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '20190701_3.4.4' of https://github.internet2.edu/docker/…
…ShibbIdP_noVM_Windows into 20190701_3.4.4
- Loading branch information
Showing
9 changed files
with
116 additions
and
169 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| #this script reads the sealer key configuration from the IdP's idp.properties file and rotates the sealer key | ||
| Try { | ||
| $ENABLE_SEALER_KEY_ROTATION = $env:ENABLE_SEALER_KEY_ROTATION | ||
| } | ||
| Catch { | ||
| $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" | ||
| } | ||
|
|
||
| #settings | ||
| $IDPPROP=$IDP_HOME + "\conf\idp.properties" | ||
| #item below is only used if you have configured additional hosts to sync your sealer to | ||
| $SYNC_CRED="domain\user" | ||
|
|
||
| #get config from properties file | ||
| $storefile = (cat $IDPPROP | where { $_ -match "idp.sealer.storeResource"}).Split("=")[1].Trim().Replace("%{idp.home}", $IDP_HOME).Replace("/","\") | ||
| $versionfile = (cat $IDPPROP | where { $_ -match "idp.sealer.versionResource"}).Split("=")[1].Trim().Replace("%{idp.home}", $IDP_HOME).Replace("/","\") | ||
| $storepass = (cat $IDPPROP | where { $_ -match "idp.sealer.storePassword"}).Split("=")[1].Trim().Replace("{","`{").Replace("}","`}") | ||
| $alias = (cat $IDPPROP | where { $_ -match "idp.sealer.aliasBase"}).Split("=")[1].Trim() | ||
| try { | ||
| $count = (cat $IDPPROP | where { $_ -match "idp.sealer._count"}).Split("=")[1].Trim() | ||
| } | ||
| catch { | ||
| $count = 30 | ||
| } | ||
| try { | ||
| $sync_hosts = (cat $IDPPROP | where { $_ -match "idp.sealer._sync_hosts"}).Split("=")[1].Trim() | ||
| } | ||
| catch { | ||
| $sync_hosts = $env:COMPUTERNAME | ||
| } | ||
|
|
||
| #Write-Host "Keystore:" $storefile | ||
| #Write-Host "Version File:" $versionfile | ||
| #Write-Host "Store Pass:" $storepass | ||
| #Write-Host "Alias:" $alias | ||
| #Write-Host "Count:" $count | ||
| #Write-Host "Sync Hosts:" $sync_hosts | ||
|
|
||
| #rotate key | ||
| $cmd = "${IDP_HOME}\bin\runclass.bat net.shibboleth.utilities.java.support.security.BasicKeystoreKeyStrategyTool --storefile $storefile --storepass `$storepass --versionfile $versionfile --alias $alias --count $count" | ||
| Invoke-Expression $cmd | ||
|
|
||
| #display current/new version | ||
| Write-Host "Current Key Version:" (cat $versionfile).split("=")[2].Trim() | ||
|
|
||
| #sync to other hosts | ||
| $sync_hosts.split(" ") | ForEach { | ||
| If ($_.Trim() = $env:COMPUTERNAME) {Write-Host "***skipping sync to local host"} Else { | ||
| Write-Host "Syncing to: $_" | ||
| $Session = New-PSSession -ComputerName "$_" -Credential $SYNC_CRED | ||
| Copy-Item $versionfile -Destination $IDP_HOME\credentials -ToSession $Session | ||
| } | ||
| } | ||
|
|
||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| docker-compose up --build -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| docker-compose kill | ||
| docker-compose rm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| version: "3.3" | ||
|
|
||
| services: | ||
| idp: | ||
| build: | ||
| context: . | ||
| args: | ||
| TOMCFG: ./container_files/config/tomcat | ||
| TOMCERT: ./container_files/credentials/tomcat | ||
| TOMWWWROOT: ./container_files/wwwroot | ||
| SHBCFG: ./container_files/config/shib-idp/conf | ||
| SHBCREDS: ./container_files/credentials/shib-idp | ||
| SHBVIEWS: ./container_files/config/shib-idp/views | ||
| SHBEDWAPP: ./container_files/config/shib-idp/edit-webapp | ||
| SHBMSGS: ./container_files/config/shib-idp/messages | ||
| SHBMD: ./container_files/config/shib-idp/metadata | ||
| expose: | ||
| - "443" | ||
| ports: | ||
| - "443:443" | ||
| dns: | ||
| - 8.8.8.8 | ||
| - 4.4.4.4 | ||
|
|
||
| networks: | ||
| default: | ||
| external: | ||
| name: nat | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| docker-compose up --build -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| docker-compose kill | ||
| docker-compose rm |