Column encryption, provided by Data Security Center (DSC), protects sensitive column data in ApsaraDB RDS for PostgreSQL by keeping it encrypted at the database level. Data owners can read their data in plaintext through an always-confidential client, while database administrators and cloud platform operators—even those with direct database access—see only ciphertext. This separation between who owns the data and who manages the database infrastructure is the core security guarantee of this feature.
Prerequisites
Before you begin, make sure you have:
-
An ApsaraDB RDS for PostgreSQL 16 instance with minor engine version 20250228 or later
-
An instance running in one of the supported regions:
-
The Chinese mainland: China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Hangzhou), China (Shanghai), China (Shenzhen), China (Guangzhou), China (Chengdu)
-
Outside the Chinese mainland: China (Hong Kong), Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta), Germany (Frankfurt)
-
How it works
DSC uses the AES-256-GCM encryption algorithm with a local key encryption method. Sensitive columns are stored as ciphertext in the database. Database accounts fall into two permission types:
-
Plaintext Permission — the account can query encrypted columns and receive plaintext directly. Assign this to data owners who need to read sensitive data.
-
Ciphertext Permission (JDBC Decryption) — the account receives ciphertext and can decrypt it locally through the column encryption JDBC driver. This is the default for all accounts after encryption is enabled. Assign this to applications that access the database through Java code.
If the instance fails the encryption check in DSC, column encryption cannot be configured. Common causes are: the database major version is not PostgreSQL 16, the minor engine version is earlier than 20250228, or the instance is a read-only instance. See FAQ for resolution steps.
Set up column encryption
Setting up column encryption involves five steps: activating DSC, authorizing DSC to access cloud resources, authorizing the RDS instance, connecting to the database, and enabling encryption on specific columns.
Step 1: Activate or upgrade DSC
Step 2: Authorize DSC to access cloud resources
Step 3: Authorize the RDS database instance
Step 4: Connect to the database and run a sensitive data identification task
Step 5: Enable column encryption
-
Log on to the Data Security Center console. In the left-side navigation pane, choose Risk Governance > Column Encryption.
ImportantThe Encryption Check column must display Passed before you can enable and configure column encryption. If it displays Failed, see FAQ.
-
Click Rapid Encryption above the database instance list to configure encryption for all unencrypted columns across instances. Alternatively, click Rapid Encryption in the Actions column of a specific database instance to limit the scope to that instance.

-
In the Encryption Configuration panel, select the Asset Type, Instance name, Plaintext Permission Accounts, and the target Databases, Table, and Column, then click OK. Note the following:
-
RDS PostgreSQL supports only the AES-256-GCM algorithm and local encryption method.
-
After encryption is configured, all database accounts default to Ciphertext Permission (JDBC Decryption). Accounts with this permission access ciphertext by default and decrypt it locally using a JDBC client.
-
To grant an account direct plaintext access, add it under Plaintext Permission Accounts.
-
Modify the encryption configuration
Change the scope of encrypted columns
After enabling column encryption, adjust which columns are encrypted at any time.
-
Log on to the Data Security Center console. In the left-side navigation pane, choose Risk Governance > Column Encryption.
-
In the instance list, expand the target instance. Find the target Databases, Table, and Column, then click Enable Encryption or Disable Encryption.

Change account permissions
All accounts default to Ciphertext Permission (JDBC Decryption) unless explicitly set to Plaintext Permission. Change permissions based on the role of each account:
-
Plaintext Permission: For data owners who need to read sensitive data directly through the console or DMS.
-
Ciphertext Permission (JDBC Decryption): For applications and administrators who access the database through JDBC and decrypt locally.
To change permissions:
-
Log on to the Data Security Center console.
-
On the Risk Governance > Column Encryption page, click Accounts in the Permission Settings section. Alternatively, click Edit in the Actions column of an instance, then click Account Permissions in the Configure panel.
-
In the Permission Settings panel, search for the target instance and account to view the current permission.
Note If a newly added database account is not listed, run Asset synchronization first and then check again. -
Click Modify Permissions in the Actions column of the target account. To update multiple accounts with the same permissions at once, select them and click Batch Modify Permissions.
-
In the Modify Permissions dialog box, select the target permission and click OK.
Verify column encryption
This example uses the birth_date column in the students01 table. One database account has Plaintext Permission; another has Ciphertext Permission (JDBC Decryption).
-
Connect an RDS PostgreSQL 16 instance to DSC, complete sensitive data classification, and enable column encryption on the target column. Set one account to Plaintext Permission and keep the other at Ciphertext Permission (JDBC Decryption).

-
Log on to Data Management Service (DMS) with the account that has Ciphertext Permission (JDBC Decryption). Run
SELECT * FROM students01;. The encrypted column returns ciphertext.
-
Log on to Data Management Service (DMS) with the account that has Plaintext Permission. Run
SELECT * FROM students01;. The encrypted column returns plaintext.
Access encrypted columns from applications
For accounts with Ciphertext Permission (JDBC Decryption), use the column encryption driver (JDBC) to access encrypted column data from Java applications. The driver decrypts ciphertext automatically before returning results, making the process transparent to the application.
FAQ
What do I do if the RDS instance fails the encryption check?
What's next
-
For the architecture and principles behind column encryption, see Column encryption overview.
-
If sensitive column data changes after authorization, rescan the database. For details, see Scan sensitive data through detection tasks.

