Coder Social home page Coder Social logo

toddwbutler / carestscripts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gravitylens/carestscripts

0.0 0.0 0.0 38 KB

The repository contains completed scripts from CyberArk's "Automation with RestAPI" Course.

License: Apache License 2.0

PowerShell 71.13% Shell 1.46% Python 25.52% JavaScript 1.89%

carestscripts's Introduction

CARestScripts

The repository contains completed scripts from CyberArk's "Automation with RestAPI" Course.

Simple Login Script

In this exercise you were asked to create a basic script that calls a single RestAPI method. Specifically the script should sign into the PVWA and create all the headers needed for further Rest Methods in a $global:headers variable. You can find a working example of this script in the following file.

./testlogin.ps1 

Prototyping Complex Automations

In this exercise you were asked to test several Rest methods in Postman. You can import a collection of working Rest calls into Postman from the following file.

./PrototypingComplexAutomations.postman_collection.json

Creating a Powershell Wrapper

In this exercise you were asked to create a Powershell wrapper that implemented three functions.

  1. New-CASession, which will login to the PVWA and create the headers needed for subsequent Rest methods.
  2. New-CASafe, which will create a safe.
  3. New-CASafeMember, which will add a member to a safe and set its permissions.

You can find a working version of this module in the following file.

./wrapper.psm1

CyberArk Safe Factory

In this exercise you were asked to create a script that builds safes and assigns members to safes with the appropriate permissions using either your own Powershell module or the psPAS module. You can find a working example of this script in the following file.

./SafeFactory.psm1

Note: The following exercises has already been completed in this example. Lines that required alteration have been preserved in the comments.

Securing RestAPI Scripts

In this exercise you were asked to modify your SafeFactory script in order to retrieve its credentials from the vault rather than hard coding them or prompting for user input. These changes have already been completed in the sample above, and the required changes noted in the comments.

carestscripts's People

Contributors

gravitylens avatar cyberarktraining avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.