pspete / psPAS

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

Dynamic Version Check #70

Closed pspete closed 6 years ago

pspete commented 6 years ago

This module caters for every available API call available from CyberArk v9.0 onwards. With the move to OpenAPI/Swagger in CyberArk v10, I am considering utilising the Get-PASServer function to check the target version either on authentication, or function execution, or some other way, and using the returned data to:

Get-PASServer however is only supported from CyberArk 9.7 onwards. Logging this here as it is a fairly major update to the way the module works currently, will likely incur some breaking changes, and may cause issues with being able to support versions older than 9.7. Though it should simplify operations, support & updates in the long term

pspete commented 6 years ago

Required updates for this now made to New-PASSession, New-PASSAMLSession & New-PASSharedSession - External CyberArk Version information is now returned along with the Auth token... just the using it to clear up confusion about what module features work with different CyberArk version now...

pspete commented 6 years ago

First iteration of the Version Check functionality now implemented on the psPAS 2.0 branch.

Any function, or functionality which is only supported on CyberArk 9.8 or above now has the ability to check for the version being used, and will throw an error if an unsupported API call, or parameter, is used.

If the version cannot be queried (if running a version prior to 9.7 for instance), the check for minimum version requirements is skipped and usual error handling applies. Users also have the option to force the version check to skip.

List of functions that have been updated:

Function Minimum Version Update Version
Get-PASAccountPassword 10.1
Get-PASOnboardingRule 10.2
New-PASOnboardingRule 9.8 10.2
Stop-PASPSMSession 10.1
Get-PASComponentDetail 10.1
Get-PASComponentSummary 10.1
Resume-PASPSMSession 10.2
Suspend-PASPSMSession 10.2
Import-PASPlatform 10.2
Import-PASConnectionComponent 10.3
Get-PASAccountGroup 9.10
Get-PASAccountGroupMember 9.10
Remove-PASAccountGroupMember 9.10
Invoke-PASCredReconcile 9.10
Invoke-PASCredVerify 9.10
Get-PASPSMRecording 9.10
Get-PASPSMSession 9.10
Get-PASPlatform 9.10
Approve-PASRequest 9.10
Deny-PASRequest 9.10
Get-PASRequest 9.10
Get-PASRequestDetail 9.10
New-PASRequest 9.10
Remove-PASRequest 9.10
Invoke-PASCredChange 9.10 10.1
Get-PASPSMConnectionParameter 9.10 10.2
Add-PASAccountGroupMember 9.9.5
New-PASAccountGroup 9.9.5
pspete commented 6 years ago

Now merged into master branch