Skip to content

Authentication

When working with a production deployment of Fides, all sensitive endpoints will require authentication. This includes endpoints typically used by the CLI. To facilitate higher security without degrading the user experience, there is a quick flow for authentication via the CLI.

As part of the authentication process, a credentials file is created. This credentials file will automatically be used to create an authentication header to be used by the CLI when making API requests.

For a list of all user-related CLI commands, please refer to the CLI reference page here.

The CLI Auth Flow

There is a single command to authenticate as a CLI user. It has various invocation options to suit various situations. Example invocations:

Example of User Input Required

fides> fides user login
Loaded config from: .fides/fides.toml
Username: root_user
Password:
Logged in as user: root_user
Credentials file written to: C:\Users\fidesuser/.fides_credentials

Example of Including Inputs As Options

fides> fides user login -u root_user -p Testpassword1!
Loaded config from: .fides/fides.toml
Logged in as user: root_user
Credentials file written to: C:\Users\fidesuser/.fides_credentials

By default, the credentials file will be stored within the home directory as a file called .fides_credentials, but this path can be overridden via an environment variable FIDES_CREDENTIALS_PATH.


Example Credentials File

The following is an example credentials file:

username = "root_user"
password = "Testpassword1!"
user_id = "fidesadmin"
access_token = "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0..WBo3FxOFfouw4UxYnv9_4Q._GmOyi_d0xhmLUHdOStR43aL09Zzaw3OOq1k3AL_1YJaC4OENuMydbvZ16aLBKUBCVOf4rRUA1NiZY34rXDwIUhU0fkANWknhCOpmgOdG2qhUO3-zSoq_mlv2QjtnWzcBFN9q291f0-QSwg11KNSq9biwpBf81Ki53puygz2FaglpaiOcjWyA33wKu8WRizlCnGAfnFPLqqc1Vf4kSsrKDaLUIAiNF_UxbkBlJcw-2eveV6Sbr7To_ixvYHH_N9nnYH7nrfK_oJEh_GG5SLrTFw4HXMh8DTJ19JylssQ0GCJK2CkldSJP7bzveaI0jkjgTr3hH2TSe5L7dbi1AaZ4VNKKjEraGmlceCrSjoktbwGgCVPo4sf-QAnStUnJAdMTxnoUFoHV8TlXqCqdAPbkr4cTlLWyG4dJV7VI5Dc-sKYAD8DuRAPQiNt2PmIFh6RrTkb8gD1VSGNoFX-nRx0lOqK8f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