thycotic-ps / thycotic.secretserver

PowerShell module for automating with Thycotic Secret Server REST API
https://thycotic-ps.github.io/thycotic.secretserver
MIT License
68 stars 22 forks source link

Getting error while searching for a folder using Search-TssFolder #330

Closed hussainaphroj closed 1 year ago

hussainaphroj commented 1 year ago

Verified issue does not already exist?

Yes

What error did you receive

From Version 0.32.0

ConvertFrom-Json: /usr/local/share/powershell/Modules/Thycotic.SecretServer/0.32.0/parts/ErrorHandling.ps1:9 Line | 9 | … $errMessage = ConvertFrom-Json -InputObject $errDetail.Message | ~~~~~~~~~~~~ | Conversion from JSON failed with error: Unexpected character encountered while parsing value: A. Path '', line 0, position 0.

From Version 0.60.9

ErrorHandling.ps1: /root/.local/share/powershell/Modules/Thycotic.SecretServer/0.60.9/functions/folders/Search-TssFolder.ps1:91 Line | 91 | . $ErrorHandling $err | ~~~~~ | System.Net.WebException: The SSL connection could not be established, see inner exception. ---> System.Net.Http.HttpRequestException: The | SSL connection could not be established, see inner exception. ---> System.Security.Authentication.AuthenticationException: Authentication | failed, see inner exception. ---> Interop+OpenSsl+SslException: SSL Handshake failed with OpenSSL error - SSL_ERROR_SSL. ---> | Interop+Crypto+OpenSslCryptographicException: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure --- End of inner | exception stack trace --- at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, ReadOnlySpan1 input, Byte[]& sendBuf, Int32& | sendCount) at System.Net.Security.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteSslContext& context, | ReadOnlySpan1 inputBuffer, Byte[]& outputBuffer, Ss

Please run the command using -Verbose

No response

Provide a test case or steps to reproduce

  1. $session = New-TssSession -SecretServer $TssUrl -AccessToken $token -ErrorAction Stop
  2. $foundTenantFolder = Search-TssFolder -TssSession $session -ParentFolderId 123 -SearchText "ABC"

Expected behavior

it should returns the folder name incase it is present and false if folder doesn't exits

What Edition of Secret Server?

Platinum

What version of Secret Server

EA release

What PowerShell host was used when producing this error

PowerShell Core (pwsh)

PowerShell Host Version

PowerShell 7.2.4

tylerezimmerman commented 1 year ago

@hussainaphroj This is environmental and appears to be an SSL issue. We are unable to reproduce this and if you need custom certificates, we do not have any plans on adding that functionality.