Skip to content

Commit

Permalink
Merge pull request #581 from awslabs/doc1.1-release
Browse files Browse the repository at this point in the history
docs(others): Updata link
  • Loading branch information
nowfox committed Mar 1, 2024
2 parents 94f75d0 + 0b4c6bf commit 5a8f57e
Show file tree
Hide file tree
Showing 11 changed files with 78 additions and 56 deletions.
35 changes: 35 additions & 0 deletions docs/en/user-guide/appendix-database-proxy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Using EC2 to configure database agents

Create one EC2 instance as the database proxy. Install Nginx to set port forwarding. For example:


### Step 1:Install
`sudo yum install nginx nginx-mod-stream`
### Step 2:Start
`sudo systemctl start nginx`
### Step 3:View status
`systemctl status nginx`
### Step 4:Edit /etc/nginx/nginx.conf
`sudo vim /etc/nginx/nginx.conf`
Add content similar to the following at the end of the file
```
stream {
upstream backend1 {
server 10.0.34.171:3306 max_fails=3 fail_timeout=30s; # Server address can use domain name
}
server {
listen 3306;
proxy_connect_timeout 1s;
proxy_pass backend1;
}
}
```
### Step 5: Reload configuration file
`sudo nginx -s reload`
### Step 6: Add 2 security groups to the instance
Add Rule to the Proxy security group to allow all TCP entries from the following two security groups:`SDPS-CustomDB``StackName-RDSRDSClient`
### Step 7: (Optional) Is the local testing agent effective
```
sudo yum install telnet
telnet 127.0.0.1 7001
```
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
When your RDS/database is in a private network and there are strict IP restrictions (only fixed IPs are allowed for access), you need to connect to the data source in this way.

### Prerequisites - Maintain Network Connectivity
1. Please ensure when you [add an AWS account](data-source.md), choose the JDBC method, then proceed to [Connect to Data Source - RDS](data-catalog-create-jdbc-rds-proxy.md) for operations.
1. Please ensure when you [add an AWS account](data-source.md), choose the JDBC method, then proceed to [Connect to Data Source - RDS](data-catalog-create-jdbc-database-proxy.md) for operations.
2. Create a Database Proxy: Create an EC2 in the VPC where the solution resides to act as a proxy machine. Refer to the steps in: [Appendix: Creating a Database Proxy](appendix-database-proxy.md).
3. Add RDS to the whitelist: Add the EC2 IP to the Inbound Rule of the Security Group for the database to be scanned.

Expand Down
3 changes: 2 additions & 1 deletion docs/mkdocs.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ nav:
- Connect to Glue: user-guide/data-catalog-create-glue.md
- Connect to JDBC: user-guide/data-catalog-create-jdbc.md
- Connect to JDBC(Redshift): user-guide/data-catalog-create-jdbc-redshift.md
- Connect to JDBC(RDS Proxy): user-guide/data-catalog-create-jdbc-rds-proxy.md
- Connect to JDBC(RDS Proxy): user-guide/data-catalog-create-jdbc-database-proxy.md
- Step2:Define classification template: user-guide/data-identifiers.md
- Step3:Run sensitive data discovery jobs:
- Create job: user-guide/discovery-job-create.md
Expand All @@ -50,6 +50,7 @@ nav:
- Appx.Permissions of CloudFormation Stacks: user-guide/appendix-permissions.md
- Appx.Add accounts via AWS Organization: user-guide/appendix-organization.md
- Appx.EU PII identifiers(GDPR reference): user-guide/appendix-build-in-identifiers-eu-gdpr.md
- Appx.Create database proxy: user-guide/appendix-database-proxy.md
- FAQ: faq.md
- Troubleshooting: troubleshooting.md
- Uninstall the solution: uninstall.md
Expand Down
3 changes: 2 additions & 1 deletion docs/mkdocs.zh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ nav:
- 连接Glue: user-guide/data-catalog-create-glue.md
- 连接JDBC: user-guide/data-catalog-create-jdbc.md
- 连接JDBC(Redshift): user-guide/data-catalog-create-jdbc-redshift.md
- 连接JDBC(RDS Proxy): user-guide/data-catalog-create-jdbc-rds-proxy.md
- 连接JDBC(RDS Proxy): user-guide/data-catalog-create-jdbc-database-proxy.md
- 第2步:定义数据分类模板: user-guide/data-identifiers.md
- 第3步:运行敏感数据发现任务:
- 创建作业: user-guide/discovery-job-create.md
Expand All @@ -51,6 +51,7 @@ nav:
- 附录:CloudFormation堆栈的权限: user-guide/appendix-permissions.md
- 附录:通过AWS Organization添加帐户: user-guide/appendix-organization.md
- 附录:EU个人信息标识符(GDPR参考): user-guide/appendix-build-in-identifiers-eu-gdpr.md
- 附录:创建数据库代理: user-guide/appendix-database-proxy.md
- 常见问题: faq.md
- 故障排查: troubleshooting.md
- 卸载解决方案: uninstall.md
Expand Down
30 changes: 0 additions & 30 deletions docs/zh/architecture-overview/architecture-details.md

This file was deleted.

51 changes: 33 additions & 18 deletions docs/zh/user-guide/appendix-database-proxy.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,35 @@
## 配置EC2数据库代理
## 使用EC2配置数据库代理

创建1个EC2实例作为数据库代理。安装iptables 设置端口转发。例如:
创建1个EC2实例作为数据库代理。安装Nginx 设置端口转发。例如:

'''
Step1: 安装
> sudo yum install iptables
Step2: 启用IP转发。在Linux上,IP转发通常默认禁用。要启用它,编辑/etc/sysctl.conf文件,修改或添加以下内容
> net.ipv4.ip_forward = 1
Step3: 应用新的sysctl设置
> sudo sysctl -p /etc/sysctl.conf
Step4: 设置转发规则
> # 其他机器,只能是IP,不能是域名
> sudo iptables -t nat -A PREROUTING -p tcp --dport 444 -j DNAT --to 192.168.1.100:3000
> sudo iptables -t nat -A POSTROUTING -j MASQUERADE
Step5: 保存规则以便重启有效
> sudo service iptables save
Step6: 查看NAT规则
> sudo iptables -L -n -v --line-numbers -t nat
'''

### Step 1:安装
`sudo yum install nginx nginx-mod-stream`
### Step 2:启动
`sudo systemctl start nginx`
### Step 3:查看状态
`systemctl status nginx`
### Step 4:编辑/etc/nginx/nginx.conf文件
`sudo vim /etc/nginx/nginx.conf`
在文件末尾添加类似以下内容
```
stream {
upstream backend1 {
server 10.0.34.171:3306 max_fails=3 fail_timeout=30s; # server地址可以使用域名
}
server {
listen 3306;
proxy_connect_timeout 1s;
proxy_pass backend1;
}
}
```
### Step 5: 重新加载配置文件
`sudo nginx -s reload`
### Step 6: 为实例添加安全组
Proxy安全组添加Rule,允许以下2个安全组的所有TCP进入:`SDPS-CustomDB``堆栈名-RDSRDSClient`
### Step 7: (可选)本地测试代理是否生效
```
sudo yum install telnet
telnet 127.0.0.1 7001
```
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
当您的RDS/数据库在私有网络,且对于IP有严格的限制(只允许固定IP进行接入),您需要通过这种方式进行数据源连接。

### 前提条件 - 保持网络连通性
1. 请确认您[添加AWS账户](data-source.md)时,选择JDBC方式,请转至[连接到数据源 - RDS](data-catalog-create-jdbc-rds-proxy.md)进行操作。
1. 请确认您[添加AWS账户](data-source.md)时,选择JDBC方式,请转至[连接到数据源 - RDS](data-catalog-create-jdbc-database-proxy.md)进行操作。
2. 创建数据库代理(Proxy):在方案所在VPC创建EC2作为代理机器,参考步骤详见:[附录:创建数据库代理](appendix-database-proxy.md)
3. 添加RDS访问白名单:将EC2的IP添加至待检测数据库的Security Group的Inbound Rule。

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/user-guide/data-catalog-create-jdbc-redshift.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
当您希望对某个Redshift Cluster进行敏感数据扫描时,您可以将Redshift的database作为数据源。

### 前提条件 - 保持网络连通性
1. 请确认您[添加AWS账户](data-source.md)时,选择的是CloudFormation方式。如果您添加账户时,选择JDBC方式,请转至[通过EC2代理连接数据库](data-catalog-create-jdbc-rds-proxy.md)进行操作。
1. 请确认您[添加AWS账户](data-source.md)时,选择的是CloudFormation方式。如果您添加账户时,选择JDBC方式,请转至[通过EC2代理连接数据库](data-catalog-create-jdbc-database-proxy.md)进行操作。
2. 准备好Redshift的连接凭证(用户名/密码)

!!! Info "如何获得Redshift凭证"
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/user-guide/data-catalog-create-jdbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
| Amazon RDS for MariaDB|

### 前提条件 - 保持网络连通性
1. 请确认您[添加AWS账户](data-source.md)时,选择的是CloudFormation方式。如果您添加账户时,选择JDBC方式,请转至[通过EC2代理连接数据库](data-catalog-create-jdbc-db-proxy.md)进行操作。
1. 请确认您[添加AWS账户](data-source.md)时,选择的是CloudFormation方式。如果您添加账户时,选择JDBC方式,请转至[通过EC2代理连接数据库](data-catalog-create-jdbc-database-proxy.md)进行操作。
2. 请确保待检测数据库的inbound rule上有所在安全组的自引用, 操作详见[官网文档](https://docs.aws.amazon.com/glue/latest/dg/setup-vpc-for-glue-access.html)
3. 准备好Redshift的连接凭证(用户名/密码)

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/user-guide/data-catalog-create-rds.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 连接到数据源 - RDS

### 前提条件 - 保持网络连通性
1. 请确认您[添加AWS账户](data-source.md)时,选择的是CloudFormation方式。如果您添加账户时,选择JDBC方式,请转至[通过EC2代理连接数据库](data-catalog-create-jdbc-rds-proxy.md)进行操作。
1. 请确认您[添加AWS账户](data-source.md)时,选择的是CloudFormation方式。如果您添加账户时,选择JDBC方式,请转至[通过EC2代理连接数据库](data-catalog-create-jdbc-database-proxy.md)进行操作。
2. 请确保待检测RDS的inbound rule上有所在安全组的自引用, 操作详见[官网文档](https://docs.aws.amazon.com/glue/latest/dg/setup-vpc-for-glue-access.html)
3. 请确保Amazon RDS 实例所在VPC至少要有1个私有子网,
4. 请确保RDS所在VPC满足以下条件之一: 1) 它具有 [VPC NAT 网关](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html)
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/user-guide/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
成功[部署解决方案](../deployment/deployment.md)后,您可以访问控制台来检测敏感数据。

- **第1步**[连接数据源](data-source.md) 添加 AWS 账户并创建数据目录。
- **第2步**[定义分类模板](data-classification-template.md) 通过管理数据标识符在模板中定义敏感数据。
- **第2步**[定义分类模板](data-identifiers.md) 通过管理数据标识符在模板中定义敏感数据。
- **第3步**[运行敏感数据发现作业](discovery-job-create.md) 通过创建和管理数据发现作业来检测敏感数据。
- **第4步**[查看结果](data-catalog-sync.md) 通过数据目录可以看到数据源的元数据(如表结构)查看已更新的数据目录,并查看“摘要”页面检查仪表板。

0 comments on commit 5a8f57e

Please sign in to comment.