Verifying the network connection to Snowflake with SnowCD ¶Īfter configuring your driver, you can evaluate and troubleshoot your network connectivity to Snowflake using SnowCD. Private_key_file, private_key_file_pwd, or privateKey in the connection properties. If you specify the private key and password in the connection string, then do not specify the parameters With the appropriate path separator for the platform. Use forward slashes as file path separators on all operating systems, including Windows. Import .PrivateKeyInfo import .Bounc圜astleProvider import import .JcaPEMKe圜onverter import .JceOpenSSLPKCS8DecryptorProviderBuilder import import import 8EncryptedPrivateKeyInfo import import java.io.FileReader import java.io.IOException import import import import import import import import public class TestJdbc Include the Bouncy Castle JAR files in the classpath. Set this to the name of role that you want to use.Ĭompile and run the sample code. Set this to the name of warehouse that you want to use. Set this to the name of schema that you want to use. Set this to the name of the database that you want to use. If you generated an encrypted key, implement the getPrivateKeyPassphrase() method to return the passphrase for decrypting that key. Set this to the path and name of the private key file that you generated earlier. Where versions specifies the versions of the JDK that the JAR file supports.Ĭopy the sample code below, and replace the following placeholder values: The PKIX / CMS / EAC / PKCS / OCSP / TSP / OPENSSL JAR file ( bcpkix-jdk versions. The provider JAR file ( bcprov-jdk versions. In order to compile and run thisĮxample, you must include the following JAR files in your classpath: This example uses the Bouncy Castle Crypto APIs. This section provides an example of setting the privateKey property to a private key in a file. privateKey property in connection properties ¶ These options are described in more detail in the next three sections. Specify the private key file name and password for that file as part of the connection string. Specify the private key file name and password for that file as separate properties in the connection properties. Specify the private key via the privateKey property in the connection properties. Next, choose one of the following three options to configure either the JDBC connection properties or the JDBC connection string. To start, complete the initial configuration for key pair authentication as shown in Key-pair authentication and key-pair rotation. This authentication method requires a 2048-bit (minimum) RSA key pair. The Snowflake JDBC driver supports key pair authentication and key rotation. Using key pair authentication and key rotation ¶ Snowflake supports caching MFA tokens, including combining MFA token caching with SSO.įor more information, see Using MFA token caching to minimize the number of prompts during authentication - optional. See Using SSO with client applications that connect to Snowflake for details. Your client application to use SSO for authentication. If you have configured Snowflake to use single sign-on (SSO), you can configure Using single sign-on (SSO) for authentication ¶ Specify additional segments after the account locator. If the account is in a different region or if theĪccount uses a different cloud provider, you need to Note that this example uses an account in the AWS US West (Oregon) region.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |