Adding and Authorizing Database Assets
To identify sensitive data, mask static data, or add/extract data watermarks for database assets, you must authorize DSC to access your databases.
- User-built database
If a user-built database is used, add the database instance to DSC, and then authorize DSC to access the database.
- Cloud database
If a cloud database is used, you do not need to add the database instance to DSC. You only need to enable the corresponding cloud service. After DSC is authorized to access cloud database assets, it automatically discovers your cloud database instances. You need to authorize DSC to access your databases by referring to Authorizing Access to a Database Asset.
Prerequisites
| Type | Prerequisites |
|---|---|
| User-built database |
|
| DWS cross-account or cross-VPC instance |
|
| Cloud database |
|
Data Source Types and Versions Supported by DSC
| Data Source | Data Source Type | Version |
|---|---|---|
| MySQL | 5.6, 5.7, 8.0 |
| SQL Server | 2017_SE, 2017_EE, and 2017_WEB | |
| 2016_SE, 2016_EE, and 2016_WEB | ||
| 2014_SE and 2014_EE | ||
| 2012_SE, 2012_EE, and 2012_WEB | ||
| 2008_R2_EE and 2008_R2_WEB | ||
| PostgreSQL | 15, 14, 13, 12, 11, 10, 9.6, 9.5, 9.4, 9.1, and 1.0 | |
| Databases built on ECS | TDSQL | 10.3.x |
| Oracle | 11, 12 | |
| KingBase | V8 | |
| Greenplum | 6.17.3 and 6.1.0 | |
| MongoDB NOTICE: DSC only supports MongoDB instances with the setting authSource=admin. | 3.4, 4.0, 4.2 | |
| GaussDB | GaussDB | 1.3, 1.4, and 2.7 |
| Databases on Bare Metal Servers (BMSs) | DMDBMS | 7 and 8 |
| Data Warehouse Service (DWS) | DWS | 9.1.0, 9.0, 8.3.0, 8.2.1, 8.2.0, 8.1.3, 8.1.1, 8.0.1, 8.0.0 |
| Document Database Service (DDS) | DDS | 4.0, 4.2, and 4.4 |
Adding a Database Asset
You can perform the following operations to add user-built database assets to DSC for management.
Adding a User-Built Database Instance
You can add and delete user-built database instances. For details about the database types and versions supported by DSC, see Data Source Types and Versions Supported by DSC.
Before adding a user-built database asset, you can use the Database Scan function to detect the IP address and port and determine whether it is a database asset based on the returned result.
This section describes how to add a user-built database on the cloud.
- Log in to the DSC console.
- Click
in the upper left corner and select a region or project. - In the navigation pane on the left, choose .
- Choose . The Databases tab is displayed.
- Click the Database Instances tab.
- Click Add Instance in the upper left corner of the database instance list. The Add Database Instance dialog box is displayed. Set related parameters based on Table 2 and click OK to add a user-built database instance. Figure 1 Adding a database instance
Table 2 Configuring database instance information Parameter
Description
Region
By default, it is the region selected in the upper left corner of the console.
Organization Member Account
This parameter is displayed if you have added an organization member to DSC based on Multi-Account Management. Click to select an account and view its information.
ECS
Select the ECS of the user-built database instance from the drop-down list.
Security Group
Select a security group from the drop-down list.
Database Engine
Select a DB engine from the drop-down list. Currently, the DB engines in Data Source Types and Versions Supported by DSC are supported.
Version
Select a DB engine version from the drop-down list box.
Connection Method
This parameter is displayed when Database Engine is set to Oracle. Select a connection mode from the drop-down list.
- Service Name: Enter the service name.
- SID: Enter the SID.
Schema
Enter the database schema name when Database Engine is set to DMDBMS.
Database Server Address
Select a server address from the drop-down list box.
If the database is deployed in the cluster mode and data masking is required, set this parameter to the IP address of the primary node.
Port
Enter an integer ranging from 0 to 65535.
Database
Enter a database name.
Username/Password
Enter the username and password of the database.
Asset
Enter 4 to 255 characters. Only letters, digits, hyphens (-), and "_" are allowed. The value must start with a letter.
Creating a metadata drawing task
Databases of a metadata task are supported. After this function is enabled, metadata tasks are automatically delivered based on the default database of the instance to obtain the database, table, and column information of the instance.
If Database Engine is set to SQL Server, Oracle, MongoDB, or GaussDB, metadata drawing tasks cannot be created.
- After an instance is added, if you need to identify and mask sensitive data in the databases of the instance, authorize access to the databases first. For details, see Authorizing Access to a Database Asset.
Adding a User-Built External Database Instance
You can use Direct Connect to connect your on-premises assets to the proxy VPCs in the cloud, and subsequently add your on-premises databases to DSC.
- Log in to the DSC console.
- Click
in the upper left corner and select a region or project. - In the navigation pane on the left, choose .
- Choose . The Databases tab is displayed.
- Click the Database Instances tab.
- Click Add External Database Instance in the upper left corner. The Add Database Instance dialog box is displayed. Figure 2 Adding a User-Built External Database Instance
- Set parameters based on Table 3 and click OK.
Table 3 Configuring database instance information Parameter
Description
Region
Region where the instance is deployed.
Proxy VPC
Select a proxy VPC from the drop-down list.
Subnet
Select a subnet from the drop-down list.
Security Group
Select a security group from the drop-down list.
Database Engine
Select a DB engine from the drop-down list. Currently, the DB engines in Data Source Types and Versions Supported by DSC are supported.
Version
Select a DB engine version from the drop-down list box.
Connection Method
This parameter is displayed when Database Engine is set to Oracle. Select a connection mode from the drop-down list.
- Service Name: Enter the service name.
- SID: Enter the SID.
Database Server Address
Enter the IP address of the host where the asset is located.
Port
Enter an integer ranging from 0 to 65535.
Database
Enter a database name.
Username
Enter the database username.
Password
Enter the database password.
Asset
Enter 4 to 255 characters. Only letters, digits, hyphens (-), and "_" are allowed. The value must start with a letter.
- After Creating a metadata drawing task is enabled, metadata tasks are automatically delivered based on the default database of the instance to obtain the database, table, and column information of the instance.
- After an instance is added, if you need to identify and mask sensitive data in the databases of the instance, authorize access to the databases first. For details, see Authorizing Access to a Database Asset.
Adding User-Built External Instances and Databases in Batches
You can use Direct Connect to connect your on-premises assets to the proxy VPCs in the cloud, and subsequently add your on-premises databases to DSC in batches.
- Log in to the DSC console.
- Click
in the upper left corner and select a region or project. - In the navigation pane on the left, choose .
- Choose . The Database Instances tab is displayed.
- Click the Database Instances tab.
- Click Add Instances and Databases in Batches in the upper left corner.
- In the displayed dialog box, click Download Template to download the Excel template and set parameters based on Table 4.
Table 4 Database Instance Information Parameter
Description
Asset Name
User-defined asset name displayed in the database instance list.
ECS Instance ID
You do not need to enter the ID for an external user-built database. However, if you purchase an ECS user-built database, you must enter the ID of the corresponding ECS instance.
Oracle SID
Enter the SID of the Oracle database.
Oracle Service Name
Enter the Oracle service name.
Proxy VPC
This parameter is optional for cloud databases and is mandatory for external user-built databases. It corresponds to the proxy VPC of the ECS.
Subnet
This parameter is optional for cloud databases and is mandatory for external ECSs. It corresponds to the ECS subnet ID.
Security Group
This parameter is optional for cloud databases and mandatory for external ECSs. It corresponds to the security group of the ECS.
Database Engine
If an ECS instance has been added, the engine of the added ECS will be used.
Version
If an ECS instance has been added, the version of the added ECS will be used.
Host IP Address
If an ECS has been added, the IP address of the added ECS will be used.
Port
If an ECS has been added, the port of the added ECS will be used.
Database
Database name
User
Database account
Password
Database password
- Click Select File, select the prepared template, and click OK.
- After an instance is added, if you need to identify and mask sensitive data in the databases of the instance, authorize access to the databases first. For details, see Authorizing Access to a Database Asset.
Adding a Cross-Account or Cross-VPC DWS Instance
- Log in to the DSC console.
- Click
in the upper left corner and select a region or project. - In the navigation pane on the left, choose .
- Choose . The Database Instances tab is displayed.
- Click the Database Instances tab. In the upper left corner of the instance list, click Add Cross-Account or Cross-VPC Instance. The Add Database Instance dialog box is displayed. Figure 3 Adding a database instance
- Set parameters based on Table 5 and click OK.
Table 5 Parameters for configuring a cross-account/cross-VPC instance Parameter
Description
Proxy VPC
Choose a proxy VPC from the dropdown list.
Subnet
Select a subnet from the drop-down list.
Security Group
Select a security group from the drop-down list.
Instance Name
Enter the name of the instance to be added.
Version
Select a version from the drop-down list.
For details about the supported versions, see Data Source Types and Versions Supported by DSC.
Database Server Address
Enter the obtained host IP address.
Port
Enter a database port.
Database
Enter a database name.
Username
Enter the username for connecting to the database.
Password
Enter the password for connecting to the database.
Asset
Enter an asset name. Enter 4 to 255 characters. Only letters, digits, hyphens (-), and "_" are allowed. The value must start with a letter.
Creating a metadata drawing task
After Creating a metadata drawing task is enabled, metadata tasks are automatically delivered based on the default database of the instance to obtain the database, table, and column information of the instance.
- After an instance is added, if you need to identify and mask sensitive data in the databases of the instance, authorize access to the databases first. For details, see Authorizing Access to a Database Asset.
Database Scan
DSC supports detection through IP address and port and returns possible database assets, facilitating adding cloud self-built databases.
- Log in to the DSC console.
- Click
in the upper left corner and select a region or project. - In the navigation pane on the left, choose .
- Choose .
- Click the Database Scan tab and click Create Scan Task.
- In the Database Scan dialog box, select a VPC, subnet, security group, and scan targets (database engine and port). You can also click Add and enter ports to be detected.
- Click Start.
When the Status of the scan task is Scanned, click View Details in the Operation column to view the database scan result. If the Suspected DB Engine column returns a database type, the asset is suspected to be a database asset. You can click Add Asset in the Operation column to add the database instance to DSC for management.
Authorizing Access to a Database Asset
The following uses the RDS database type as an example to describe how to authorize access to database assets in an RDS database instance. To authorize access to other types of database instances, click the corresponding database type (for example, DWS or Self-built databases) and perform the following steps.
When you authorize access to a database asset, the metadata task can be automatically enabled.
Authorizing Access to Cloud Databases and User-Built Databases
- Log in to the DSC console.
- Click
in the upper left corner and select a region or project. - In the navigation pane on the left, choose .
- Click RDS. The RDS Databases tab is displayed. Figure 4 RDS database instances
- Click the Database Instances tab. Authorization can be performed in either of the following ways:
- Method 1
- Locate the database instance in the list and click Authorize in the Operation column. Then, enter the database information for authorization. Figure 5 Database authorization
- Configure Permission Settings (required only for RDS databases).
- Grant the read-only permission: Only the sensitive data identification function can be used.
- Grant the read and write permission: The sensitive data identification and data anonymization functions can be used.
- After the RDS read-only permission is authorized, DSC creates the account dsc_readonly in RDS.
- After the password of the dsc_readonly account is reset in RDS, the new password is not automatically synchronized to DSC. As a result, the sensitive data identification task will fail. For this reason, do not reset the password of this account.
- If you have reset the password of dsc_readonly in RDS, delete the authorized RDS DB instance in DSC and configure permissions on the instance again.
- DSC cannot scan and mask sensitive data in MySQL databases within RDS instances where SSL has been enabled.
- After the RDS read-only permission is authorized, DSC creates the account dsc_readonly in RDS.
- Enter the database name, asset name, username, and password.
- The database name can contain only letters, digits, underscores (_), and hyphens (-).
- The asset name must contain 4 to 255 characters.
- (Optional) Select a group from the drop-down list. After selecting a group, you can view the group information on the asset group management page. If you do not select a group, the asset is displayed in default group list by default.
- Click Add to add multiple databases for authorization at the same time.
- Locate the database instance in the list and click Authorize in the Operation column. Then, enter the database information for authorization.
- Method 2
- Click the instance name to go to the instance details page. Click Authorize in the Operation column for database authorization. Figure 6 Instance details
- Select multiple databases and click Authorize Selected in the upper left corner to authorize them in batches.
- Enter the database name, asset name, username, and password.
- The database name can contain only letters, digits, underscores (_), and hyphens (-).
- The asset name must contain 4 to 255 characters.
- (Optional) Select a group from the drop-down list. After selecting a group, you can view the group information on the asset group management page. If you do not select a group, the asset is displayed in default group list by default.
- Click Add to add multiple databases for authorization at the same time.
- Click the instance name to go to the instance details page. Click Authorize in the Operation column for database authorization.
- Method 1
- After the authorization is complete, click the Databases tab to view the connection status of the authorized database. After the asset authorization is complete, the Connection Status of the asset is Checking, which means DSC is checking the database connectivity.
- DSC can access the added database normally if the Connection Status of the database is Succeeded.
- DSC cannot access the added database normally if the Connection Status of the database is Failed. Hover the cursor over Failed to view the failure cause or rectify the fault by referring to How Do I Troubleshoot the Failure in Connecting to the Added Database?
Related Operations
- Deleting a DB instance
Only user-built DB instances can be deleted. You can delete an instance only when there are no authorized databases and metadata under it.
Select multiple user-built database instances and click Batch Delete in the upper left corner of the instance list to delete the instances. You can also click Delete in the Operation column of the instance list to delete a single DB instance.
- Editing the database instance information
Only information about user-built database instances can be edited.
Choose , locate the row that contains the target database instance, and click Edit in the Operation column. In the displayed Edit Database Instance dialog box, edit the database instance information.
- Editing the database information
Select a database type. On the Databases page, locate the row that contains the target database and click Edit in the Operation column. In the displayed Edit Database dialog box, edit the database information. The database name and asset name cannot be modified.
- Obtaining metadata of an instance
- If the number of authorized databases of a cloud database instance is greater than 0, click Refresh in the Operation column of the instance list to obtain the database, table, and column information of the instance.
Cloud databases that do not support metadata collection are excluded. For details, see Creating a Metadata Scanning Task.
- If you enable the function of automatically creating a metadata task when adding a user-built database instance, the system automatically creates a metadata task to obtain all metadata of the instance after the instance is created.
User-built databases that do not support metadata collection, such as SQL Server, are excluded. For details, see Creating a Metadata Scanning Task.
- You can manually create a metadata task by referring to section Creating a Metadata Scanning Task.
- If the number of authorized databases of a cloud database instance is greater than 0, click Refresh in the Operation column of the instance list to obtain the database, table, and column information of the instance.
- Creating an identification task
In the Databases tab, locate the target asset and click Create Identification Task in the Operation column to classify and grade the asset. For details, see Configuring a Sensitive Data Identification Task.
- Testing connectivity in batches
For user-built databases, you can select multiple databases to test connectivity in batches.
Choose to go to the Databases tab page. Select multiple databases and click Test Connectivity in the upper left corner to test the connectivity of the databases.
- DSC can access the added database normally if the Connection Status of the database is Succeeded.
- DSC cannot access the added database normally if the Connection Status of the database is Failed. Hover the cursor over Failed to view the failure cause or rectify the fault by referring to How Do I Troubleshoot the Failure in Connecting to the Added Database?
- Viewing the node IP address scan scope
On the Databases tab page, locate the target asset and click View Node IP Address Scan Range in the Operation column.
References
- Adding Unstructured OBS Data: After adding OBS data, you can identify sensitive data, mask data statically, and add or extract data watermarks.
- Adding a Big Data Asset and Granting Permissions: After a big data asset is added, you can identify sensitive data, statically mask data, and add or extract data watermarks for the big data asset.
- Adding a Log Stream: After a log stream is added, you can identify sensitive data in the log.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot