Skip to content

Commit

Permalink
ADD Python script to get Airflow UI web token using Cognito credentials
Browse files Browse the repository at this point in the history
Related issues: #102
  • Loading branch information
ramesh-maddegoda committed Oct 2, 2024
1 parent 22739e4 commit ae7417a
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,41 @@ configured as `mwaa_dag_s3_bucket_name` in the `terraform.tfvars` file.


15. Use the PDS Data Upload Manager (DUM) tool to upload files to pds_nucleus_staging_bucket.


## Steps to access Nucleus Airflow UI with Cognito Credentials

Only some users have direct access to AWS and those users can access Airflow UI as explained in the step 9 to 12
in the above section. However, there is another way to access Airflow UI using a Cognito account as follows.

1. Make sure you have a Cognito user created in the Cognito user pool with required role (Cognito group). The PDS engineering node team can
help with this.

2. Download the `get-airflow-ui-webtoken.py` python script from https://github.com/NASA-PDS/nucleus/blob/airflow-ui-web-token/utils/get-airflow-ui-webtoken.py

3. Create a python virtual environment as follows.

```shell
python3 -m venv venv
```

4. Activate python virtual environment.

```shell
source venv/bin/activate
```

5. Install boto3

```shell
pip install boto3
```

6. Execute the `get-airflow-ui-webtoken.py` python script and provide the Cognito username and password when prompted.

```shell
python get-airflow-ui-webtoken.py
```

7. Copy the generated Nucleus Airflow UI web token and paste that in a webbrowser address bar to access the Airflow UI.

0 comments on commit ae7417a

Please sign in to comment.