# Airflow (Composer)

{% hint style="info" %}
**Required role to configure:** [Admin](/external-docs/fundamentals/settings/user-roles.md) or higher.

Users with lower roles can view this feature but cannot change its configuration.
{% endhint %}

1. [Access airflow API](https://cloud.google.com/composer/docs/access-airflow-api) and enable composer API, if not enabled (please select the desired Cloud Composer version - 1 or 2).
2. Create a service account for Seemore
   1. In the GCP console of the desired project, [create a new service account](https://console.cloud.google.com/projectselector2/iam-admin/serviceaccounts/create)
   2. Choose a meaningful name for the service account such as “Seemore service account.”
   3. Click on "Create and continue"

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

3. In step 2 - add Role: "Composer User” and click on “CONTINUE”

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

4. In step 3 - click on “Done”, no user grants are required.
5. In the service accounts page:

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

6. Save the Oauth 2 client ID (you can use the copy button) of the new service account, this will be used in Airflow.
7. Click on the email of the new service account, this should lead you to the following page:

<figure><img src="/files/0ygO6Xg4JWt3Tnwlvh5C" alt=""><figcaption></figcaption></figure>

8. Select the 'KEYS' tab

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

9. Click on the 'ADD KEY' button
10. In the dropdown menu, choose “Create new Key”
11. In the modal that opened, choose “JSON” and click on “Create”

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

12. A JSON file containing the service account credentials should be immediately downloaded. If you have access to the system, please upload the file to Seemore. Otherwise save it for an onboarding session.

## In Airflow UI

1. [Ensure you have an admin role](https://cloud.google.com/composer/docs/airflow-rbac) in order to view the security settings.
2. Create a corresponding user with airflow roles for Seemore service account
3. In the Airflow UI, under the Security menu, click on “List Users”

<figure><img src="/files/0VcrKAo3K3CuBpgBBC8w" alt=""><figcaption></figcaption></figure>

4. 1. Add a new user by clicking on the “+” button and enter the “Add user” page.

      <figure><img src="/files/QcWxd1uJglKtmMHguXxB" alt=""><figcaption></figcaption></figure>
5. Fill in the following fields:

   1. Enter a meaningful First name and Last name.
   2. For the user name use the following format: “accounts.google.com:NUMERIC\_USER\_ID”. The NUMERIC\_USER\_ID is the Oauth 2 client ID id that you saved earlier.
   3. Check “Is Active”
   4. Specify a unique identifier as the email. You can use any unique string.
   5. Add the “[Viewer](https://airflow.apache.org/docs/apache-airflow/stable/security/access-control.html#viewer)” Role.
   6. Only if you see the password field, add the Password: “Seemore” (this is not necessary since we will be authenticating via the service account, but this field is still mandatory so we must fill it.)
   7. Click on the “Save” button, and we are done.

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

   Send the service account & Airflow UI URL (for example: <https://96f4e666f43643f588ec8d4144b82079-dot-us-central1.composer.googleusercontent.com>) or upload them to Seemore.\\

References:

<https://cloud.google.com/composer/docs/composer-2/access-airflow-api#airflow-ui>


---

# 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.seemoredata.io/external-docs/fundamentals/getting-set-up/setting-integrations/airflow/airflow-composer.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.
