# Provisioning Federated Credentials

## Setting up Federated Credentials in Google Cloud

The most secure method for connecting data from your Google Cloud Storage to Deep Lake is using Federated Credentials, which are set up using the steps below:

### Step 1: Create Google Cloud Service Account

**1. If you already have a service account, skip to Step 2**

2\. Navigate to `IAM & Admin` -> `Service Accounts` -> `CREATE SERVICE ACCOUNT`

<figure><img src="/files/9bbChclUVHFzMqRwnMPF" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/JFwJuF6DPS97HyGA3az6" alt=""><figcaption></figcaption></figure>

3\. Enter the service account `id`, and optional `name` and `description`. Make sure to copy the email address and and click on `CREATE AND CONTINUE`.

<figure><img src="/files/2wUctfBk1DPVhbfuy9tH" alt=""><figcaption></figcaption></figure>

4\. Click `CONTINUE` without entering any information.

<figure><img src="/files/jdQkqEPjHMQ4o0ngoD5L" alt=""><figcaption></figcaption></figure>

5\. Enter `activeloop-platform@activeloop-saas-iam.iam.gserviceaccount.com` in the `Service account users role` and click `DONE`.

<figure><img src="/files/OR2ThPFRWP12b92BW3Mu" alt=""><figcaption></figcaption></figure>

### Step 2: Grant Access to the bucket using a Service Account Principal

1\. Navigate to `Cloud Storage` and `Buckets`.

<figure><img src="/files/VzmPD6hnTNvKF9YUEXoQ" alt=""><figcaption></figcaption></figure>

2.Select `Edit Access` for the bucket you want to connect to Activeloop.

<figure><img src="/files/apmlQ2BzaZIX3SXwbALa" alt=""><figcaption></figcaption></figure>

3.Select `Add Principal`.

<figure><img src="/files/7yHHJvPh68lKUZs7pzy5" alt=""><figcaption></figcaption></figure>

4.Enter the `Service Account Email`, select the role as `Storage Object Admin`, and click Save. If the bucket is encrypted with customer managed KMS key, then `Cloud KMS CryptoKey Encrypter/Decrypter` should be added in the `Role` field as well.

<figure><img src="/files/p2wnnbH3uGmGBNIM7yLS" alt=""><figcaption></figcaption></figure>

### Step 3: Enter the Service Account Email (Step 2) into the Activeloop App

See the first video in the link below:

{% content-ref url="/pages/7GciXtjtKBOWPHmtkY7Z" %}
[Setting up Deep Lake in Your Cloud](/setup/storage-and-creds/managed-credentials.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-v3.activeloop.ai/setup/storage-and-creds/managed-credentials/google-cloud/provisioning-federated-credentials.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
