Skip to content

Conversation

yangkyeongmo
Copy link
Owner

Add JWT token authentication to support modern Airflow deployments.

This PR introduces JWT token authentication as an alternative to basic authentication. When both are provided, JWT tokens take precedence, ensuring backward compatibility while enabling connection to Airflow instances configured for token-based access.


Slack Thread

Open in Cursor Open in Web

Copy link

cursor bot commented Oct 5, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Co-authored-by: nathan.yang <[email protected]>
@sorenarchibald
Copy link

@cursor how about adding an example of how to generate an JWT to the README.

ENDPOINT_URL="http://localhost:8080" # Replace with your Airflow endpoint
    curl -X 'POST' \
    "${ENDPOINT_URL}/auth/token" \
    -H 'Content-Type: application/json' \
    -d '{ "username": "<your-username>", "password": "<your-password>" }'

@yangkyeongmo
Copy link
Owner Author

@cursoragent lint and format check error

Run ruff format --check .
  ruff format --check .
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.12.11/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.11/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.11/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.11/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.11/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.11/x64/lib
Would reformat: test/test_airflow_client.py
1 file would be reformatted, 29 files already formatted

Copy link

cursor bot commented Oct 8, 2025

I updated the project's dependency lock file and refactored test code for improved readability. These changes ensure the project uses the latest version of a core component and adheres to better code style.

  • I updated the mcp-server-apache-airflow package version from 0.2.8 to 0.2.9 in uv.lock. This reflects an update to the local editable package.
  • I reformatted the patch.dict calls and modules_to_clear lists within test/test_airflow_client.py. This was a cosmetic change to improve code readability by breaking long lines into multi-line structures.

Open in Cursor Open in Web

Learn more about Cursor Agents

- Apply ruff formatting to test/test_airflow_client.py
- Update uv.lock for new PyJWT dependency
@yangkyeongmo yangkyeongmo marked this pull request as ready for review October 8, 2025 06:10
@yangkyeongmo yangkyeongmo changed the title Add jwt token authentication feat: Add jwt token authentication Oct 8, 2025
@yangkyeongmo yangkyeongmo merged commit b54baea into main Oct 17, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants