cybr-cli

command module
v0.1.1-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

README

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 Security (PAS)
  • CyberArk Conjur Secrets Manager Enterprise & Open Source

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.

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

All commands are documentated in the docs/ directory.

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)

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL