Merge pull request #716 from Icinga:fix/ifw_certificate_creation_fails_over_winrm_and_ssh

Fix: icingaforwindows.pfx creation over WinRM and SSH

Fixes Icinga for Windows certificate creation while using WinRM or SSH for remote connections
This commit is contained in:
Lord Hepipud 2024-04-02 22:08:48 +02:00 committed by GitHub
commit d0b53e3877
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 10 additions and 6 deletions

View file

@ -19,6 +19,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
* [#710](https://github.com/Icinga/icinga-powershell-framework/pull/710) Fixes various console errors while running Icinga for Windows outside of an administrative shell
* [#714](https://github.com/Icinga/icinga-powershell-framework/pull/714) Fixes missing service environment information during initial setup of Icinga for Windows v1.12 on some systems
* [#715](https://github.com/Icinga/icinga-powershell-framework/pull/715) Fixes internal scheduled task handling and certificate renewal task by setting the user to `LocalSystem` instead of any administrative user or group, ensuring compatibility with all Windows versions as well as managing by using WinRM and SSH
* [#716](https://github.com/Icinga/icinga-powershell-framework/pull/716) Fixes Icinga for Windows certificate creation while using WinRM or SSH for remote connections
## 1.12.0 (2024-03-26)

View file

@ -317,7 +317,8 @@ function Start-IcingaForWindowsInstallation()
}
# Always install the Icinga for Windows certificate
Install-IcingaForWindowsCertificate;
# We need to run the task renewal with our scheduled task to fix errors while using WinRM / SSH
Start-IcingaWindowsScheduledTaskRenewCertificate;
Restart-IcingaForWindows;
# Update configuration and clear swap

View file

@ -8,7 +8,8 @@ function Invoke-IcingaForWindowsManagementConsoleToggleFrameworkApiChecks()
Add-IcingaRESTApiCommand -Command 'Invoke-IcingaCheck*' -Endpoint 'apichecks';
}
Install-IcingaForWindowsCertificate;
# We need to run the task renewal with our scheduled task to fix errors while using WinRM / SSH
Start-IcingaWindowsScheduledTaskRenewCertificate;
Enable-IcingaFrameworkApiChecks;
}

View file

@ -37,7 +37,7 @@ function Show-IcingaForWindowsMenuManageTroubleshooting()
'Command' = 'Show-IcingaWindowsManagementConsoleYesNoDialog';
'Arguments' = @{
'-Caption' = 'Install Icinga for Windows certificate';
'-Command' = 'Install-IcingaForWindowsCertificate';
'-Command' = 'Start-IcingaWindowsScheduledTaskRenewCertificate';
}
}
},

View file

@ -22,11 +22,12 @@ function Install-IcingaJEAProfile()
return;
}
Write-IcingaConsoleNotice 'Writing Icinga for Windows environment information as JEA profile'
Write-IcingaConsoleNotice 'Writing Icinga for Windows environment information as JEA profile';
Write-IcingaJEAProfile -RebuildFramework:$RebuildFramework -AllowScriptBlocks:$AllowScriptBlocks;
Write-IcingaConsoleNotice 'Registering Icinga for Windows JEA profile'
Write-IcingaConsoleNotice 'Registering Icinga for Windows JEA profile';
Register-IcingaJEAProfile -IcingaUser $IcingaUser -TestEnv:$TestEnv -ConstrainedLanguage:$ConstrainedLanguage;
Install-IcingaForWindowsCertificate;
# We need to run the task renewal with our scheduled task to fix errors while using WinRM / SSH
Start-IcingaWindowsScheduledTaskRenewCertificate;
}
Set-Alias -Name 'Update-IcingaJEAProfile' -Value 'Install-IcingaJEAProfile';