Mega Post: CyberArk Privilege Cloud as Code + DevOps Best Practice for CyberArk | Help me!

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Mega Post: CyberArk Privilege Cloud as Code + DevOps Best Practice for CyberArk | Help me!

L3 Networker

Hello!

 

I am interested in managing CyberArk STATEFULLY through code, and I am running into some issues as a Privilege Cloud customer. Allow me to elaborate and ask the community for insight!

 

Generally, I would prefer a typical solution for code-based stateful management of a product like this. I imagined using Terraform or Ansible to accomplish the goal of tracking the state of CyberArk configurations through code, writing new changes via code, and provisioning new infrastructure through code. However, the support for these tools for Privilege Cloud is rather scant, so I moved to homebrewing something with PowerShell or Python. I found that there are no officially supported PowerShell libraries, and only one officially supported Python library...but the documentation for the SDK is incomplete.

 

To summarize:

 

Terraform: The provider is supported by CyberArk but is not in version 1.0 yet and only supports the Safes API, and some other misc. pieces of the API.

Docs overview | cyberark/cyberark | Terraform | Terraform Registry

 

Ansible: There is an Ansible collection plugin, but it appears to only support the Accounts API for account management. Nothing for infrastructure like Safes, for example.

Cyberark.Pas — Ansible Community Documentation

 

PowerShell: The famous psPAS is seriously awesome and may just be the choice here, but management is worried about enterprise support and maintenance. Even if psPAS were the play here, we would have to build the state tracking in house (probably by dumping platforms and safes to JSON and storing that as a file. Then, prior to write operations, I would check if the state had changed since the last write).

 

Python: This is what our developers are most familiar with but, despite the published SDK being officially CyberArk's, the documentation appears incomplete! I have attached the link here for review: https://github.com/cyberark/ark-sdk-python/tree/main

 

As an example of the issues with Python, here are the incomplete Safes SDK documents:

https://cyberark.github.io/ark-sdk-python/latest/reference/models/services/pcloud/safes/

 

In conclusion, does anybody out there have success with a stateful and DevOps-oriented management workflow with CyberArk Privilege Cloud? Ideally -- life would look like this: "A user submits a ticket form with safe details, etc. That form dumps to JSON and triggers a GitHub Action where an IAC tool / script checks the state for changes or conflicts and builds the requested infrastructure after approval. The state is then updated."

 

Thank you!

1 accepted solution

Accepted Solutions

I have great news for ISP customers! CyberArk + RedHat now have a RedHat-certified Ansible collection for idempotent management of CyberArk Privilege Cloud infrastructure!

 

https://galaxy.ansible.com/ui/repo/published/cyberark/isp/docs/

 

I will be testing this in the coming weeks -- very excited to see what it can do. I still REALLY wish that Terraform was supported, or that psPAS was officially maintained by CyberArk, but this is great too! Ansible gives us nice self-documenting code-based deployments.

View solution in original post

2 REPLIES 2

L4 Transporter

Fantastic post, and questions I also definitely want answers to. CyberArk seem to be focussing a lot of attention on dynamic Discovery of assets which isn't quite enough to satisfy an IAC approach.

 

There may be additional requirements to manage SIA and SCA as code. There is already a Terraform module for SCA which handles policies, and as I understand it there is a move towards unifying SIA and SCA policies with a single API to manage them.

 

This wouldn't quite solve all the SIA requirements, because many SIA use-cases require explicit strong accounts to be onboarded (eg non-domain Windows devices, non-domain Databases) and the Terraform modules don't cover strong account onboarding, or resource configuration, or TLS certificates. For domain-joined Windows targets and SSH targets w/certificates the terraform module will probably be sufficient once the update to the unified Administration space is completed and a new terraform module is released to use it.

 

This also doesn't solve all SCA use-cases because Identity Apps have no Terraform support at all afaik, nor any IaC approach. So to onboard a new SaaS target environment will require manual work to create the Identity app integration. I have heard that there may be work going on at CyberArk to automate this into the unified Administration space (with a unified API) but I don't think automation of Identity Apps is even announced yet.

I have great news for ISP customers! CyberArk + RedHat now have a RedHat-certified Ansible collection for idempotent management of CyberArk Privilege Cloud infrastructure!

 

https://galaxy.ansible.com/ui/repo/published/cyberark/isp/docs/

 

I will be testing this in the coming weeks -- very excited to see what it can do. I still REALLY wish that Terraform was supported, or that psPAS was officially maintained by CyberArk, but this is great too! Ansible gives us nice self-documenting code-based deployments.

  • 1 accepted solution
  • 178 Views
  • 2 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!