{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Step 2: Create a Key Pair for Snowflake Authentication","description":"Generate an RSA key pair and assign it to a Snowflake user for Composable Audience Studio authentication.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"step-2-create-a-key-pair-for-snowflake-authentication","__idx":0},"children":["Step 2: Create a Key Pair for Snowflake Authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Composable Audience Studio connects to Snowflake using RSA key pair authentication. You generate a private/public key pair, assign the public key to a Snowflake user, and provide the private key to Treasure Data."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"generate-the-key-pair","__idx":1},"children":["Generate the Key Pair"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Run the following commands to create an RSA key pair in PKCS#8 format:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Generate a 2048-bit private key in PKCS#8 format (no passphrase)\nopenssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out rsa_key.p8 -nocrypt\n\n# Derive the public key from the private key\nopenssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This creates two files:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["rsa_key.p8"]}," -- Private key (keep this secure; you will provide it to Treasure Data)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["rsa_key.pub"]}," -- Public key (you will assign this to your Snowflake user)"]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Important"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The private key must be in PKCS#8 format. Other formats will cause connection failures."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"assign-the-public-key-to-a-snowflake-user","__idx":2},"children":["Assign the Public Key to a Snowflake User"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Open the public key file and copy its contents, excluding the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-----BEGIN PUBLIC KEY-----"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-----END PUBLIC KEY-----"]}," headers:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"cat rsa_key.pub\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In Snowflake, assign the public key to the user that Treasure Data will use:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"ALTER USER <username> SET RSA_PUBLIC_KEY='MIIBIjANBgkqhk...your_public_key_content...';\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Verify the key assignment:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"DESC USER <username>;\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Look for the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RSA_PUBLIC_KEY_FP"]}," property to confirm the key fingerprint is set."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Reference"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more details, see the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.snowflake.com/en/user-guide/key-pair-auth"},"children":["Snowflake Key Pair Authentication Documentation"]},"."]}]}]},"headings":[{"value":"Step 2: Create a Key Pair for Snowflake Authentication","id":"step-2-create-a-key-pair-for-snowflake-authentication","depth":1},{"value":"Generate the Key Pair","id":"generate-the-key-pair","depth":2},{"value":"Assign the Public Key to a Snowflake User","id":"assign-the-public-key-to-a-snowflake-user","depth":2}],"frontmatter":{"seo":{"title":"Step 2: Create a Key Pair for Snowflake Authentication","description":"Generate an RSA key pair and assign it to a Snowflake user for Composable Audience Studio authentication."}},"lastModified":"2026-04-13T00:18:56.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/products/customer-data-platform/composable-cdp/snowflake/prepare-for-sf-authentication","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}