SlideShare a Scribd company logo
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

More Related Content

What's hot

Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad
Docker, Inc.
 

What's hot (20)

Docker
DockerDocker
Docker
 
kubernetes入门培训
kubernetes入门培训kubernetes入门培训
kubernetes入门培训
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Learning how AWS implement AWS VPC CNI
Learning how AWS implement AWS VPC CNILearning how AWS implement AWS VPC CNI
Learning how AWS implement AWS VPC CNI
 
Introduction to Kubernetes with demo
Introduction to Kubernetes with demoIntroduction to Kubernetes with demo
Introduction to Kubernetes with demo
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architecture
 
Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad
 
Kubernetes Networking | Kubernetes Services, Pods & Ingress Networks | Kubern...
Kubernetes Networking | Kubernetes Services, Pods & Ingress Networks | Kubern...Kubernetes Networking | Kubernetes Services, Pods & Ingress Networks | Kubern...
Kubernetes Networking | Kubernetes Services, Pods & Ingress Networks | Kubern...
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1
Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1
Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1
 
Docker, LinuX Container
Docker, LinuX ContainerDocker, LinuX Container
Docker, LinuX Container
 
Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
 
Introduction à docker.io
Introduction à docker.ioIntroduction à docker.io
Introduction à docker.io
 
Microservices in Practice
Microservices in PracticeMicroservices in Practice
Microservices in Practice
 
Data in Motion을 위한 이벤트 기반 마이크로서비스 아키텍처 소개
Data in Motion을 위한 이벤트 기반 마이크로서비스 아키텍처 소개Data in Motion을 위한 이벤트 기반 마이크로서비스 아키텍처 소개
Data in Motion을 위한 이벤트 기반 마이크로서비스 아키텍처 소개
 
Openstack - An introduction/Installation - Presented at Dr Dobb's conference...
 Openstack - An introduction/Installation - Presented at Dr Dobb's conference... Openstack - An introduction/Installation - Presented at Dr Dobb's conference...
Openstack - An introduction/Installation - Presented at Dr Dobb's conference...
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
Docker Networking Overview
Docker Networking OverviewDocker Networking Overview
Docker Networking Overview
 
Docker fundamentals
Docker fundamentalsDocker fundamentals
Docker fundamentals
 

Viewers also liked

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
 

Viewers also liked (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
 

Similar to 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
 

Similar to 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...
 

Recently uploaded

Introduction of Biology in living organisms
Introduction of Biology in living organismsIntroduction of Biology in living organisms
Introduction of Biology in living organisms
soumyapottola
 
527598851-ppc-due-to-various-govt-policies.pdf
527598851-ppc-due-to-various-govt-policies.pdf527598851-ppc-due-to-various-govt-policies.pdf
527598851-ppc-due-to-various-govt-policies.pdf
rajpreetkaur75080
 

Recently uploaded (14)

The Canoga Gardens Development Project. PDF
The Canoga Gardens Development Project. PDFThe Canoga Gardens Development Project. PDF
The Canoga Gardens Development Project. PDF
 
Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdfOracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
 
Acorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutesAcorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutes
 
123445566544333222333444dxcvbcvcvharsh.pptx
123445566544333222333444dxcvbcvcvharsh.pptx123445566544333222333444dxcvbcvcvharsh.pptx
123445566544333222333444dxcvbcvcvharsh.pptx
 
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
 
Pollinator Ambassador Earth Steward Day Presentation 2024-05-22
Pollinator Ambassador Earth Steward Day Presentation 2024-05-22Pollinator Ambassador Earth Steward Day Presentation 2024-05-22
Pollinator Ambassador Earth Steward Day Presentation 2024-05-22
 
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
0x01 - Newton's Third Law:  Static vs. Dynamic Abusers0x01 - Newton's Third Law:  Static vs. Dynamic Abusers
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
 
Getting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control TowerGetting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control Tower
 
Writing Sample 2 -Bridging the Divide: Enhancing Public Engagement in Urban D...
Writing Sample 2 -Bridging the Divide: Enhancing Public Engagement in Urban D...Writing Sample 2 -Bridging the Divide: Enhancing Public Engagement in Urban D...
Writing Sample 2 -Bridging the Divide: Enhancing Public Engagement in Urban D...
 
Introduction of Biology in living organisms
Introduction of Biology in living organismsIntroduction of Biology in living organisms
Introduction of Biology in living organisms
 
05232024 Joint Meeting - Community Networking
05232024 Joint Meeting - Community Networking05232024 Joint Meeting - Community Networking
05232024 Joint Meeting - Community Networking
 
Eureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 PresentationEureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 Presentation
 
Hi-Tech Industry 2024-25 Prospective.pptx
Hi-Tech Industry 2024-25 Prospective.pptxHi-Tech Industry 2024-25 Prospective.pptx
Hi-Tech Industry 2024-25 Prospective.pptx
 
527598851-ppc-due-to-various-govt-policies.pdf
527598851-ppc-due-to-various-govt-policies.pdf527598851-ppc-due-to-various-govt-policies.pdf
527598851-ppc-due-to-various-govt-policies.pdf
 

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