snowflakedb / gosnowflake

Go Snowflake Driver
Apache License 2.0
285 stars 116 forks source link

SNOW-1432112 verify / sanitize account name before creating JWT #1146

Closed sfc-gh-dszmolka closed 1 month ago

sfc-gh-dszmolka commented 1 month ago

Attempt to fix the issue caused by certain applications putting

values in the Account field of the configuration, which could result in unsuccessful keypair authentication, as this value was relayed into the JWT unchanged and led to an invalid JWT

The change has been also manually tested by actually generating JWT and actually logging into live Snowflake account, whose names conform the pattern seen in the newly added part in auth_test.go

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 75.44%. Comparing base (192b00b) to head (83a433c). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1146 +/- ## ========================================== + Coverage 75.43% 75.44% +0.01% ========================================== Files 53 53 Lines 11285 11291 +6 ========================================== + Hits 8513 8519 +6 Misses 2772 2772 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.