From 336b38dddd027a369b3ecfb74ae634cd270fe97a Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Wed, 29 Jan 2025 15:10:35 +0100 Subject: [PATCH] Fix: REST-Api invoke command by removing CA certificate check (#773) * Fixes REST-Api invoke command by removing CA certificate check * Updates changelog --- doc/100-General/10-Changelog.md | 1 + lib/webserver/Invoke-IcingaForWindowsRESTApi.psm1 | 2 ++ 2 files changed, 3 insertions(+) diff --git a/doc/100-General/10-Changelog.md b/doc/100-General/10-Changelog.md index 6e8e6ca..34d2998 100644 --- a/doc/100-General/10-Changelog.md +++ b/doc/100-General/10-Changelog.md @@ -12,6 +12,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic ### Bugfixes * [#759](https://github.com/Icinga/icinga-powershell-framework/pull/759) Fixes maximum cache duration for service daemons to the right value +* [#773](https://github.com/Icinga/icinga-powershell-framework/pull/773) Fixes REST-Api invoke command `Invoke-IcingaForWindowsRESTApi` by removing CA certificate check ### Enhancements diff --git a/lib/webserver/Invoke-IcingaForWindowsRESTApi.psm1 b/lib/webserver/Invoke-IcingaForWindowsRESTApi.psm1 index 2fe2611..d569e2b 100644 --- a/lib/webserver/Invoke-IcingaForWindowsRESTApi.psm1 +++ b/lib/webserver/Invoke-IcingaForWindowsRESTApi.psm1 @@ -7,10 +7,12 @@ function Invoke-IcingaForWindowsRESTApi() [hashtable]$Body = @{ } ); + <# Disable this for now, as there is no way to properly handle this with Windows tool and localhost listener if ((Test-IcingaCAInstalledToAuthRoot) -eq $FALSE) { Write-IcingaConsoleError 'The Icinga CA certificate is not installed to the local machine certificate store. Please run the "Start-IcingaWindowsScheduledTaskRenewCertificate" command to fix this issue.'; return $null; } + #> Set-IcingaTLSVersion; Enable-IcingaUntrustedCertificateValidation -SuppressMessages;