> ## Documentation Index
> Fetch the complete documentation index at: https://infisical.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch secrets in Ab Initio

> How to fetch Infisical secrets in Ab Initio.

## Prerequisites

* Set up and add envars to [Infisical](https://app.infisical.com).
* Install the [Infisical CLI](https://infisical.com/docs/cli/overview.md) to your server.

## Setup

**1. Authorize Infisical for AB Initio**

Create a [machine identity](https://infisical.com/docs/documentation/platform/identities/machine-identities.md#machine-identities) in Infisical and give it the appropriate read permissions for the desired project and secret paths.

**2. Add Infisical CLI to your workflow**

Update your Ab Initio workflows to use Infisical CLI to inject Infisical secrets as environment variables.

```bash theme={"dark"}
# Login using the machine identity. Modify this accordingly based on the authentication method used.
export INFISICAL_TOKEN=$(infisical login --method=universal-auth --client-id=$INFISICAL_CLIENT_ID --client-secret=$INFISICAL_CLIENT_SECRET --silent --plain)

# Fetch secrets from Infisical
infisical secrets-manager secrets export --projectId="<>" --env="prod" > infisical.env

# Inject secrets as environment variables
source infisical.env
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.