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

Issue with asn1crypto==1.0.1 while connecting to Snowflake #157

Closed
AzisK opened this issue Oct 10, 2019 · 3 comments
Closed

Issue with asn1crypto==1.0.1 while connecting to Snowflake #157

AzisK opened this issue Oct 10, 2019 · 3 comments

Comments

@AzisK
Copy link

AzisK commented Oct 10, 2019

I get an error with asn1crypto==1.0.1 while connecting to Snowflake. The error stacktrace is huge and I may not share everything due to confidentiality but I am sharing its first / last and most important parts. I am getting this.

ERROR:snowflake.connector.network: 'APIException' object has no attribute 'message'
INFO - Traceback (most recent call last):
INFO -   File "/disk2/seo/seo-etls/.venv/lib/python3.6/site-packages/snowflake/connector/ocsp_snowflake.py", line 1065, in validate_by_direct_connection
INFO -     self.process_ocsp_response(issuer, cert_id, ocsp_response)
INFO -   File "/disk2/seo/seo-etls/.venv/lib/python3.6/site-packages/snowflake/connector/ocsp_asn1crypto.py", line 276, in process_ocsp_response
INFO -     tbs_response_data)
INFO -   File "/disk2/seo/seo-etls/.venv/lib/python3.6/site-packages/snowflake/connector/ocsp_asn1crypto.py", line 303, in verify_signature
INFO -     pubkey = cert.public_key.unwrap().dump()
INFO -   File "/disk2/seo/seo-etls/.venv/lib/python3.6/site-packages/asn1crypto/keys.py", line 1064, in unwrap
INFO -     'asn1crypto.keys.PublicKeyInfo().unwrap() has been removed, '
INFO - asn1crypto._errors.APIException: asn1crypto.keys.PublicKeyInfo().unwrap() has been removed, please use oscrypto.asymmetric.PublicKey().unwrap() instead
snowflake.connector.errors.OperationalError: 250003: Failed to execute request: 'APIException' object has no attribute 'message'

However, asn1crypto==0.24.0 works well!

@wbond
Copy link
Owner

wbond commented Oct 10, 2019

asn1crypto 1.0.0 was a breaking change. My guess is that the snowflake spec for asn1crypto specified >= 0.24.0, whereas it should probably have been limited to >= 0.24.0 and < 1.0.0.

I think #154 was an issue about this from someone involved with the snowflake project.

@smtakeda
Copy link

smtakeda commented Oct 15, 2019

Sorry about inconvenience. The patch including <1.0.0 was out in Snowflake Python Connector 1.9.1 and 2.0.1. and the fix including <1.1.0 will be out next week.

@wbond
Copy link
Owner

wbond commented Oct 16, 2019

No problem on my end.

Just so you know, this project strives to follow SemVer, so if I introduce any future breaking changes, there will be a 2.0.0. I will be cutting a 1.2.0 soon since I am adding a new feature that provide load order info to allow hot-reloading of the code.

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

3 participants