cac

command module
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 1 Imported by: 0

README

CyberArk Client

cac is a simple CyberArk Central Credentials Provider REST client written in Go.

build

Authentication

Authentication to CCP is done via client certificate/key files.

Usage

Usage:
  cac get <object>... [flags]

Flags:
      --app-id string         CyberArk Application Id
      --cert-file string      Certificate file
  -c, --config string         Config name
  -h, --help                  help for get
      --host string           CyberArk CCP REST Web Service Host
      --json                  JSON output
      --key-file string       Key file
      --max-connections int   Max connections (default 4)
      --max-tries int         Max tries (default 3)
      --safe string           CyberArk Safe
      --timeout duration      Timeout (default 30s)
      --wait duration         Wait before retry (default 100ms)
  • Multiple accounts can be queried in one go

  • Pipe mode:

    $ echo "KEY=${CYBERARK:OBJECT}" | cac get -c MyConfig
    KEY=VALUE
    
  • Use max-connections to set max parallel HTTP connections to CCP server

  • Retries happened on error 500 (internal server error), 502 (bad gateway), 503 (service unavailable) and 504 (gateway timeout)

  • A config file can be setup in $XDG_CONFIG_HOME/cac/ (default to ~/.config/cac/)

    • Viper supports JSON, TOML, YAML, HCL, envfile and Java properties config files
    • the config name parameter should be the name of the config file (without the extension)
    • command line parameters overwrite config
  • app-id, cert-file, host, key-file, safe are required, either in config or in command line parameters

  • To generate the autocompletion script for your favorite shell:

    $ cac completion (bash | fish | zsh)
    
  • Default output is "shell" but JSON is also supported:

    o1='value1'
    o2='value2'
    
    [
      {
        "object": "o1",
        "value": "value1"
      },
      {
        "object": "o2",
        "value": "value2"
      }
    ]
    

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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