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

Dependency on Snowflake Connector seems to be causing issue with RSA Keys #166

Closed
GJMcClintock opened this issue Nov 27, 2024 · 4 comments
Closed

Comments

@GJMcClintock
Copy link

GJMcClintock commented Nov 27, 2024

I just upgraded to the latest release and started getting an error:

  File "/Users/garrett/Documents/GitHub/data-platform/.venv/lib/python3.12/site-packages/snowflake/connector/ocsp_snowflake.py", line 1125, in validate_by_direct_connection
    self.process_ocsp_response(issuer, cert_id, ocsp_response)
  File "/Users/garrett/Documents/GitHub/data-platform/.venv/lib/python3.12/site-packages/snowflake/connector/ocsp_asn1crypto.py", line 310, in process_ocsp_response
    self.verify_signature(
  File "/Users/garrett/Documents/GitHub/data-platform/.venv/lib/python3.12/site-packages/snowflake/connector/ocsp_asn1crypto.py", line 372, in verify_signature
    public_key.verify(
TypeError: ECPublicKey.verify() takes 3 positional arguments but 4 were given

Even after downgraded to 0.10.13 I still got the error so I figured it was the dependency on the Snowflake connector.

The RSA verification function was changed by Snowflake 2 days ago right after the last release:

new version: https://github.com/snowflakedb/snowflake-connector-python/blob/557774d3e6de714ce4c2f642c7d8aa3ad2577d0d/src/snowflake/connector/ocsp_asn1crypto.py#L357

old version: https://github.com/snowflakedb/snowflake-connector-python/blob/5e61c94691c72e6e7e7a7c83849949a188b72172/src/snowflake/connector/ocsp_asn1crypto.py#L353

This is a breaking change afaict.

@teej
Copy link
Collaborator

teej commented Nov 27, 2024

I'll fix this now by pinning

@teej
Copy link
Collaborator

teej commented Nov 27, 2024

I can repro but I am a bit confused about the root cause. AFAICT snowflake-python-connector last release was Oct 24 (github, pypi). The only release they made this week was snowflake-cli (github, pypi). I'm still investigating the best way to mitigate

@teej
Copy link
Collaborator

teej commented Nov 27, 2024

@GJMcClintock I believe this to be the root cause, let me know if the most recent version v0.10.21 doesn't work for you.

@GJMcClintock
Copy link
Author

Yup - that was it. 0.10.21 fixed it.

Happy Thanksgiving Eve!

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

No branches or pull requests

2 participants