CLI: Authentication

Learn how to use CLI to pass authentication information.


Overview

Authentication to the DryvIQ Platform can be made securely using the Command-line interface (CLI). This page explains the available authentication methods, required credentials, and configuration steps to establish a trusted connection between the CLI and your DryvIQ environment.

SkySync References

The CLI references SkySync. This is expected. 

 

Authentication

The CLI requires authentication information to be passed in with every command. There are two ways to provide this information: in-line with the command or within a file.

Paramater Description Required Default
server The DryvIQ server URI Optional http://localhost:9090/
username, user The username Optional admin
password The password Required  
site The remote site context Required when connecting to a remote site  

Example 1: Command line parameters

In this example, the authentication parameters are provided through the command line with the request to list the connections. The parameters within the two curly braces (including the braces) must be replaced with valid values.

Command with variables

skysync-cli --username={{username}} --password={{password}} --server=http://{{server IP address}}:{{server port}}/ connections list

Command with example values

skysync-cli --username=admin --password=somePassword --server=http://111.111.111.111:9090/ connections list

Example 2: Parameters provided within a file

In this example, the authentication parameters are provided within the configuration file. The parameters within the two curly braces (including the braces) must be replaced with valid values. The skysync-cli.json must be in the working directory.

Command

skysync-cli connections list

Contents of skysync-cli.json

{
    "server": "http://{{server IP address}}:{{server port}}/",
    "username": "{{username}}",
    "password": "{{password}}"
}

Example 3: Parameters provided by environment variables

In this example, the authentication parameters are provided by environment variables. The parameters within the two curly braces (including the braces) must be replaced with valid values.

Command

skysync-cli connections list
Environment Variable Name Value
SKYSYNC_server http://{{server IP address}}:{{server port}}/
SKYSYNC_username {{username}}
SKYSYNC_password {{password}}