pspete / psPAS

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

How to work with Okta verify. #331

Closed aitayi1982 closed 3 years ago

aitayi1982 commented 3 years ago

Our user use Okta to login to CyberArk, how can I use Powershell to login to CyberArk through Okta.

Eg. From browser ,I enter https://pvwa-mydomain.com/PasswordVault/v10 in address . this will redirect to https://mydomain.okta.com/ , which I hade to use my id and passowrd to login to Okta, after enter my id and password, this will redirect to https://mydoman.okta.com/signin/verify/okta/push page, which will need I click the 'Send Push' button to send verification message to my Phone. Then I had open my phone, open 'Okuta verify' application and click the confirm message recived from browser, than I can login to https://pvwa-mydomain.com/PasswordVault/v10 from browser.

Is there any solution (Powershell) to automatic execute login , just like use powershell api to login (New-PASSession). I want write a script to implement below solution:

  1. Start the ps1 script (eg. connectCyberArkViaOkta.ps1) with powershell (the script will automatically send 'Send Push' request).
  2. I open 'Okuta verify' application on my smart phone, and get request from my ps1 srcript, and I click 'Yes, It's me' from my smart phone.
  3. Then the script can get CyberArk sessin information (Can login to CyberArk)
pspete commented 3 years ago

Which CyberArk auth method is being used? RADIUS?

aitayi1982 commented 3 years ago

Which CyberArk auth method is being used? RADIUS?

Thank for your replay. CyberArk auth method should be : SAML FOR OKTA SSO

pspete commented 3 years ago

Same scenario as #329 & requires further development. If you have sample code to authenticate with OKTA you can share, it may accelerate progress.

pspete commented 3 years ago

Closing due to inactivity/no response.