You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/connections/reverse-etl/reverse-etl-source-setup-guides/snowflake-setup.md
+3-5Lines changed: 3 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ At a high level, when you set up Snowflake for Reverse ETL, the configured user/
13
13
> Segment now supports key-pair authentication for Snowflake Reverse ETL sources.
14
14
15
15
## Set up guide
16
-
Follow the instructions below to set up the Segment Snowflake connector. Segment recommends you use the `ACCOUNTADMIN` role to execute all the commands below, and that you create a user that authenticates with a key pair.
16
+
Follow the instructions below to set up the Segment Snowflake connector. Segment recommends you use the `ACCOUNTADMIN` role to execute all the commands below, and that you create a user that authenticates with an encrypted key pair.
17
17
18
18
1. Log in to your Snowflake account.
19
19
2. Navigate to *Worksheets*.
@@ -50,16 +50,14 @@ Follow the instructions below to set up the Segment Snowflake connector. Segment
50
50
GRANT USAGE ON DATABASE segment_reverse_etl TO ROLE segment_reverse_etl;
51
51
GRANT CREATE SCHEMA ON DATABASE segment_reverse_etl TO ROLE segment_reverse_etl;
52
52
```
53
-
6. Enter and run one of the following code snippets below to create the user Segment will use to run queries. Segment recommends creating a user that authenticates using a key pair.
54
-
53
+
6. Enter and run one of the following code snippets below to create the user Segment uses to run queries. For added security, Segment recommends creating a user that authenticates using a key pair.
55
54
56
55
To create a user that authenticates with a key pair, [create a key pair](https://docs.snowflake.com/en/user-guide/key-pair-auth#configuring-key-pair-authentication){:target="_blank”} and then execute the following SQL commands:
57
56
```sql
58
57
-- create user (key-pair authentication)
59
58
CREATEUSERsegment_reverse_etl_user
60
59
DEFAULT_ROLE = segment_reverse_etl
61
-
RSA_PUBLIC_KEY ='MIIBIjANBgkqh...'
62
-
RSA_PUBLIC_KEY_FP ='enter the passphrase you created';
60
+
RSA_PUBLIC_KEY ='enter your public key';
63
61
64
62
-- role access
65
63
GRANT ROLE segment_reverse_etl TO USER segment_reverse_etl_user;
Copy file name to clipboardExpand all lines: src/connections/storage/catalog/snowflake/index.md
+6-7Lines changed: 6 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -86,17 +86,17 @@ GRANT CREATE SCHEMA ON DATABASE "SEGMENT_EVENTS" TO ROLE "SEGMENT";
86
86
87
87
### Step 4: Create a user for Segment
88
88
89
-
Create the user that Segment uses to connect to your warehouse. You can create a user that authenticates with a key pair, or you can create a user that authenticates using a password. Segment recommends creating a user that will authenticate with an encrypted key pair.
89
+
Create the user that Segment uses to connect to your warehouse. You can create a user that authenticates with a key pair, or you can create a user that authenticates using a password. For enhanced security, Segment recommends creating a user that will authenticate with an encrypted key pair.
90
90
91
91
#### Create a user that authenticates with a key pair
92
92
If you are creating a user that will use a key pair to authenticate, you first must create a public key and then can create a new user.
93
93
94
-
##### Generate a key
94
+
##### Generate keys
95
95
96
96
To start, open a terminal window and generate a private key by running the following command, replacing `key_name` with the name you'd like to give the key. The command generates a private key in PEM format, and will prompt you to enter a passphrase. Write down or remember this passphrase, as you will need it when creating your Segment user and configuring your destination in the Segment app.
97
97
98
98
> success ""
99
-
> If you want to generate an unencrypted key, append `-nocrypt` to the end of the command.
99
+
> If you want to generate an unencrypted private key, append `-nocrypt` to the end of the command.
@@ -114,13 +114,12 @@ After you've created the public key, save the file to a local directory.
114
114
115
115
##### Generate a new user and assign the key to them
116
116
117
-
Now, create a new user by executing the following SQL command, replacing the public key value with the key you previously generated. If you generated an unencrypted key, omit the `RSA_PUBLIC_KEY_FP` value, as it is only required for users with encrypted keys.
117
+
Now, create a new user by executing the following SQL command, replacing the public key value with the key you previously generated.
118
118
119
119
```sql
120
120
CREATEUSERSEGMENT_USER
121
121
DEFAULT_ROLE = SEGMENT
122
-
RSA_PUBLIC_KEY ='MIIBIjANBgkqh...'
123
-
RSA_PUBLIC_KEY_FP ='enter the passphrase you created';
122
+
RSA_PUBLIC_KEY ='enter your public key';
124
123
GRANT ROLE "SEGMENT" TO USER "SEGMENT_USER";
125
124
```
126
125
@@ -244,7 +243,7 @@ At this time, the Segment Snowflake destination is not compatible with Snowflake
244
243
245
244
### Key pair authentication
246
245
247
-
Segment recommends that you authenticate with your Snowflake warehouse using key-pair authentication. Key-pair authentication uses PKCS#8 private keys, which are typically exchanged in the PEM base64-encoded format.
246
+
Segment recommends that you authenticate with your Snowflake warehouse using an encrypted key pair. Key-pair authentication uses PKCS#8 private keys, which are typically exchanged in the PEM base64-encoded format.
248
247
249
248
Although you can create up to two keys in Snowflake, Segment only supports authenticating with one key at a time. To change the key that is in Segment, return to your Snowflake destination's settings and upload a new key in the **Private Key** field.
0 commit comments