Skip to main content

The Cyral CLI Tool

Use this tool to obtain credentials for accessing a data repo via the Cyral sidecar.

Notes

  1. This tool does not work with Cyral versions before 3.0. If you are using an older version of Cyral, please use the gimme-db-token tool instead.

  2. Use version 1.x of this tool for Cyral version 3.X and version 2.x for Cyral version 4.X and greater.

  3. Command token works only with Cyral version 4.12 and greater.


Usage

cyral [OPTIONS] COMMAND [ARGS]...

The Cyral CLI

Options

Name Description
--cp-address TEXT Cyral Control Plane Address
--no-browser Disable automatic browser launch for authentication
--idp TEXT Identity Provider to use to authenticate to Cyral
--local-port INTEGER Local port number for receiving OAuth2 redirects [default: 8005]
--stored-creds / --no-stored-creds Use and/or store refresh token in ~/.cyral [default: stored-creds]
--offline-access / --no-offline-access Obtain a (long lived) offline refresh token [default: no-offline-access]
--realm TEXT Authentication realm (usually not needed) [default: default]
--version Show the version and exit.
--help Show this message and exit.

Commands

Name Description
access Access a data repo.
help Prints detailed usage information including commands,...
sidecar Sidecar related commands
token Manage access tokens.

Usage

cyral help [OPTIONS]

Prints detailed usage information including commands, subcommands, and options.

Options

Name Description
-f, --output-format [plain | md] Output format [default: plain]
--help Show this message and exit.

Usage

cyral token [OPTIONS] COMMAND [ARGS]...

Manage access tokens. By default, tokens are cached in a file. Use option --no-use-token-cache if you wish to disable token caching.

Options

Name Description
--use-token-cache / --no-use-token-cache Whether to use local token cache. [default: use-token-cache]
--help Show this message and exit.

Commands

Name Description
create Create a new access token.
delete Delete an access token.
list Lists information about all currently valid access tokens.
show Show the value of a cached access token.

Usage

cyral token create [OPTIONS]

Create a new access token.

Options

Name Description
--validity INTEGER Token validity in seconds (system default if not specified)
--name TEXT Name of the access token, autogenerated if not specified
-h, --help Show help message and exit.

Usage

cyral token list [OPTIONS]

Lists information about all currently valid access tokens. Actual token values are not shown.

Options

Name Description
-f, --output-format [plain | json] Output format [default: plain]
-h, --help Show help message and exit.

Usage

cyral token delete [OPTIONS]

Delete an access token.

Options

Name Description
-h, --help Show help message and exit.
--token-id TEXT ID of the token on which the action will be performed

Usage

cyral token show [OPTIONS]

Show the value of a cached access token.

Options

Name Description
-h, --help Show help message and exit.
--token-id TEXT ID of the token on which the action will be performed

Usage

cyral access [OPTIONS] COMMAND [ARGS]...

Access a data repo.

Options

Name Description
--token TEXT Access token value to use (optional)
--auto-generate-token / --no-auto-generate-token Generate a token automatically if needed [default: auto-generate-token]
--use-token-cache / --no-use-token-cache Whether to use local token cache. [default: use-token-cache]
--help Show this message and exit.

Commands

Name Description
pg Configure access to postgres databases via Cyral in .pgpass file.
repo Obtain information to access a data repo
s3 Configure AWS profile for accessing S3 via Cyral sidecar.
token Obtain access token for accessing a data repo.

Usage

cyral access token [OPTIONS]

Obtain access token for accessing a data repo. DEPRECATED: If your Cyral control plane has version v4.12.0 or later, use the cyral token create and cyral token show commands.

Options

Name Description
-h, --help Show help message and exit.

Usage

cyral access repo [OPTIONS]

Obtain information to access a data repo

Options

Name Description
-n, --name TEXT Repo name in Cyral (substring match)
--tag TEXT Repo tag (substring match)
-t, --type [auroramysql | aurorapostgres | denodo | dremio | galera | mariadb | mongodb | mysql | oracle | postgresql | redshift | s3 | sqlserver] Repo type
--repos-per-page INTEGER Number of repos shown per page [default: 10]
-f, --output-format [plain | json] Output format [default: plain]
-h, --help Show help message and exit.

Usage

cyral access s3 [OPTIONS]

Configure AWS profile for accessing S3 via Cyral sidecar.

Options

Name Description
--aws-profile TEXT Name of the AWS profile to configure [default: cyral]
--autoconfigure / --no-autoconfigure Autoconfigure (without confirmation) S3 proxy settings [default: no-autoconfigure]
--account-name TEXT Preferred account name to use for accessing the s3 repo
--silent / --no-silent Do not print confirmation messages [default: no-silent]
-h, --help Show help message and exit.

Usage

cyral access pg [OPTIONS]

Configure access to postgres databases via Cyral in .pgpass file.

Options

Name Description
--silent / --no-silent Do not print confirmation messages [default: no-silent]
-h, --help Show help message and exit.

Usage

cyral sidecar [OPTIONS] COMMAND [ARGS]...

Sidecar related commands

Options

Name Description
--id TEXT the id of the sidecar
--name TEXT the name of the sidecar
--help Show this message and exit.

Commands

Name Description
get Get information about sidecars in the control plane.
set Set different sidecar options.

Usage

cyral sidecar get [OPTIONS]

Get information about sidecars in the control plane.

Options

Name Description
-f, --output-format [yaml | json | table] Output format [default: table]
-h, --help Show help message and exit.

Usage

cyral sidecar set [OPTIONS] COMMAND [ARGS]...

Set different sidecar options.

Options

Name Description
--help Show this message and exit.

Commands

Name Description
log-level Set the log level for a sidecar service.

Usage

cyral sidecar set log-level [OPTIONS]

Set the log level for a sidecar service. The argument can be of the form (log level applicable to all services) or : (log level for a specific service). can be one of fatal, error, warn, info, debug, or trace. The list of services may vary depending on the sidecar version and configuration. This option can be specified multiple times, the last log level specified for a service is the one that is set.

Examples

set the level for all services

cyral sidecar set log-level --level debug

set the level for a single service

cyral sidecar set log-level --level dispatcher:warn

set the level for multiple services

cyral sidecar set log-level --level dispatcher:warn --level pg-wire:debug

Options

Name Description
--level TEXT requested log level
-h, --help Show help message and exit.

Release Notes

2.5.8

  • Update dependencies.

2.5.7

  • Update dependencies.

2.5.6

  • (Bug fix) Add missing PyYAML dependency.

2.5.5

  • (Bug fix) Fix the bug where attempting to set log level for a service may give error "service does not exist".

2.5.4

  • (Bug fix) Remove dependency on awscli 1.x package and use awscli-plugin-proxy instead of awscli-plugin-s3-proxy to avoid clobbering of awscli installation.

2.5.3

  • (Bug fix) Fix possible unexpected exception in access s3 command.

2.5.2

  • (Bug fix) Fix bug in access token command for older (< v4.12) control planes.

2.5.1

  • (Enhancement) Add --no-browser flag to disable automatic browser launch for authentication.
  • (Enhancement) Add --auto-token-generation option.

2.5.0

  • (Enhancement) Add access token management commands and token cache.
  • (Refactor) Update access commands to use new token interactions.

2.4.0

  • (Enhancement) Add help command for comprehensive command help.
  • (Bug Fix) Disable option validity checking when --help is specified.

2.3.0

  • (Enhancement) Allow users to choose account name for S3 access.

2.2.4

  • (Chore) Update dependency versions.

2.2.3

  • (Enhancement) Support new certificate download endpoint on Cyral Control Plane.

2.2.2

  • (Bug Fix) Support aws s3api command.

2.2.1

  • (Bug Fix) Make changes compatible with Python version 3.9.

2.2.0

  • (Enhancement) Add sidecar command.

2.1.1

  • (Enhancement) Add --realm option to support some older control planes.

2.0.1

  • (Bug Fix) Choose non-proxy mode port for S3 repo.

2.0.0

  • (Enhancement) Add support for Cyral Control Plane v4.x.

Metadata

Release files for cyral 2.5.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cyral 2.5.8
File Size Uploaded Provenance Actions
cyral-2.5.8.tar.gz 22.0 kB Without provenance Details for cyral-2.5.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cyral 2.5.8
File Interpreter ABI Platform Actions
cyral-2.5.8-py3-none-any.whl Python 3 none any Details for cyral-2.5.8-py3-none-any.whl

Total release size: 49.0 kB

Release files / cyral-2.5.8.tar.gz

Download URL cyral-2.5.8.tar.gz
Size 22.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fe8880ec20e0a6538c2060cf6cd735a81ef0465f5fbb3d8bbdfaa879510028a3
BLAKE2b-256 checksum
How to use checksums
1edff4667d826b8b4d1e76d4a9088c09c12b40b89b6b4c68890309294916d786
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / cyral-2.5.8-py3-none-any.whl

Download URL cyral-2.5.8-py3-none-any.whl
Size 27.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a4962e7880b4df1143a703cf39ec6bd4681fb02f2cfae1e60ac55461e766796
BLAKE2b-256 checksum
How to use checksums
f0498bd27e9cdc7fe59ce7fc41a0504b4486eff71da1febe3dc32191f9374a07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Security for cyral 2.5.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page