> For the complete documentation index, see [llms.txt](https://docs.brigge.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.brigge.ai/documentation/brigge-for-engineers/credentials.md).

# Credentials

## Overview

*Credentials* are the saved login details a system uses to authenticate when a pipeline runs. To use a *System* in a pipeline, you select a set of *Credentials* and an *Endpoint*. For example:

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FaKQwreVJ2qoiQyhGT5yv%2Fcredentials%20selected%20in%20connector%20a.png?alt=media&amp;token=9f4dc6f3-66b8-4e40-8166-123f9bdfc5c2" alt=""><figcaption></figcaption></figure></div>

## How credentials relate to systems

Credentials are directly associated with an [Authentication flow](/documentation/brigge-for-engineers/systems.md#authentication-flows), which is configured in the underlying *System* setup. So, when *Credentials* are added and subsequently applied in pipelines, they inherit settings for the given *Authentication flow.*&#x20;

It's useful to understand these relationships, especially if you're [building custom systems](/documentation/brigge-for-engineers/systems.md#building-custom-systems). The illustration below shows the key relationships:&#x20;

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FCvENA6XLfHCPqFf9jELB%2Fcredentials.svg?alt=media&amp;token=b2637033-c71b-4deb-9930-178ed6d3e07d" alt=""><figcaption></figcaption></figure></div>

Here, we can see:

{% stepper %}
{% step %}
**The linked system**

At the top level, a [*System*](/documentation/brigge-for-engineers/systems.md) (e.g. Workday) is configured with [*General Settings*](/documentation/brigge-for-engineers/systems.md#general-details) (e.g. `rate limit`, `date format`, and `timezone`), [*Authentication flows*](/documentation/brigge-for-engineers/systems.md#authentication-flows), and [*Endpoints*](/documentation/brigge-for-engineers/systems.md#endpoints).
{% endstep %}

{% step %}
**Adding credentials**

You add *Credentials* for a *System*, first selecting an *Authentication flow*. All *Authentication flows* configured for the *System* are available for selection. You are then prompted to provide authentication details for whichever flow you selected.
{% endstep %}

{% step %}
**Inherit or override authentication flow settings**

When [adding credentials](#adding-credentials), general *System* settings (`rate limit`, `date format`, and `timezone`) are inherited by default - you can override them if needed.

{% hint style="info" %}
**Why is this useful?**

A *System* might have multiple sets of credentials - for example, one set to access *Production* data, and another set for *Sandbox* data. You may want to (for example) apply a different rate limit for each environment.
{% endhint %}
{% endstep %}

{% step %}
**Inherit authentication variables**

An *Authentication flow* may be configured with [authentication variables](/documentation/brigge-for-engineers/systems.md#working-with-authentication-flow-variables) that are injected into [*Endpoints*](/documentation/brigge-for-engineers/systems.md#endpoints) at runtime.&#x20;

So, when a pipeline [*Connector* node](/documentation/brigge-for-transformers/pipelines/pipeline-nodes/connector-node.md) is configured to use a given set of *Credentials* and an *Endpoint* - and that endpoint references an authentication variable - that variable is resolved from the underlying *Authentication flow* setup.

{% hint style="info" %}
**Why is this useful?**

Suppose your *System* is configured with endpoints where the base URL is different for *Sandbox* and *Production* data. For example:

* `GET` `https://example.com/sandbox/api/1.0/contacts`
* `GET` `https://example.com/production/api/1.0/contacts`

To simplify this, the *System* might be configured with two 'flavours' of the same *Authentication flow*&#x20;

* *API Key Sandbox* (includes a `base_url` variable with a value set to `https://example.com/sandbox/api/1.0`).
* *API Key Production* (includes a `base_url` variable with a value set to `https://example.com/production/api/1.0`).

Endpoints for this *System* would reference the `base_url` variable, for example:

`GET` `{{base_url}}/contacts`

Then:

* When the *API Key Sandbox* credentials are used in a pipeline, the variable resolves to `https://example.com/sandbox/api/1.0/contacts`.
* When the *API Key Production* credentials are used in a pipeline, the variable resolves to `https://example.com/production/api/1.0/contacts`.<br>
  {% endhint %}
  {% endstep %}

{% step %}
**Easy auth rotation**

If authentication credentials change - for example, if an API key or token expires - all you need to do is update the relevant set of *Credentials*. The new details are applied throughout pipelines, wherever these credentials are used.
{% endstep %}
{% endstepper %}

## Working with credentials

<details>

<summary>Adding credentials</summary>

To add new credentials for a system, follow the steps below.

{% stepper %}
{% step %}
**Find the required system**

Select *Systems* from the navigation menu, then find the system you want to update.
{% endstep %}

{% step %}
**Add credentials**

Click the `add credentials` (plus symbol) option. For example:

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FnZk5lcjZLWHrleBrB89L%2Fadd%20creds%200.png?alt=media&amp;token=791454c4-9f40-4324-94a5-893d32edcc52" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Provide a name for this credential set**

Enter a name to identify this set of credentials throughout Brigge:

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FBxqk694roEGPFBbvkWne%2Fadd%20creds%20a2.png?alt=media&amp;token=b073d0ca-a4cc-4f60-b737-810e1a39a71e" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
This is the name that pipeline users will see when configuring connector nodes.&#x20;
{% endhint %}
{% endstep %}

{% step %}
**Review /** **override advanced settings (optional)**

If you want to review/override [general settings inherited from the system](/documentation/brigge-for-engineers/systems.md#general-details), click the `advanced fields` 'expand' option. For example:

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FHMIwFqcDiiBDCRwbmtJu%2Fadd%20creds%20a4.png?alt=media&amp;token=f39c7f3d-8c2d-47ac-ba89-9f8f5b291c1f" alt=""><figcaption></figcaption></figure></div>

Any changes made here are only applied to pipeline runs where this set of credentials is used:

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FtzA0Zr1BJJjY0JEVNFJc%2Fadd%20creds%20c.png?alt=media&amp;token=6f45224b-466f-4ab2-a161-0898d0b13440" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Choose an authentication method**

When prompted, select an *Authentication method*. For example:

<div data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FTNpOnpeWaGDOSAZk58bP%2Fadd%20creds%20b.png?alt=media&amp;token=455270a8-4701-4182-b836-90c8993f5104" alt=""><figcaption></figcaption></figure></div>

One or more authentication methods will be shown - choose whichever one you have credentials for, then click `next`.
{% endstep %}

{% step %}
**Follow the authentication flow**

Subsequent screens and options will vary, depending on the selected authentication method - but generally you will step through at least one page to enter authentication details. For example:

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2F5XS7zHnlQyW0MEkYC9Dz%2Fadd%20creds%20e.png?alt=media&amp;token=e8285165-c419-4d16-bbbb-e1339068710f" alt=""><figcaption></figcaption></figure></div>
{% endstep %}
{% endstepper %}

</details>

<details>

<summary>Updating credentials</summary>

If you need to update existing credentials for a system (for example, to change an expired API key), follow the steps below.

{% stepper %}
{% step %}
**Access options for the credential set**&#x20;

Click the three-dot menu for the required credential set. For example:

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FfWIqwoQQ6MGMGhWCB8vz%2Fupdate%20creds%201.png?alt=media&amp;token=0dc49f1a-93a6-44da-9eec-815f0937d2e2" alt="" width="563"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Edit existing credentials**&#x20;

Select the `edit credentials` option. For example:

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FKWvAH7B3OZedQ270ZPij%2Fupdate%20creds%202a.png?alt=media&amp;token=03f9b583-521d-42a0-b0bf-ff241ec29566" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Make required changes**

Update existing credentials as needed and save changes. For example:

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FRPModEHOQMm6vQXeit2l%2Fupdate%20creds%203a.png?alt=media&amp;token=3c6ee3f0-1867-4b49-9f15-dd84f7dd4440" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
Having saved credentials, changes take effect immediately - next time a pipeline runs using this set of credentials, the latest details are used.
{% endhint %}
{% endstep %}
{% endstepper %}

</details>

<details>

<summary>Deleting credentials</summary>

If credentials are no longer used, you can delete them. To do this, follow the steps below.

{% stepper %}
{% step %}
**Access options for the credential set**&#x20;

Click the three-dot menu for the required credential set. For example:

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2FfWIqwoQQ6MGMGhWCB8vz%2Fupdate%20creds%201.png?alt=media&amp;token=0dc49f1a-93a6-44da-9eec-815f0937d2e2" alt="" width="563"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Delete credentials**&#x20;

Select the `delete credentials` option. For example:

<div align="left" data-with-frame="true"><figure><img src="https://2172380191-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8IqdqwZowcxtFpZfLa6k%2Fuploads%2F71b2g4nwyTbQAmKwUpR3%2Fdelete%20creds%201.png?alt=media&amp;token=55768e8d-3d7e-41b8-bd05-f2771eed87a4" alt=""><figcaption></figcaption></figure></div>
{% endstep %}
{% endstepper %}

</details>
