Skip to content

The SailPoint Command Line Interface (CLI) makes it easy to interact with SailPoint's SaaS Platform in a programmatic way. Many functions that use to be accomplished through tools like Postman or from custom scripts can now be done directly on the command line with minimal setup.

License

Notifications You must be signed in to change notification settings

ruben-elizondo-sp/sailpoint-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discourse Topics Times Downloaded Issues Latest Releases Contributor Shield License Shield

CAUTION: The SailPoint CLI is currently in pre-production and undergoing heavy development. Until the CLI reaches version 1.0.0, breaking changes may be introduced at any time while we work on refining the CLI.


Logo

SailPoint CLI - README


About The Project

The SailPoint Command Line Interface (CLI) makes it easy to interact with SailPoint's SaaS Platform in a programmatic way. Many functions that use to be accomplished through tools like Postman or from custom scripts can now be done directly on the command line with minimal setup.

Please use GitHub issues to submit bugs or make feature requests.

If you'd like to contribute directly (which we encourage!) please read the contribution guidelines below, first!

Contents

Installation

There are several ways to install the SailPoint CLI, including through a package manager for your OS of choice or manual installation.

Homebrew

For Mac OS users, you can use Homebrew to install the CLI. Please run the following command in your terminal:

brew install sailpoint-oss/homebrew-sailpoint-oss/sailpoint-cli

Manual Installation

Prebuilt binaries for OS X, Windows, and Linux are provided in our releases section. If you download the prebuilt binary, you can skip to the configuration section. If you want to manually build this project, please follow the steps below.

Prerequisites

For Mac OS users, you can use Homebrew to install the CLI. Please run the following command in your terminal:

brew install sailpoint-oss/homebrew-sailpoint-oss/sailpoint-cli

Manual Installation

Prebuilt binaries for OS X, Windows, and Linux are provided in our releases section. If you download the prebuilt binary, you can skip to the configuration section. If you want to manually build this project, please follow the steps below.

Prerequisites

You will need to install Golang version 1.18 or above.

MacOS and Linux

MacOS and Linux

Open your terminal app, navigate to the project directory, and run the following command:

make install

After that, make sure you can run the sail command.

sail

linux make gif

Windows

Open PowerShell as administrator, navigate to the project directory, and run the following command.

go build -o "C:\Program Files\sailpoint\sail.exe"

After that, add the following directory to the system PATH parameter. You can find instructions on how to do this from this article. This will only need to be done the first time you install the CLI.

C:\Program Files\sailpoint

After setting your environment variable, close all instances of your PowerShell or Command Prompt, open a new instance, and make sure you can run the sail command.

sail

Configuration

Before you begin, you will need to gather the following information.

Whichever authentication method you choose will be used to authenticate the SailPoint CLI to your IdentityNow tenant. Take note of the Client ID and the Client Secret. If configuring OAuth additionally note the Redirect Port and Redirect Path

Assisted configuration

After you have created the Auth Method, run the configure command the corresponds to your chosen authentication method to configure the CLI for your tenant. This command will create a configuration file in your home directory to store your tenant's connection details.

Personal Access Token

sail configure pat

configure PAT

OAuth

sail configure oauth

configure OAuth

Manual configuration

Alternatively, you can manually create a configuration file in your home directory.

On Linux/Mac, run:

mkdir ~/.sailpoint
touch ~/.sailpoint/config.yaml

On Windows PowerShell, run:

New-Item -ItemType Directory -Path 'C:\Users\<username>\.sailpoint'
New-Item -ItemType File -Path 'C:\Users\<username>\.sailpoint\config.yaml'

The config.yaml file should contain the following information.

authtype: pat # Can be either pat or oauth, both methods can be configured, with only one being active at a time.
debug: false # Setting debug to true, will result in more verbose output
oauth: # All OAuth specific configuration information
  authurl: https://example.identitynow.com/oauth/authorize
  baseurl: https://example.api.identitynow.com
  clientid: example-client-id
  clientsecret: ""
  redirect:
    path: /callback
    port: 3000
  tenant: example
  token:
    accesstoken: example-access-token
    expiry: example-token-expiry-date
  tokenurl: https://example.api.identitynow.com/oauth/token
pat: # All Personal Access Token specific configuration information
  tenant: example
  baseurl: https://example.api.identitynow.com
  tokenurl: https://example.api.identitynow.com/oauth/token
  clientsecret: example-client-secret
  clientid: example-client-id
  token:
    accesstoken: example-access-token
    expiry: example-token-expiry-date

Environment variable configuration

You may also specify environment variables for your configuration. This can useful when using the CLI in an automated environment, like a CI/CD pipeline, where consuming the configuration from environment variables would be easier than creating the config file. Environment variables take precedent over values defined in a config file.

On Linux/Mac, export the following environment variables:

export SAIL_BASEURL=https://{org}.api.identitynow.com
export SAIL_TOKENURL=https://{org}.api.identitynow.com/oauth/token
export SAIL_CLIENTID={clientID}
export SAIL_CLIENTSECRET={clientSecret}
export SAIL_DEBUG=false

If you want your environment variables to persist across terminal sessions, you will need to add these exports to your shell profile, like ~/.bash_profile.

On Windows PowerShell run:

$env:SAIL_BASEURL = 'https://{org}.api.identitynow.com'
$env:SAIL_TOKENURL = 'https://{org}.api.identitynow.com/oauth/token'
$env:SAIL_CLIENTID = '{clientID}'
$env:SAIL_CLIENTSECRET = '{clientSecret}'
$env:SAIL_DEBUG = 'false'

If you want your environment variables to persist across PowerShell sessions, then use the following command instead:

[System.Environment]::SetEnvironmentVariable('SAIL_BASEURL','https://{org}.api.identitynow.com')

Usage

Run the sail command for an overview of the available commands and flags. You can use the -h flag with any available command to see additional options available for each command. You can find more information about each command below.

Discuss

Click Here to discuss this tool with other users.

License

Distributed under the MIT License. See the license for more information.

Contributing

Before you contribute you must sign our CLA. Please also read our contribution guidelines for all the details on contributing.

Code of Conduct

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. Read our code of conduct to learn more.

(back to top)

About

The SailPoint Command Line Interface (CLI) makes it easy to interact with SailPoint's SaaS Platform in a programmatic way. Many functions that use to be accomplished through tools like Postman or from custom scripts can now be done directly on the command line with minimal setup.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 97.2%
  • TypeScript 2.3%
  • Other 0.5%