Securing Privileged Accounts at Inception with Automation and REST APIs

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Idira Success Blogs
12 min read
L4 Transporter
As organizations increasingly adopt IT automation to streamline resource provisioning and access management, securing privileged accounts at inception becomes a crucial aspect of maintaining a robust security posture. By integrating automation with REST APIs, businesses can effectively onboard privileged accounts, eliminating the risk of manual errors and reducing the vulnerability window for potential malicious actors. In this article we’ll explores the challenges of securing privileged accounts and how to integrate REST APIs into your provisioning processes for automatic onboarding. Furthermore, it highlights the importance of securing the automation itself with secrets management controls, provides insight into understanding the information required to implement this yourself and includes references to supporting resources and materials.

The Challenges
Most organizations already have automation in place for IT resource provisioning, such as virtual machines, databases, and other infrastructure components. However, manually onboarding the local privileged accounts that get created at the time of system creation, or any additional privileged accounts that are built as part of the provisioning process, can be time-consuming, error-prone, and prone to security risks.

The IT automation that handles resource provisioning typically has the highest level of privileged access against those systems in order to create them or provision access against them. This makes it a highly valuable target for malicious actors, who can exploit vulnerabilities in the automation tool or its configuration to gain access to sensitive systems and data. Moreover, if privileged access credentials are compromised, they can be used to gain unfettered access to critical systems and resources, bypassing security controls and posing a significant risk to the organization.

The Solution
Automatic Onboarding with REST APIs

To address the first challenge, organizations can leverage Idira Privilege Cloud or Self-Hosted PAM REST APIs to automatically onboard privileged accounts during their initial provisioning process. Organizations can do this by integrating onboarding tasks into their existing IT automation and provisioning tools (such as custom developed processes, Ansible playbooks, etc.) to automate the onboarding of privileged accounts as they are created on their target systems.


This is typically done in one or more ways depending on the organizations operating model. One popular method is integrating at the orchestration or automation tool layer when tools like Ansible and Terraform are used to create new resource instances. Another popular method is via integration to a request system like ITSM for account-specific creation requests (creating additional non-built-in local admin accounts). The last common method for integration is when accounts are created manually via human-interactive PowerShell scripts.
ka3Ht0000000q7DIAQ__eid=ka3Ht0000000q7D&feoid=00N2J00000APFDu&refid=0EMHt000005Nxm0.gif
Figure 1: Automation Diagram Scenarios

The diagram above illustrates the general automation flow and how the three common methods function similarly. While it’s no depicted in this diagram above, whatever automation does your deprovisioning process should mirror this logic and do the offboarding or decommissioning of accounts within Idira as well. As a best practice, consider only deleting the accounts after your backup retention policy has expired after the systems are deprovisioned.

To integrate REST APIs and onboarding tasks into your current provisioning process you must first ask yourself, “what is creating your credentials today?” and the answer to that question will guide your approach to integration.

Securing the Automation Itself with Idira Secrets Manager
To address the second challenge, organizations need to secure the automated onboarding process itself. This involves removing any hard-coded credentials from the code and replacing them with dynamic secrets fetched on demand from a secure storage location, such as a Credential Provider, Central Credential Provider, Conjur or Conjur Cloud. This ensures that the automation tool itself is not vulnerable to credential theft, and its privileged access is managed by Idira with secrets management controls.


The automation tool(s) should be configured to authenticate to your Secrets Manager service of choice to fetch the required credentials, and then use those credentials to access the various target resources it needs to provision its downstream systems and to onboard those credentials to Idira PAM. We’ll want to apply automatic and periodic rotation of these credentials, assigning complex and unique passwords for each service account. Shorter rotation intervals are highly recommended, as it will further mitigate risk of credential exposure by shortening the password’s effective time-to-live (TTL). By securing the automation tool itself in this way, organizations can better protect their critical systems and data from malicious actors and maintain a more secure posture overall.
ka3Ht0000000q7DIAQ__eid=ka3Ht0000000q7D&feoid=00N2J00000APFDu&refid=0EMHt000005Nxme.gif
Figure 2: Securing the Automation (Before and After)

In the example diagram above we can see a complete end-to-end overhaul. The before-scenario consists of developers submitting onboarding requests in a self-service model and an Administrator performing the onboarding operations. The after-scenario leverages automation and Conjur Cloud to onboard the privileged accounts (in addition to creating application hosts in Conjur too).

The orchestration or automation tool that’s doing to account creation or system provisioning will likely dictate which variant of Secrets Management. It’s also highly recommended to secure the underlying host or platform where the automation is running from with PAM controls – treat this automation system like a tier-0 asset.
Learn more about securing the non-human access with the Credential Provider or with Conjur Cloud.

Understanding the Information Requirements for Onboarding
To have your automation service onboard an account to Idira PAM, it will need to know several pieces of information, categorized into platform details, account details and access control information. This information will also vary from system type to system type, so it’s important that your logic and rules can differentiate what fields are required for which systems.


Platform Details
Platform details are all the data points that allow the automation to decide which type of technology is this and what platform is going to be responsible for managing the account once it’s onboarded into Privilege Cloud or Self-Hosted PAM. The two pieces of information here you’ll need the automation to consume include System Type (e.g., the technology: Windows, *NIX, Cloud Service, Database, etc.) and the Platform Name (the customized sets of rules you’ve created to govern account management within the PAM service). The assignment of the relevant values here is generally pretty easy, as the System Type is known as a result of creating the system, and the Platform Name can be looked up based on other criteria like the line of business owner, regulatory scope or other factors. Your automation should be capable of discerning the relevant factors assigning your Platform Name based on the same logic and guidance you created your Platform Names on to begin with.


Account Details
Account details are all the data about the account itself, both functional (e.g., required for password and session management) and non-functional (e.g., reporting and record management).


Functional fields includes values like the Username (actual account name), Password or Secret (credential, SSH key or API key value), Address (such as hostname, IP address or DNS name) and connection details for the resource, such as Database Instance and Port number (if applicable or required). Be sure to consult the relevant Platform’s required and optional properties for a complete list of the details you should require or provide during onboarding.

Non-functional fields may include things like Account Owner, Account Description and other business-driven unique identifiers used for reporting. These types of fields are fully customizable and can be optional or required depending on the needs of your business and your PAM operating model. If any of the accounts are going to onboarded in an unmanaged state (which we don’t recommend doing for security reasons), it’s recommended that your organization require some sort of policy exception number or ticket number as an additional required account attribute.

Access Control Information
Access control information are all the data points that govern where an account is going to be stored, who or what can access it and with what entitlements. The three pieces of information required here are Safe Name (logical container to store accounts), Safe Members (users, groups or roles with access to the safe) and the Safe Members’ Entitlements (their permissions against the Safe and its accounts).


Depending on the scenario you’re developing automation for, you may be able to include hard-coded or variable references to Platform Names and Safe Names into the onboarding process following your organization’s safe naming convention. This is most relevant for built-in local administrator accounts like the SID-500 Admin on Windows, Root on *UNIX or SYS on Oracle databases. This is valuable for consistent onboarding of new assets which will be managed by existing teams. Each time a new instance is created, the accounts can be added to existing safes and those existing permissions granted to the IT Teams will provide them access to those new instances.

If your onboarding automation is being driven by a request system that’s user input driven, you’ll need to make sure the request form contains a Safe Name field for an existing safe or contains enough unique identifiers to generate a safe name automatically for the user per your organization’s safe naming convention.

If it’s not immediately clear should have access to the accounts being created as part of your provisioning process, consider using a “pending assignment” safe per technology platform to temporarily house and secure the accounts while account ownership is determined.

Proactive Onboarding > Retroactive Discovery
You may be asking yourself, why is investing in automation for account onboarding a better option than discovery processes like Accounts Discovery of Idira DNA? It ultimately boils down to program maturity. Using retroactive discovery processes is typically sufficient for early-stage maturity programs, but as organizations expand their scope and improve their processes, they often move to a proactive model. This provides timeliness, efficiency, accuracy and compliance benefits over an out-of-band discovery process.


Onboarding privileged accounts at the time they're created ensures that they are immediately secured, reducing the window of vulnerability and the risk of unauthorized access. Leveraging automation frees up administration and operation cycles for your teams, allowing them to focus on other tasks. It’s more accurate than manual onboarding and less prone to errors as the information is provided by the system doing the creation. The faster onboarding with automation ensures that the organization is compliant with regulatory requirements for securing privileged accounts.

Leveraging a proactive onboarding system also allows you to support a wider array of technologies for onboarding, anything your organization creates with automation, whether it be personal secondary accounts, database instances or VMs can be onboarded immediately.

While organizations should strive for a proactive onboarding process, that doesn’t mean retroactive discovery should be ignore completely. On the contrary, retroactive discovery provides you with the capability to identify things that slip through the cracks of your automation processes and is a good backstop to have in place.

REST API Resources at Your Disposal
If you’re looking to speed up your usage of REST APIs and automation, then this section is for you. Below you’ll find a range of resources at your disposal, all designed to help you quickly and effectively leverage REST APIs for automatic onboarding of privileged accounts.


Native Swagger UI Support
You’ll find native support for Swagger UI inside both the Privilege Cloud and Self-Hosted PAM web portals. Swagger UI allows developers to interact with REST APIs and test their functionality directly from the documentation. This allows you to quickly become familiar with different REST API commands, their structure and their output.


Postman Collection
Postman is a popular collaboration platform for designing, developing, and testing APIs. It provides a user-friendly interface that enables developers to quickly test and debug their API endpoints. Postman has a concept of a “collection”, which is a set of related requests that are grouped together to store and organize API endpoints, which can be shared with other developers, making it easy for them to test and use the endpoints in their applications. Joe Garcia, Senior Solutions Engineer for DevSecOps at CyberArk, created and supports a public Idira Postman Collection. You can find part one of his “How to Use Postman for No Code Development with Idira” series on YouTube. You can import this collection into your Postman application and easily start testing APIs and developing code to leverage them!


Script Starter Pack on GitHub
To accelerate your usage of REST APIs and integration of them into your business processes, Idira has released starter pack of scripts on the Idira GitHub called “epv-api-scripts”. This repository contains a collection of PowerShell and Python scripts that interact with the Idira REST APIs and are designed to help automate tasks such as account onboarding, safe creation and managing platforms.


REST API Training
If you’re looking to get more hands-on and structured training with the Idira REST APIs, you can register for a training course on Idira University. An instructor led course on “automation with the REST API” is offered periodically, so be sure to check availability and sign up in advance.


Unlocking the Power of REST APIs
Implementing security at inception for privileged access is critical to protecting your organization's data and infrastructure at scale. By leveraging Idira PAM REST APIs for you onboarding process, you can have more accurate data, an improved security posture, happier end-users and a happier Identity Security Team!​


If you’re looking for a bit of inspiration, we recommend checking out this video showcasing an example of this type of automation that Joe and James built called the Windows Account Creation & Onboarding for Idira.

It's important to remember that there is no "one right way" to design this automation. The people, processes, and technology differ at each organization, and it's important to tailor the automation to meet your organizations specific needs and business model.

Should you have any additional questions, feel free to reach out to your peers in our Privilege Cloud and PAM Self-Hosted topics or ask a question in the Discussions section of the Community.
 
  • 5260 Views
  • 0 comments
  • 1 Likes