-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Trino Hook: Add ability to read JWT from file #31950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
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)
|
uranusjr
left a comment
There was a problem hiding this 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.
Co-authored-by: Phani Kumar <94376113+phanikumv@users.noreply.github.com>
|
I have implemented the suggested changes, open to additional feedback (@phanikumv @uranusjr @utkarsharma2) |
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
--------- 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>
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__fileparameter is given in the extras section.