Valid Private Key Buffer rejected with error "Please provide a valid unencrypted rsa private key in DER format as bytes object" #428
Labels
question
Issue is a usage/other question rather than a bug
status-triage_done
Initial triage done, will be further handled by the driver team
When initializing a snowflake SQLalchemy URL no combination of patterns to pass the key pair auth private key buffer to the URL method works.
I've validated that the private key buffer is valid via the connector pattern below.
Part of the system utilizes the snowflake sql alchemy library so initializing with the same private key buffer and using the method described here
The connection library complains that there's no password, upon looking at the
snowflake/connector/connection.py
it appears that private_key is in fact a parameter that's supported in contradiction of the documentation. Not only that is the private_key parameter supported it's required in order for the library to process the private key buffer rather than attempt to use basic auth.When using this pattern the following exception is raised.
Leading me to believe there's some issue with the logic in the SQL alchemy auth connector preparation method.
I know the snowflake/sqlalchemy uses snowflake-connector under the hood so upon examining the snowflake/connector/auth/keypair.py when this line is observed with the same exact PKB input via
snowflake.connector.connect
andURL
methods respectively different values are observed.This leads me to believe that the library is augmenting the passed PKB
Please answer these questions before submitting your issue. Thanks!
What version of Python are you using?
python 3.10
What operating system and processor architecture are you using?
macOS-13.3.1-x86_64-i386-64bit
What are the component versions in the environment (
pip freeze
)?Replace with the output of
python -m pip freeze
What did you do?
What did you expect to see?
Functional connection URL.
Can you set logging to DEBUG and collect the logs?
The text was updated successfully, but these errors were encountered: