snowflakedb / snowpark-python

Snowflake Snowpark Python API
Apache License 2.0
255 stars 106 forks source link

SNOW-1141158: Development Improvement: Enabling local testing using key-pair authentication #1272

Closed zaramzamzam closed 1 month ago

zaramzamzam commented 6 months ago

What is the current behavior?

When developing snowpark-python it is currently only possible to run local tests using username and password.

What is the desired behavior?

It would be great if both username and password authentication as well as key-pair authentication would work when running tests locally.

How would this improve snowflake-snowpark-python?

This would enable developers using key-pair authentication to easily run local tests.

zaramzamzam commented 6 months ago

I added some code to the conftest.py file locally when running tests which I can provide in a PR to enable this.

zaramzamzam commented 4 months ago

As an example I added #1525

sfc-gh-dszmolka commented 3 months ago

hi and thank you for your contribution ! the team will review and advise

sfc-gh-aling commented 2 months ago

hey @zaramzamzam , sorry for the late response and thanks for your PR.

the connector has the native support for private_key_file and private_key_file_pwd as connection parameters:https://github.com/snowflakedb/snowflake-connector-python/blob/main/src/snowflake/connector/connection.py#L185-L186. you should be able to just use them and there is no need to update the conftest file

sfc-gh-aling commented 1 month ago

I'm closing the issue, please free feel to reopen if you want anything else