Skip to content

Commit aaee64e

Browse files
committed
Revert "Revert "Merge pull request ClickHouse#6458 from ClickHouse/dbi-609""
This reverts commit caf52d0.
1 parent 3ee1191 commit aaee64e

5 files changed

Lines changed: 66 additions & 35 deletions

File tree

docs/integrations/data-ingestion/clickpipes/mysql/source/aurora.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,16 @@ Connect to your Aurora MySQL instance as an admin user and execute the following
129129
GRANT REPLICATION SLAVE ON *.* TO 'clickpipes_user'@'%';
130130
```
131131

132+
### Using IAM authentication (optional) {#iam-authentication}
133+
134+
Instead of a password, you can authenticate the ClickPipes user via AWS IAM role-based access. Create the user as follows, then grant it the same schema and replication privileges shown above:
135+
136+
```sql
137+
CREATE USER 'clickpipes_iam_user' IDENTIFIED WITH AWSAuthenticationPlugin AS 'RDS';
138+
```
139+
140+
See [AWS IAM DB authentication (RDS/Aurora)](/integrations/clickpipes/postgres/auth) for the full steps to set up the IAM role and policy required for ClickPipes to authenticate this way.
141+
132142
## Configure network access {#configure-network-access}
133143

134144
### IP-based access control {#ip-based-access-control}

docs/integrations/data-ingestion/clickpipes/mysql/source/rds.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,16 @@ Connect to your RDS MySQL instance as an admin user and execute the following co
133133
GRANT REPLICATION SLAVE ON *.* TO 'clickpipes_user'@'%';
134134
```
135135

136+
### Using IAM authentication (optional) {#iam-authentication}
137+
138+
Instead of a password, you can authenticate the ClickPipes user via AWS IAM role-based access. Create the user as follows, then grant it the same schema and replication privileges shown above:
139+
140+
```sql
141+
CREATE USER 'clickpipes_iam_user' IDENTIFIED WITH AWSAuthenticationPlugin AS 'RDS';
142+
```
143+
144+
See [AWS IAM DB authentication (RDS/Aurora)](/integrations/clickpipes/postgres/auth) for the full steps to set up the IAM role and policy required for ClickPipes to authenticate this way.
145+
136146
## Configure network access {#configure-network-access}
137147

138148
### IP-based access control {#ip-based-access-control}

docs/integrations/data-ingestion/clickpipes/postgres/auth.md

Lines changed: 20 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,27 @@ import Image from '@theme/IdealImage';
1515

1616
This article demonstrates how ClickPipes customers can leverage role-based access to authenticate with Amazon Aurora and RDS and access their databases securely.
1717

18-
:::warning
19-
For AWS RDS Postgres and Aurora Postgres you can only run `Initial Load Only` ClickPipes due to the limitations of the AWS IAM DB authentication.
18+
## Setup {#setup}
2019

21-
For MySQL and MariaDB, this limitation doesn't apply, and you can run both `Initial Load Only` and `CDC` ClickPipes.
22-
:::
20+
### Before you start {#before-you-start}
2321

24-
## Setup {#setup}
22+
#### Make sure IAM authentication is enabled {#make-sure-iam-authentication-is-enabled}
23+
24+
1. Login to your AWS Account and navigate to the RDS instance you want to configure.
25+
2. Click on the **Modify** button.
26+
3. Scroll down to the **Database authentication** section.
27+
4. Enable the **Password and IAM database authentication** option.
28+
5. Click on the **Continue** button.
29+
6. Review the changes and click on the **Apply immediately** option.
30+
31+
#### Setting up the database user {#setting-up-the-database-user}
32+
33+
Connect to your RDS/Aurora instance and create a database user with IAM authentication enabled, then follow the rest of the steps in your source setup guide to configure your instance for ClickPipes:
34+
35+
- [AWS Aurora for PostgreSQL source setup guide](./source/aurora#configure-database-user)
36+
- [AWS RDS for PostgreSQL source setup guide](./source/rds#configure-database-user)
37+
- [AWS Aurora for MySQL source setup guide](../mysql/source/aurora#configure-database-user)
38+
- [AWS RDS for MySQL source setup guide](../mysql/source/rds#configure-database-user)
2539

2640
### Obtaining the ClickHouse service IAM role Arn {#obtaining-the-clickhouse-service-iam-role-arn}
2741

@@ -39,43 +53,14 @@ For MySQL and MariaDB, this limitation doesn't apply, and you can run both `Init
3953

4054
Let's call this value `{ClickHouse_IAM_ARN}`. This is the IAM role that will be used to access your RDS/Aurora instance.
4155

42-
### Configuring the RDS/Aurora instance {#configuring-the-rds-aurora-instance}
43-
44-
#### Enabling IAM DB Authentication {#enabling-iam-db-authentication}
45-
1. Login to your AWS Account and navigate to the RDS instance you want to configure.
46-
2. Click on the **Modify** button.
47-
3. Scroll down to the **Database authentication** section.
48-
4. Enable the **Password and IAM database authentication** option.
49-
5. Click on the **Continue** button.
50-
6. Review the changes and click on the **Apply immediately** option.
56+
### Setting up the IAM role {#setting-up-iam-role}
5157

5258
#### Obtaining the RDS/Aurora Resource ID {#obtaining-the-rds-resource-id}
5359

5460
1. Login to your AWS Account and navigate to the RDS instance/Aurora Cluster you want to configure.
5561
2. Click on the **Configuration** tab.
5662
3. Note the **Resource ID** value. It should look like `db-xxxxxxxxxxxxxx` for RDS or `cluster-xxxxxxxxxxxxxx` for Aurora cluster. Let's call this value `{RDS_RESOURCE_ID}`. This is the resource ID that will be used in the IAM policy to allow access to the RDS instance.
5763

58-
#### Setting up the Database User {#setting-up-the-database-user}
59-
60-
##### PostgreSQL {#setting-up-the-database-user-postgres}
61-
62-
1. Connect to your RDS/Aurora instance and create a new database user with the following command:
63-
```sql
64-
CREATE USER clickpipes_iam_user;
65-
GRANT rds_iam TO clickpipes_iam_user;
66-
```
67-
2. Follow the rest of the steps in the [PostgreSQL source setup guide](./source/rds) to configure your RDS instance for ClickPipes.
68-
69-
##### MySQL / MariaDB {#setting-up-the-database-user-mysql}
70-
71-
1. Connect to your RDS/Aurora instance and create a new database user with the following command:
72-
```sql
73-
CREATE USER 'clickpipes_iam_user' IDENTIFIED WITH AWSAuthenticationPlugin AS 'RDS';
74-
```
75-
2. Follow the rest of the steps in the [MySQL source setup guide](../mysql/source/rds) to configure your RDS/Aurora instance for ClickPipes.
76-
77-
### Setting up the IAM role {#setting-up-iam-role}
78-
7964
#### Manually create IAM role. {#manually-create-iam-role}
8065

8166
1 - Login to your AWS Account in the web browser with an IAM user that has permission to create & manage IAM role.

docs/integrations/data-ingestion/clickpipes/postgres/source/aurora.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,17 @@ Connect to your Aurora PostgreSQL writer instance as an admin user and execute t
9898

9999
The `clickpipes` publication defines the set of tables whose change events will be streamed to ClickPipes. We recommend against using `FOR ALL TABLES` unless you intend to replicate every table, as including unnecessary tables increases WAL traffic from Postgres to ClickPipes and reduces overall replication efficiency.
100100

101+
### Using IAM authentication (optional) {#iam-authentication}
102+
103+
Instead of a password, you can authenticate the ClickPipes user via AWS IAM role-based access. This requires the `rds.iam_auth_for_replication` parameter to be set to `1`. Create the user as follows, then grant it the same schema and replication privileges shown above:
104+
105+
```sql
106+
CREATE USER clickpipes_iam_user;
107+
GRANT rds_iam TO clickpipes_iam_user;
108+
```
109+
110+
See [AWS IAM DB authentication (RDS/Aurora)](/integrations/clickpipes/postgres/auth) for the full steps to set up the IAM role and policy required for ClickPipes to authenticate this way.
111+
101112
## Configure network access {#configure-network-access}
102113

103114
### IP-based access control {#ip-based-access-control}

docs/integrations/data-ingestion/clickpipes/postgres/source/rds.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,21 @@ Connect to your RDS Postgres instance as an admin user and execute the following
9898

9999
The `clickpipes` publication defines the set of tables whose change events will be streamed to ClickPipes. We recommend against using `FOR ALL TABLES` unless you intend to replicate every table, as including unnecessary tables increases WAL traffic from Postgres to ClickPipes and reduces overall replication efficiency.
100100

101+
### Using IAM authentication (optional) {#iam-authentication}
102+
103+
Instead of a password, you can authenticate the ClickPipes user via AWS IAM role-based access. Create the user as follows, then grant it the same schema and replication privileges shown above:
104+
105+
```sql
106+
CREATE USER clickpipes_iam_user;
107+
GRANT rds_iam TO clickpipes_iam_user;
108+
```
109+
110+
:::note
111+
IAM authentication for replication requires the `rds.iam_auth_for_replication` parameter to be set to `1`. This is supported from PostgreSQL version 11 onwards; on earlier versions, you can only run `Initial Load Only` ClickPipes.
112+
:::
113+
114+
See [AWS IAM DB authentication (RDS/Aurora)](/integrations/clickpipes/postgres/auth) for the full steps to set up the IAM role and policy required for ClickPipes to authenticate this way.
115+
101116
## Configure network access {#configure-network-access}
102117

103118
### IP-based access control {#ip-based-access-control}

0 commit comments

Comments
 (0)