Skip to content

Conversation

@jhbigler
Copy link
Contributor

This PR adds the ability to use a file on disk to provide a JWT for the TrinoHook, as opposed to placing the JWT directly into the connection definition. In our use case, we'd like to use a kubernetes projected volume to make JWT's available to airflow. This does not automatically update the connection definition when the token is rotated, however, and it would be easier to simply have airflow read the JWT from disk when using the TrinoHook.

A JWT file is used when the jwt__file parameter is given in the extras section.

@boring-cyborg
Copy link

boring-cyborg bot commented Jun 16, 2023

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

Copy link
Member

@uranusjr uranusjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation should also explain what happens if jwt__file and jwt__token are both provided. Also please take at look at the static check failures and correct code formatting.

@jhbigler
Copy link
Contributor Author

I have implemented the suggested changes, open to additional feedback (@phanikumv @uranusjr @utkarsharma2)

@potiuk potiuk merged commit 371833e into apache:main Jun 24, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented Jun 24, 2023

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

ferruzzi pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Jun 27, 2023

---------

Co-authored-by: Joshua H. Bigler <joshua.bigler@pnnl.gov>
Co-authored-by: Joshua Bigler <joshuab@joshuabcentos8.pnl.gov>
Co-authored-by: Phani Kumar <94376113+phanikumv@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants