SlideShare uma empresa Scribd logo
1 de 23
REST for the Rest of Us
Joe Garcia, CISSP – Corporate Solutions Engineer
Kevin Ross – Corporate Solutions Engineer
► Think about all the repetitive tasks you do every day…
■ Creating safes
■ Onboarding accounts
■ Adding members to safes
■ Activating Users that never seem to remember their password
► What if there was a 1-click way for you to do all that?
► The REST API allows you to make that “1-click dream” come true.
► We’ve simplified it to make it more welcoming to non-developers.
► With Postman, it allows you to do it with little-to-no previous dev
knowledge.
► Let me show you how…
Why should I care about the REST API?
What is a RESTful Web Service?
A RESTful Web Service helps developers easily automate CRUD of objects.
CRUD stands for:
Create (POST), Retrieve (GET), Update (PUT), Delete (DELETE)
A majority of what a developer does is deal with objects in that manner. Since
the founder of HTTP, Roy Fielding, has been a huge backer of REST from its
inception, he built HTTP with common CRUD operations already built-in.
This is awesome for us because it allows us to eventually automate ourselves
out of work! I call this an…
Joe’s last Automation Vacation – pre-CyberArk
Automation Vacation!
REST API Methods
POST
■ Create a new object: Add Account, Add Safe, Add Safe Member, Add User
GET
■ Retrieve an existing object: Get Account Details, List Safes, Get Safe Details
PUT
■ Update an existing object: Update Account Details, Update Safe, Update User
DELETE
■ Delete an existing object: Delete Account, Delete Safe, Delete User
>
>
>
>
Postman Live Documentation & Collection
Postman is an online tool that gives us the ability to provide you
with a pre-built testing environment for your CyberArk Web
Services.
Benefits include:
Live Documentation for commonly used languages
Available public collection for testing against live CyberArk Web Services
Code snippets for every available language (except PowerShell, inquire
within)
CyberArk Web Services SDK Documentation built into public collection
Available Online & Standalone for Windows
Let’s improve on something that exists already.
It should be an easily repeatable task.
Something we use a lot and would benefit most
from our improvements.
What could we build in 30 minutes?
Well, 20 minutes now…
Phase 1:
Breakdown the O.G. PUU
CSV template was
complex!
I have to give “PasswordManager” as the CPMUser every time?
If the Folder is always “Root”, why do I have to keep telling it that?
At the end of the day, we took more time trying to figure that out than automating.
PUU did not like commas
or quotes!
Actually, PUU couldn’t handle any special characters. (https:// = NOPE!)
You messed up a property?
You get half an account!
PUU uploaded accounts were not transactional (they wouldn’t back out at failure).
You’d get half of an account’s properties up until where the upload failed.
No good at being wrong!
PUU would not know how to deal with conflicts. Let’s help it grow up a little and
mature. I’d hate to be that conflicted…
PACLI as the foundation of
PUU didn’t allow for
customer customization
The REST API opens up the possibilities since it is not limited to particular
languages.
Phase 2:
Plan our PUU on Steroids
Make the CSV template
straightforward and easy
CSV should have the following most commonly used columns:
ObjectName, Safe, Address, Username, Password, PlatformID,
DisableAutoMgmt, DisableAutoMgmtReason
PUU 2 should upload all
account properties, or none
at all
Using proper Try…Catch error handling, we can stop that from happening
anymore.
Fix whitespace issues to
allow proper PlatformID
name spacing
Now you don’t have to worry about improper spacing of “Windows Domain
Account”
More speed! If you can use this to improve your Hygiene Report, let’s make it fast!
Make the new PUU handle
special characters properly
Since we’re dealing with URI, we’ll use what is called URLEncoding to make sure
all special characters are properly replaced. (i.e. Windows Domain Account
becomes Windows%20Domain%20Account)
Prepare
Pre-Requisites
passwords.csv
Should be created and ready in the same directory.
Phase 3:
Build our PUU 2
Prepare Main
PowerShell Script
(.ps1)
I used Microsoft’s freeware Visual Studio Code (https://code.visualstudio.com)
Also, I referenced http://git.joeco.de for PowerShell functions that we’ll be using
► Functions will be created for each REST API call needed
■ Logon
■ Add Account
■ Logoff
► User Input will be entered first
■ Base URL (i.e. https://pvwa.cyberark.local)
■ API Username
■ API Password
■ Path to CSV File
► Import-CSV and enter each row value into an
array variable
► Step through each row, adding the account that
is listed on each.
Plan the Pieces of our PUU Puzzle
Functions First!
Receive User Input
PASREST-Logon & Import-CSV
Read Each Row & Add Account
PASREST-Logoff & Report Results
What it looks like put together
Phase 4:
?????? (The Testing Phase)
WE’LL DO IT
LIVE!
Phase 5:
PROFIT!!! (Not really…)
Visit http://git.joeco.de/PasswordUploadUtility-v2
to fork the PUU 2 repo and start down your own
path to Automation Superstardom!
► REST API Common Uses
■ Quickly onboard accounts after Hygiene Report
■ 1-Click Activate Users without needing PrivateArk Client
■ Quickly mirror your new DEV safe structure from PROD
► Attend these sessions
■ Coming Up Next: Conjuring DevSecOps in an Insecure World
■ Tomorrow @ 10:30am: A Practical Guide to CyberArk and Amazon Web Services
► Visit the Discovery Center
■ Customer Success Booth
■ DevSecOps Demo Station
► http://git.joeco.de/PasswordUploadUtility-v2
Key Takeaways and Where to Learn More
CyberArk Impact 2017 - REST for the Rest of Us

Mais conteúdo relacionado

Mais procurados

[Confluent] 실시간 하이브리드, 멀티 클라우드 데이터 아키텍처로 빠르게 혀...
[Confluent] 실시간 하이브리드, 멀티 클라우드 데이터 아키텍처로 빠르게 혀...[Confluent] 실시간 하이브리드, 멀티 클라우드 데이터 아키텍처로 빠르게 혀...
[Confluent] 실시간 하이브리드, 멀티 클라우드 데이터 아키텍처로 빠르게 혀...
confluent
 

Mais procurados (20)

Best Practices for Certificate Management
Best Practices for Certificate ManagementBest Practices for Certificate Management
Best Practices for Certificate Management
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architecture
 
Pacu ~ Rhino Security
Pacu ~ Rhino SecurityPacu ~ Rhino Security
Pacu ~ Rhino Security
 
Neuvector Rodeo 17 mars 20234
Neuvector Rodeo 17 mars 20234Neuvector Rodeo 17 mars 20234
Neuvector Rodeo 17 mars 20234
 
DeNA の AWS アカウント管理とセキュリティ監査自動化
DeNA の AWS アカウント管理とセキュリティ監査自動化DeNA の AWS アカウント管理とセキュリティ監査自動化
DeNA の AWS アカウント管理とセキュリティ監査自動化
 
Automatically Renew Certificated In Your Kubernetes Cluster
Automatically Renew Certificated In Your Kubernetes ClusterAutomatically Renew Certificated In Your Kubernetes Cluster
Automatically Renew Certificated In Your Kubernetes Cluster
 
AKS backup with Velero and Workload Identities
AKS backup with Velero and Workload IdentitiesAKS backup with Velero and Workload Identities
AKS backup with Velero and Workload Identities
 
How to migrate an application in IBM APIc, and preserve its client credential
How to migrate an application in IBM APIc, and preserve its client credentialHow to migrate an application in IBM APIc, and preserve its client credential
How to migrate an application in IBM APIc, and preserve its client credential
 
IBM MQ V8 Security: Latest Features Deep-Dive
IBM MQ V8 Security: Latest Features Deep-DiveIBM MQ V8 Security: Latest Features Deep-Dive
IBM MQ V8 Security: Latest Features Deep-Dive
 
Vault Open Source vs Enterprise v2
Vault Open Source vs Enterprise v2Vault Open Source vs Enterprise v2
Vault Open Source vs Enterprise v2
 
Automated Deployments with Ansible
Automated Deployments with AnsibleAutomated Deployments with Ansible
Automated Deployments with Ansible
 
[Confluent] 실시간 하이브리드, 멀티 클라우드 데이터 아키텍처로 빠르게 혀...
[Confluent] 실시간 하이브리드, 멀티 클라우드 데이터 아키텍처로 빠르게 혀...[Confluent] 실시간 하이브리드, 멀티 클라우드 데이터 아키텍처로 빠르게 혀...
[Confluent] 실시간 하이브리드, 멀티 클라우드 데이터 아키텍처로 빠르게 혀...
 
MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...
MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...
MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...
 
Containerization tutorial Containerization Explained
Containerization tutorial Containerization ExplainedContainerization tutorial Containerization Explained
Containerization tutorial Containerization Explained
 
Automation with Packer and TerraForm
Automation with Packer and TerraFormAutomation with Packer and TerraForm
Automation with Packer and TerraForm
 
APIConnect Security Best Practice
APIConnect Security Best PracticeAPIConnect Security Best Practice
APIConnect Security Best Practice
 
Principles Of Chaos Engineering - Chaos Engineering Hamburg
Principles Of Chaos Engineering - Chaos Engineering HamburgPrinciples Of Chaos Engineering - Chaos Engineering Hamburg
Principles Of Chaos Engineering - Chaos Engineering Hamburg
 
Deploying OpenShift Container Platform on AWS by Red Hat
Deploying OpenShift Container Platform on AWS by Red HatDeploying OpenShift Container Platform on AWS by Red Hat
Deploying OpenShift Container Platform on AWS by Red Hat
 
Cloud Operations and Analytics: Improving Distributed Systems Reliability usi...
Cloud Operations and Analytics: Improving Distributed Systems Reliability usi...Cloud Operations and Analytics: Improving Distributed Systems Reliability usi...
Cloud Operations and Analytics: Improving Distributed Systems Reliability usi...
 
Using Libvirt with Cluster API to manage baremetal Kubernetes
Using Libvirt with Cluster API to manage baremetal KubernetesUsing Libvirt with Cluster API to manage baremetal Kubernetes
Using Libvirt with Cluster API to manage baremetal Kubernetes
 

Destaque

CyberArk University Certificate Advanced PSM Shayne Hotton
CyberArk University Certificate Advanced PSM Shayne HottonCyberArk University Certificate Advanced PSM Shayne Hotton
CyberArk University Certificate Advanced PSM Shayne Hotton
Shayne Hotton, B.Comm
 

Destaque (7)

2016 04-05 cyber ark - не потеряйте ключи от королевства
2016 04-05 cyber ark - не потеряйте ключи от королевства 2016 04-05 cyber ark - не потеряйте ключи от королевства
2016 04-05 cyber ark - не потеряйте ключи от королевства
 
Combating The Ransomworm
Combating The RansomwormCombating The Ransomworm
Combating The Ransomworm
 
"EL ATAQUE INTERNO"
"EL ATAQUE INTERNO""EL ATAQUE INTERNO"
"EL ATAQUE INTERNO"
 
CyberArk University Certificate Advanced PSM Shayne Hotton
CyberArk University Certificate Advanced PSM Shayne HottonCyberArk University Certificate Advanced PSM Shayne Hotton
CyberArk University Certificate Advanced PSM Shayne Hotton
 
Managing and Securing Remote Access To Critical Infrastructure, Yariv Lenchne...
Managing and Securing Remote Access To Critical Infrastructure, Yariv Lenchne...Managing and Securing Remote Access To Critical Infrastructure, Yariv Lenchne...
Managing and Securing Remote Access To Critical Infrastructure, Yariv Lenchne...
 
DevOps
DevOpsDevOps
DevOps
 
Introducing DevOps
Introducing DevOpsIntroducing DevOps
Introducing DevOps
 

Semelhante a CyberArk Impact 2017 - REST for the Rest of Us

Create ABS Project In Twenty Minutes
Create ABS Project In Twenty MinutesCreate ABS Project In Twenty Minutes
Create ABS Project In Twenty Minutes
BENOIS Jérôme
 
Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...
Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...
Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...
ijtsrd
 

Semelhante a CyberArk Impact 2017 - REST for the Rest of Us (20)

I Love APIs - Oct 2015
I Love APIs - Oct 2015I Love APIs - Oct 2015
I Love APIs - Oct 2015
 
Windows PowerShell
Windows PowerShellWindows PowerShell
Windows PowerShell
 
Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)
 
PHP on Windows
PHP on WindowsPHP on Windows
PHP on Windows
 
PHP on Windows
PHP on WindowsPHP on Windows
PHP on Windows
 
OpenWhisk by Example - Auto Retweeting Example in Python
OpenWhisk by Example - Auto Retweeting Example in PythonOpenWhisk by Example - Auto Retweeting Example in Python
OpenWhisk by Example - Auto Retweeting Example in Python
 
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
 
Going open source with small teams
Going open source with small teamsGoing open source with small teams
Going open source with small teams
 
Create ABS Project In Twenty Minutes
Create ABS Project In Twenty MinutesCreate ABS Project In Twenty Minutes
Create ABS Project In Twenty Minutes
 
Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)
 
Drupal 7 ci and testing
Drupal 7 ci and testingDrupal 7 ci and testing
Drupal 7 ci and testing
 
We-Donut.io presentation of Platform
We-Donut.io presentation of PlatformWe-Donut.io presentation of Platform
We-Donut.io presentation of Platform
 
Introduction aux progressive web apps
Introduction aux progressive web appsIntroduction aux progressive web apps
Introduction aux progressive web apps
 
Continuous Delivery for Python Developers – PyCon Otto
Continuous Delivery for Python Developers – PyCon OttoContinuous Delivery for Python Developers – PyCon Otto
Continuous Delivery for Python Developers – PyCon Otto
 
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel LavoieSpring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
 
SP24 S055 SharePointToolbox by Rodrigo Pinto
SP24 S055 SharePointToolbox by Rodrigo PintoSP24 S055 SharePointToolbox by Rodrigo Pinto
SP24 S055 SharePointToolbox by Rodrigo Pinto
 
Plug yourself in and your app will never be the same (2 hr editon)
Plug yourself in and your app will never be the same (2 hr editon)Plug yourself in and your app will never be the same (2 hr editon)
Plug yourself in and your app will never be the same (2 hr editon)
 
Plug yourself in and your app will never be the same (2 hour edition)
Plug yourself in and your app will never be the same (2 hour edition)Plug yourself in and your app will never be the same (2 hour edition)
Plug yourself in and your app will never be the same (2 hour edition)
 
Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...
Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...
Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...
 
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...
 

Último

Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
Kayode Fayemi
 
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
David Celestin
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
Kayode Fayemi
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
amilabibi1
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
raffaeleoman
 

Último (15)

My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Bailey
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
ICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdfICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdf
 
Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio III
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
 
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
 
lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.
 
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
 
Dreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video TreatmentDreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video Treatment
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
 
Digital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of DrupalDigital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of Drupal
 
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdfSOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
 

CyberArk Impact 2017 - REST for the Rest of Us

  • 1. REST for the Rest of Us Joe Garcia, CISSP – Corporate Solutions Engineer Kevin Ross – Corporate Solutions Engineer
  • 2. ► Think about all the repetitive tasks you do every day… ■ Creating safes ■ Onboarding accounts ■ Adding members to safes ■ Activating Users that never seem to remember their password ► What if there was a 1-click way for you to do all that? ► The REST API allows you to make that “1-click dream” come true. ► We’ve simplified it to make it more welcoming to non-developers. ► With Postman, it allows you to do it with little-to-no previous dev knowledge. ► Let me show you how… Why should I care about the REST API?
  • 3. What is a RESTful Web Service? A RESTful Web Service helps developers easily automate CRUD of objects. CRUD stands for: Create (POST), Retrieve (GET), Update (PUT), Delete (DELETE) A majority of what a developer does is deal with objects in that manner. Since the founder of HTTP, Roy Fielding, has been a huge backer of REST from its inception, he built HTTP with common CRUD operations already built-in. This is awesome for us because it allows us to eventually automate ourselves out of work! I call this an…
  • 4. Joe’s last Automation Vacation – pre-CyberArk Automation Vacation!
  • 5. REST API Methods POST ■ Create a new object: Add Account, Add Safe, Add Safe Member, Add User GET ■ Retrieve an existing object: Get Account Details, List Safes, Get Safe Details PUT ■ Update an existing object: Update Account Details, Update Safe, Update User DELETE ■ Delete an existing object: Delete Account, Delete Safe, Delete User
  • 6. > > > > Postman Live Documentation & Collection Postman is an online tool that gives us the ability to provide you with a pre-built testing environment for your CyberArk Web Services. Benefits include: Live Documentation for commonly used languages Available public collection for testing against live CyberArk Web Services Code snippets for every available language (except PowerShell, inquire within) CyberArk Web Services SDK Documentation built into public collection
  • 7. Available Online & Standalone for Windows
  • 8. Let’s improve on something that exists already. It should be an easily repeatable task. Something we use a lot and would benefit most from our improvements. What could we build in 30 minutes? Well, 20 minutes now…
  • 9.
  • 10. Phase 1: Breakdown the O.G. PUU CSV template was complex! I have to give “PasswordManager” as the CPMUser every time? If the Folder is always “Root”, why do I have to keep telling it that? At the end of the day, we took more time trying to figure that out than automating. PUU did not like commas or quotes! Actually, PUU couldn’t handle any special characters. (https:// = NOPE!) You messed up a property? You get half an account! PUU uploaded accounts were not transactional (they wouldn’t back out at failure). You’d get half of an account’s properties up until where the upload failed. No good at being wrong! PUU would not know how to deal with conflicts. Let’s help it grow up a little and mature. I’d hate to be that conflicted… PACLI as the foundation of PUU didn’t allow for customer customization The REST API opens up the possibilities since it is not limited to particular languages.
  • 11. Phase 2: Plan our PUU on Steroids Make the CSV template straightforward and easy CSV should have the following most commonly used columns: ObjectName, Safe, Address, Username, Password, PlatformID, DisableAutoMgmt, DisableAutoMgmtReason PUU 2 should upload all account properties, or none at all Using proper Try…Catch error handling, we can stop that from happening anymore. Fix whitespace issues to allow proper PlatformID name spacing Now you don’t have to worry about improper spacing of “Windows Domain Account” More speed! If you can use this to improve your Hygiene Report, let’s make it fast! Make the new PUU handle special characters properly Since we’re dealing with URI, we’ll use what is called URLEncoding to make sure all special characters are properly replaced. (i.e. Windows Domain Account becomes Windows%20Domain%20Account)
  • 12. Prepare Pre-Requisites passwords.csv Should be created and ready in the same directory. Phase 3: Build our PUU 2 Prepare Main PowerShell Script (.ps1) I used Microsoft’s freeware Visual Studio Code (https://code.visualstudio.com) Also, I referenced http://git.joeco.de for PowerShell functions that we’ll be using
  • 13. ► Functions will be created for each REST API call needed ■ Logon ■ Add Account ■ Logoff ► User Input will be entered first ■ Base URL (i.e. https://pvwa.cyberark.local) ■ API Username ■ API Password ■ Path to CSV File ► Import-CSV and enter each row value into an array variable ► Step through each row, adding the account that is listed on each. Plan the Pieces of our PUU Puzzle
  • 17. Read Each Row & Add Account
  • 19. What it looks like put together
  • 20. Phase 4: ?????? (The Testing Phase) WE’LL DO IT LIVE!
  • 21. Phase 5: PROFIT!!! (Not really…) Visit http://git.joeco.de/PasswordUploadUtility-v2 to fork the PUU 2 repo and start down your own path to Automation Superstardom!
  • 22. ► REST API Common Uses ■ Quickly onboard accounts after Hygiene Report ■ 1-Click Activate Users without needing PrivateArk Client ■ Quickly mirror your new DEV safe structure from PROD ► Attend these sessions ■ Coming Up Next: Conjuring DevSecOps in an Insecure World ■ Tomorrow @ 10:30am: A Practical Guide to CyberArk and Amazon Web Services ► Visit the Discovery Center ■ Customer Success Booth ■ DevSecOps Demo Station ► http://git.joeco.de/PasswordUploadUtility-v2 Key Takeaways and Where to Learn More