TLS supports encrypted data storage and uses Key Management Service (KMS) from Volcanoengine to encrypt log topic-level data. This topic describes the steps to encrypt TLS data using customer-managed keys (SSE-KMS).
Encryption method | Description |
|---|---|
Service Key (SSE-TLS) | It is the default encryption method provided by TLS. It requires no additional configuration from users, enabling seamless encryption during usage. |
Customer Key (SSE-KMS) | It can generate, manage, and protect encryption keys via Key Management Service (KMS) from Volcanoengine; offers secure key storage, key generation, encryption operations, and key rotation. Features include:
|
EncryptConf parameter's enable setting in the API. Additionally, when updating a log topic subsequently, the complete EncryptConf parameter must be included each time.Encryption method | Description |
|---|---|
Service Key (SSE-TLS) | No billing item is generated. |
Customer Key (SSE-KMS) | First-time users need to activate the KMS service. Although activating KMS is free, using the service incurs fees. |
Encryption method | Use cases |
|---|---|
Service Key (SSE-TLS) |
|
Customer Key (SSE-KMS) |
|
When using TLS service-managed keys (SSE-TLS) for encryption, you can simply add the EncryptConf structure parameter to your API request to complete the encryption setup.
When using customer-managed keys (SSE-KMS) for encryption, you can follow these steps to configure the Key Management System.
Configure TLS cross-service access to KMS. For details, see cross-service access authorization.
Grant user roles KMS encryption/decryption permissions and KMS read-only permissions, configure TLS trust relationships, and record the role TRN.
Log in to the IAM console.
In the left navigation bar, click Role Management.
Locate the role to be authorized, and in the Actions column, click Authorize.
Under Service, search for Key Management Service and click the KMSCryptoUserAccess and KMSReadOnlyAccess policies. And then click Submit.
Click the name of the role to be authorized. Then go to the Trust relationships tab and click Edit trust policy. Add the following content, and click Save.
{ "Statement": [ { "Effect": "Allow", "Action": [ "sts:AssumeRole" ], "Principal": { "Service": [ "TLS" ] } } ] }
Under Basic information, record the role TRN.
Configure data encryption.
Only supported via API calls. When calling the API, add the EncryptConf structure parameter to the request to complete encryption settings. Supported API:
API | API Description |
|---|---|
CreateTopic | Create a TLS topic. For details, refer to CreateTopic. |
ModifyTopic | Modify the log topic information. For details, refer to ModifyTopic. |
Parameters | Type | Required | Example value | Description |
|---|---|---|---|---|
EncryptConf | Object of EncryptConf | No | Data encryption structure. |
Parameters | Type | Required | Example value | Description |
|---|---|---|---|---|
enable | Boolean | No | true | Enable data encryption.
|
encrypt_type | String | No | default | Encryption algorithm. Only |
user_cmk_info | Object of EncryptUserCmkConf | No | / | Configure key information. Takes effect when
|
Parameters | Type | Required | Example value | Description |
|---|---|---|---|---|
trn | string | No | trn:iam::123456789:role/service_role_for_tls | The TRN of the user IAM role. |
region_id | string | No | ap-southeast-1 | Region ID where the user master key is located. |
user_cmk_id | string | No | fc227edb-3682-4577-a3b5xxxxxxxxx | User main key ID. |
Using user-managed keys (SSE-KMS) encryption as an example.
EncryptConf = { "enable" : true, "encrypt_type" : "default" "user_cmk_info" : { "trn" : "trn:iam::123456789:role/service_role_for_tls" "region_id" : "ap-southeast-1" "user_cmk_id" : "fc227edb-3682-4577-a3b5xxxxxxxxx" } }