Skip to content
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

Fix an issue that crashes Airflow Webserver when passed invalid private key path to Snowflake #32016

Merged
merged 10 commits into from
Jul 8, 2023

Conversation

bjankie1
Copy link
Contributor

Passing path on an excessively large file or path to a system device crashes Webserver. This fix validates the path against such situations.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborg boring-cyborg bot added area:providers provider:snowflake Issues related to Snowflake provider labels Jun 20, 2023
@potiuk
Copy link
Member

potiuk commented Jun 20, 2023

Needs conflict resolving.

)
if private_key_file_path.stat().st_size > 4096:
raise ValueError(
"File size of private_key_file is too big."
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"File size of private_key_file is too big."
"The private_key_file size is too big. Please keep it less than 4 KB"

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's also add a note in the docs about the size limitation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What documentation do you suggest putting it to? The limitations is applied to the connection settings. I coulad add a note to the operator docs.

@potiuk
Copy link
Member

potiuk commented Jun 23, 2023

conflicts :(

uranusjr and others added 2 commits July 6, 2023 14:33
Co-authored-by: xrmr <17521278+xrmr@users.noreply.github.com>
@potiuk
Copy link
Member

potiuk commented Jul 6, 2023

Needs conflict resolving @bjankie1

@potiuk potiuk merged commit c6f151f into apache:main Jul 8, 2023
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers provider:snowflake Issues related to Snowflake provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants