Repository navigation
New features:
- Added support for the
SNOWFLAKE_MIN_TLS_VERSIONandSNOWFLAKE_TLS_CIPHERSenvironment variables. They apply to the C client, the C++ HTTP client and the AWS SDK (S3 and STS) connections. Invalid values failsnowflake_connectwithSF_STATUS_ERROR_BAD_CONNECTION_PARAMS.SNOWFLAKE_MIN_TLS_VERSIONsets the minimum TLS version. Accepted values are1.2,1.3,TLSv1.2andTLSv1.3(case-insensitive). It cannot enable a protocol older than TLS 1.2.SNOWFLAKE_TLS_CIPHERSis a colon-separated allowlist. Names starting withTLS_are TLS 1.3 suites (TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256). Other names are TLS 1.2 suites using OpenSSL names (ECDHE-{ECDSA,RSA}-AES{128,256}-GCM-SHA{256,384},ECDHE-{ECDSA,RSA}-CHACHA20-POLY1305). Specifying suites for only one TLS generation leaves the other on its defaults. A list that leaves an enabled generation with no usable suite is rejected.
- Added a versioned token cache key (
SnowflakeTokenCache.v2.<TokenType>.<sha256>) for MFA, ID token, OAuth and DPoP tokens. Tokens are keyed on the host and port, the username, and, for OAuth and DPoP, the IdP URL and role. This fixes cache collisions between accounts or roles that shared a key.- Tokens cached by earlier versions are not reused, so users re-authenticate once after upgrading.
- The Linux file cache is now
credential_cache_v2.json. Its name can be overridden withSF_TEMPORARY_CREDENTIAL_CACHE_FILE_NAME(a plain file name, no path separators). - Added the
port_explicitfield toSF_CONNECT, so connections to different ports no longer share cached tokens.
Bug fixes:
- Fixed issues in processes that fork after initializing curl (for example a PHP-FPM master). The CRL cache cleanup thread now starts on first CRL use. Forked children no longer try to join a thread they never owned or inherit a locked cache mutex.
- Fixed a use-after-free and data race in the CRL verification callbacks, which used the shared store-context registry without holding the lock.
- Fixed a data race caused by the CRL cache cleanup thread calling
getenv()while other threads modify the environment. - CRL cache files are now written to a temporary file and atomically renamed, so processes sharing the cache directory never read a partially written CRL. Cleanup removes
sf_crl_tmp_*files older than one hour that were left behind by writers that died. - AWS Workload Identity Federation now resolves the STS endpoint with the AWS SDK partition rules instead of only checking for a
cn-region prefix, so partitions such as ISO and the European Sovereign Cloud get the correct host. An explicitSF_CON_WIF_HOSTstill takes precedence. The signedGetCallerIdentityURL now keeps the/path for endpoints that have none. - Hardened the Linux file credential cache. The cache file is opened with
O_NOFOLLOWand validated (regular file, owned by the effective user, mode0600) before any write, and symlinks or files with looser permissions are refused. Created directories are0700. A set but unusableSF_TEMPORARY_CREDENTIAL_CACHE_DIRnow returns an error instead of falling back toXDG_CACHE_HOMEorHOME.
Changes:
- Upgraded Arrow to 22.0.0.
- Upgraded openssl to 3.5.9.
- Upgraded curl to 8.23.0