pspete / psPAS

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

Add Certificate Serial Number & Certificate Attributes authn to Add-PASApplicationAuthenticationMethod #249

Closed infamousjoeg closed 4 years ago

infamousjoeg commented 4 years ago

Is your feature request related to a problem? Please describe. When trying to use psPAS to automate the addition of a Certificate Serial Number or Certificate Attributes authentication for Client Certificate Authentication through CCP, Add-PASApplicationAuthenticationMethods does not have the capability to handle this.

Describe the solution you'd like Additional AuthTypes CertSerialNumber and CertAttributes for the function.

Describe alternatives you've considered Using Invoke-RestMethod cmdlet to handle it.

Additional context N/A

infamousjoeg commented 4 years ago

Certificate Attributes can only be added via REST API: https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/Latest/en/Content/WebServices/Add%20Authentication.htm#certattrauthn

pspete commented 4 years ago

Thanks Joe - will lookinto this for the next update (coming soon).

Does this not work already?:

Add-PASApplicationAuthenticationMethod -AppID SomeApp -AuthType certificateserialnumber -AuthValue 01NFAM0U50J0E0GARC1A00FA3DEFE9A9
pspete commented 4 years ago

@infamousjoeg - this feature is now present in the dev branch, so will be included in the next release.

This became a breaking change since I refactored the parameters; the new syntax for all supported operations of the the function will be:

Add-PASApplicationAuthenticationMethod -AppID <String> [-Subject <String[]>] [-Issuer <String[]>] [-SubjectAlternativeName <String[]>] [-Comment <String>]

Add-PASApplicationAuthenticationMethod -AppID <String> -machineAddress <String>

Add-PASApplicationAuthenticationMethod -AppID <String> -osUser <String>

Add-PASApplicationAuthenticationMethod -AppID <String> -hash <String>

Add-PASApplicationAuthenticationMethod -AppID <String> -certificateserialnumber <String> [-Comment <String>]

Add-PASApplicationAuthenticationMethod -AppID <String> -path <String> [-IsFolder <Boolean>] [-AllowInternalScripts <Boolean>]
pspete commented 4 years ago

Now available in psPAS 3.5 - from the master branch, github release & PowerShell Gallery.