Authentication in DataSphere Jobs
Written by
Updated at August 29, 2024
To use DataSphere Jobs, you need to authenticate as a user account.
Yandex account
Federated account
-
Get an OAuth token.
-
Specify the OAuth token in one of two ways:
-
Using the
YC_TOKEN
orYC_OAUTH_TOKEN
environment variables in the~/.bash_profile
configuration file (or~/.bashrc
for Linux).The OAuth token will be saved in the profile configuration and authentication will be automatic.
-
Using DataSphere CLI and the
-t
option, e.g.:datasphere -t <OAuth_token> project job get --id <project_ID>
In this case, you will have to specify the OAuth token in each command.
-
To authenticate federated accounts, install and configure the Yandex CLI. You cannot run a job as a federated account on a local computer without a graphical shell: the Yandex CLI will redirect your request to the browser for authentication.