All Projects → infamousjoeg → cybr-cli

infamousjoeg / cybr-cli

Licence: Apache-2.0 license
A "Swiss Army Knife" command-line interface (CLI) for easy human and non-human interaction with @cyberark suite of products.

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to cybr-cli

Ether
A Command-Line Interface for the Swift Package Manager
Stars: ✭ 86 (+91.11%)
Mutual labels:  command-line-tool, command-line-interface
Rebound
Command-line tool that instantly fetches Stack Overflow results when an exception is thrown
Stars: ✭ 3,763 (+8262.22%)
Mutual labels:  command-line-tool, command-line-interface
cli-progress
⌛ easy to use progress-bar for command-line/terminal applications
Stars: ✭ 672 (+1393.33%)
Mutual labels:  command-line-tool, command-line-interface
Enhancd
🚀 A next-generation cd command with your interactive filter
Stars: ✭ 2,049 (+4453.33%)
Mutual labels:  command-line-tool, command-line-interface
Gitui
Blazing 💥 fast terminal-ui for git written in rust 🦀
Stars: ✭ 6,762 (+14926.67%)
Mutual labels:  command-line-tool, command-line-interface
teller
Cloud native secrets management for developers - never leave your command line for secrets.
Stars: ✭ 998 (+2117.78%)
Mutual labels:  cyberark, conjur
c
Official C client library for Kubernetes
Stars: ✭ 83 (+84.44%)
Mutual labels:  client-library
fix
Allows you to use OpenAI Codex to fix errors in the command line.
Stars: ✭ 72 (+60%)
Mutual labels:  command-line-tool
conjur-quickstart
Start securing your secrets and infrastructure by installing Conjur, using Docker and the official Conjur containers on DockerHub.
Stars: ✭ 18 (-60%)
Mutual labels:  conjur
Nota
A calculator with a beautiful interface for the Terminal, Including unicode-based charting and rich mathematical notation rendering
Stars: ✭ 45 (+0%)
Mutual labels:  command-line-interface
cati
Cati Unix Package Manager
Stars: ✭ 19 (-57.78%)
Mutual labels:  command-line-tool
quake-cli-tools
Command line tools for creating Quake content.
Stars: ✭ 41 (-8.89%)
Mutual labels:  command-line-tool
glacier
❄️ Building Python CLI using docstrings and typehints 🐍
Stars: ✭ 84 (+86.67%)
Mutual labels:  command-line-tool
in3-legacy
[Deprecated] Typescript-version of the IN3 client.
Stars: ✭ 69 (+53.33%)
Mutual labels:  client-library
libgen-downloader
A simple tool to search and download ebooks from libgen via terminal user interface.
Stars: ✭ 98 (+117.78%)
Mutual labels:  command-line-tool
circles-core
Common methods to interact with the Circles ecosystem
Stars: ✭ 22 (-51.11%)
Mutual labels:  client-library
geeup
Simple CLI for Google Earth Engine Uploads
Stars: ✭ 67 (+48.89%)
Mutual labels:  command-line-tool
pint
A single-file command-line package manager for Windows.
Stars: ✭ 35 (-22.22%)
Mutual labels:  command-line-tool
crawler click tutorial
click tutorial ( crawler ) use python
Stars: ✭ 15 (-66.67%)
Mutual labels:  command-line-tool
nuxt-modules-cli
Browse Nuxt.js modules from the terminal
Stars: ✭ 25 (-44.44%)
Mutual labels:  command-line-tool

cybr-cli

A "Swiss Army Knife" command-line interface (CLI) for easy human and non-human interaction with CyberArk's suite of products.

Current products supported:

  • CyberArk Privileged Access Manager (PAM)
  • CyberArk Secrets Manager Central Credential Provider (CCP)
  • CyberArk Conjur Secrets Manager Enterprise & Open Source
  • CyberArk Cloud Entitlements Manager (Free trial)

Want to get dangerous quickly? Check out the example bash script at dev/add-delete-pas-application.sh.

cybr-cli CI Quality Gate Status CodeQL

Table of Contents

Install

MacOS

$ brew tap infamousjoeg/tap
$ brew install cybr-cli

Windows or Linux

Download from the Releases page.

AWS CloudShell

mkdir -p ~/.local/bin && \
curl --silent "https://api.github.com/repos/infamousjoeg/cybr-cli/releases/latest" |
    grep '"tag_name":' |
    sed -E 's/.*"([^"]+)".*/\1/' |
    xargs -I {}  curl -o ~/.local/bin/cybr -sOL "https://github.com/infamousjoeg/cybr-cli/releases/download/"{}'/linux_cybr' && \
chmod +x ~/.local/bin/cybr

Install from Source

$ git clone https://github.com/infamousjoeg/pas-api-go.git
$ ./install
$ cybr help

Usage

  • $ cybr help for top-level commands list
  • $ cybr [command] -h for specific command details and sub-commands list

Documentation

All commands are documentated in the docs/ directory.

Autocomplete

The cybr CLI has a completion command that can be used to enable autocomplete for the CLI. The completion command is dependant on your shell type. Currently the only shells that are supported are: bash, zsh, fish and powershell.

Below is an example on how to enable cybr cli auto-completion from a zsh shell.

# enable shell completetion. Only needs to be performed once.
echo "autoload -U compinit; compinit" >> ~/.zshrc

# create and write the auto-completion script.
# ${fpath[1]} '1' may be different depending on your environment.
cybr completion zsh > "${fpath[1]}/_cybr"

If you are using a different shell execute the completion command with the --help flag and follow instructions for the desired shell type.

cybr completion --help

Example Source Code

Logon to the PAS REST API Web Service

package main

import (
	"fmt"
	"log"
	"os"

	pasapi "github.com/infamousjoeg/pas-api-go/pkg/cybr/api"
)

var (
	hostname = os.Getenv("PAS_BASE_URL")
	username = os.Getenv("PAS_USERNAME")
	password = os.Getenv("PAS_PASSWORD")
	authType = os.Getenv("PAS_AUTH_TYPE")
)

func main() {
	// Logon to PAS REST API Web Services
	token, errLogon := pasapi.Logon(hostname, username, password, authType, false)
	if errLogon != nil {
		log.Fatalf("Authentication failed. %s", errLogon)
	}
	fmt.Printf("Session Token:\r\n%s\r\n\r\n", token)
}

Security

If there is a security concern or bug discovered, please responsibly disclose all information to joe (dot) garcia (at) cyberark (dot) com.

cybr safes add-member --role Role Permissions

All safe member roles defined below are based on best practices and recommendations put forth by CyberArk's PAS Programs Office, creators of the CyberArk Blueprint for Identity Security.

Role Safe Authorizations
BreakGlass All authorizations except Authorize Password Requests
VaultAdmin - List Accounts
- View Audit Log
- View Safe Members
SafeManager - Manage Safe
- Manage Safe Members
- View Audit Log
- View Safe Members
- Access Safe w/o Confirmation
EndUser - Use/Retrieve/List Accounts
- View Audit Log
- View Safe Members
Auditor - List Accounts
- View Audit Log
- View Safe Members
AIMWebService No authorizations
AppProvider - Retrieve/List Accounts
- View Safe Members
ApplicationIdentity - Retrieve/List Accounts
AccountProvisioner - List/Add/Delete Accounts
- Update Password Properties
- Initiate CPM Password Management Operations
- View Audit Log
- View Safe Members
- Access Safe w/o Confirmation
CPDeployer - List/Add Accounts
- Update Password Properties
- Initiate CPM Password Management Operations
- Manage Safe Member
- View Audit Log, View Safe Members
- Access Safe w/o Confirmation
ComponentOrchestrator - List/Add Accounts
- Update Password Properties
- Initiate CPM Password Management Operations
- View Audit Log
- Access Safe w/o Confirmation
APIAutomation - List/Add/Rename/Delete/Unlock Accounts
- Update Password Content/Properties
- Initiate CPM Password Management Operations
- Manage Safe
- Manage Safe Members
- View Audit Log
- View Safe Members
- Create/Delete Folders
- Move Accounts/Folders
PasswordScheduler - List Accounts
- Initiate CPM Password Management Operation
- View Audit Log
- View Safe Members
- Access Safe w/o Confirmation
ApproverLevel1 - List Accounts
- View Audit Log
- View Safe Members
- Authorize Password Requests (Level 1)
ApproverLevel2 - List Acccounts
- View Audit Log
- View Safe Members
- Authorize Password Requests (Level 2)

Testing

go test -v ./...

Maintainers

@infamousjoeg

Buy me a coffee

@AndrewCopeland

Contributions

Pull Requests are currently being accepted. Please read and follow the guidelines laid out in CONTRIBUTING.md.

License

Apache 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].