Getting started¶
Installation¶
You can install the SDK via go modules using the following command:
go install github.com/cyberark/ark-sdk-golang
Make sure that the PATH environment variable points to the go binary path, for example:
export PATH=$PATH:$(go env GOPATH)/bin
CLI Usage¶
Both the SDK and the CLI support profiles, which can be configured as needed and used for consecutive actions.
The CLI has the following basic commands:
- configure: Configure profiles and their authentication methods (see Configure)
- login: Log in using the configured profile authentication methods (see Login)
- exec: Execute commands for supported services (see Exec)
- profiles: Manage multiple profiles on the machine (see Profiles)
- cache: Manage ark cache on the machine (see Cache)
Basic flow¶
-
Install Ark SDK and then configure a profile (either silently or interactively):
ark configure --silent --work-with-isp --isp-username myuser
-
After the profile is configured, log in:
ark login --silent --isp-secret mysecret
-
Execute actions (such as generating a short-lived SSO password):
ark exec sia sso short-lived-password