Store credentials to access Seven Bridges client applications and libraries
Overview
Seven Bridges maintains client applications and libraries which require authentication. Instead of storing your credentials separately for each client application or client library, use a unified configuration file to securely maintain your credentials and authenticate. On this page, learn about Seven Bridges client applications and libraries which require authentication, how applications and libraries check for credentials, and about using a unified configuration file.
Seven Bridges client applications and libraries
The following Seven Bridges client applications and libraries require your Seven Bridges Platform credentials to authenticate.
Application or library name | Description |
---|---|
sevenbridges-python | sevenbridges-python is the official Seven Bridges -maintained Python bindings for the Seven Bridges API. |
sevenbridges-r | sevenbridges-r is the official Seven Bridges -maintained R bindings for the Seven Bridges API. |
sevenbridges-java | sevenbridges-java is the official Seven Bridges -maintained Java bindings for the Seven Bridges API. |
Seven Bridges Command Line Interface | Seven Bridges Command Line Interface is the official Seven Bridges -maintained command line client for the Seven Bridges API. |
SBFS | SBFS is a command line tool which enables interaction with Platform project files that are mounted as a local file system. |
Hierarchy of credentials
Using a unified configuration file is the preferred method for storing your Seven Bridges credentials. However, Seven Bridges client applications and libraries will check for your credentials in the following order:
- Explicit parameters passed during initialization
- Environmental variables available on an OS level which are defined by users. Credentials can be stored using using the following environmental variables:
SB_API_ENDPOINT
andSB_AUTH_TOKEN
. - Unified configuration file which stores your credentials for all Seven Bridges client applications and libraries. This is the preferred method for storing your credentials. Learn more about the unified configuration file below.
- Application or library -specific configuration file which stores your credentials for a specific Seven Bridges client application or library.
Note that the previously used configuration file (such as .sbgrc or .sbg.auth.yml) is no longer supported by sevenbridges-r starting from version 1.5.5 and sevenbridges-python starting from version 0.7.0.
Unified configuration file
Use a unified configuration file to store all of your credentials for Seven Bridges client applications and libraries. The configuration file, credentials
, is a INI-like file stored in a directory named .sevenbridges
underneath your home directory. This location varies across operating systems, but would typically be:
- (for Linux and Mac OS X)
$HOME/.sevenbridges/credentials
- (for MS Windows)
%UserProfile%\.sevenbridges\credentials
The credentials
configuration file should contain key-value pairs of the following form:
api_endpoint = https://api.sbgenomics.com/v2
auth_token = 7eab0822exAMPle23d7d14c2eEXampLE
The above key-value pairs comprise one profile. Each profile's name precedes the relevant key-value pairs and is enclosed in brackets. The credentials
file can consist of multiple profiles, as shown below. For instance, users may have multiple accounts on the same environment:
[default]
api_endpoint = https://api.sbgenomics.com/v2
auth_token = 1e43fEXampLEa5523dfd14exAMPle3e5
[sbpla-2]
api_endpoint = https://api.sbgenomics.com/v2
auth_token = 7eab0822exAMPle23d7d14c2eEXampLE
Note that each profile must have exactly one api_endpoint
and one auth-token
key with their corresponding values.
Updated over 2 years ago