rubrik-sdk-for-powershell icon indicating copy to clipboard operation
rubrik-sdk-for-powershell copied to clipboard

Stop using -SkipCertificateCheck as default parameter with Invoke-RestMethod

Open zeilemaker54 opened this issue 6 months ago • 1 comments

Current Behavior

- Invoke-RestMethod calls are made with the -SkipCertificateCheck parameter. This should be optional and up to the user
- Rubrik 9.0.1 module private function Test-ManagedByRSC.ps1 has three occures of Invoke-RestMethod with using -SkipCertificateCheck without testing for Powershell 6.x or higher with causes errors on Windows Powershell 5.1
- Rubrik 9.0.1 module private function Test-ManagedByRSC.ps1 has a ConvertTo-SecureString function without the required -Force option

Expected Behavior

Rubrik module 9.0.1 should be running on Windows Powershell 5,1 Rubrik modules should not use -SkipCertificateCheck by default

Steps to Reproduce

Rubrik 9.0.1. module, Windows Powershell 5.1 Connect-Rubrik -Server xyz -Id 'client|example' -Secret 'examplesecret' -RedirectToRSC

Context

PSVersion                     : 5.1.17763.6054
PSEdition                     : Desktop
PSCompatibleVersions          : {1.0, 2.0, 3.0, 4.0...}
BuildVersion                  : 10.0.17763.6054
CLRVersion                    : 4.0.30319.42000
WSManStackVersion             : 3.0
PSRemotingProtocolVersion     : 2.3
SerializationVersion          : 1.1.0.1
HostConsoleName               : ConsoleHost
HostConsoleVersion            : 5.1.17763.6054
HostCulture                   : nl-NL
HostCultureUI                 : en-US
RubrikConnection              : True
UserAgentString               : RubrikPowerShellSDK-9.0.1--5.1.17763.6054--platform--Win32NT--platform_version--Microso
                                ft Windows Server 2019 Datacenter17763
RubrikAuthentication          : Bearer
RubrikClusterVersion          : 9.0.3-p7-25660
RubrikCurrentModuleVersion    : 9.0.1
RubrikInstalledModule         : 9.0.1, 6.0.1
RubrikModuleOptions           : ApplyCustomViewDefinitions = True; CredentialPath = ; DefaultWebRequestTimeOut = 100
RubrikModuleDefaultParameters :

Failure Logs

No response

zeilemaker54 avatar Aug 06 '24 13:08 zeilemaker54