pspete / psPAS

PowerShell module for CyberArk Privileged Access Security REST API
https://pspas.pspete.dev
MIT License
293 stars 91 forks source link

New-PASSession: integrated paramset does not pass body parameters #316

Closed steveredden closed 3 years ago

steveredden commented 3 years ago

Describe the issue New-PASSession, when using -UseDefaultCredentials (paramset = integrated), $PSBoundParameters never make it to the $LogonRequest['Body']

Cannot use -concurrentSession with integrated auth, in current version

To Reproduce Steps to reproduce the behavior:

  1. New-PASSession -BaseURI "https://my.vault" -UseDefaultCredentials -concurrentSession $true -Debug
  2. See body not contain concurrentSession 😭

Expected behavior concurrentSession should get passed when using integrated authentication. Unlikely that the other body parameters are necessary.

Your Environment

Additional context integrated doesn't match on line 540, so will never get into the if block where the body params are added on line 599

If you do -type LDAP -Credential (Get-Credential) -Debug you will see the [Body] from Invoke-PASRestMethod#L200

pspete commented 3 years ago

Thanks @steveredden, will take a look.

pspete commented 3 years ago

Fix now present in the dev branch

See Line 297 (there are some internal code structure changes coming in the next version - pending module update for PAS 11.7 - hence the difference in line number to the one you identified).

Available to download here if you want to test: https://ci.appveyor.com/api/buildjobs/af5k2utri8augk9o/artifacts/psPAS-v4.4.80.zip

pspete commented 3 years ago

Fix now present in the 4.5 release https://www.powershellgallery.com/packages/psPAS/4.5.87 https://github.com/pspete/psPAS/releases/tag/v4.5.87