Configuring Plaintext or Ciphertext Access to Kafka Instances
You can access a Kafka instance in plaintext or ciphertext. This section describes how to change the access mode on the console.
- Plaintext access: Clients connect to the Kafka instance without SASL authentication.
- Ciphertext access: Clients connect to the Kafka instance with SASL authentication.
- When you change the access mode for the first time, some instances will restart. You can see the actual situation on the console. The restart takes about 75–80s. The instance will not be restarted when the access mode is changed again.
- In the ME-Riyadh, LA-Sao Paulo1, and LA-Santiago regions, the instance access mode cannot be changed.
- For a single-node instance, you can only enable or disable plaintext for public network access.
- The access mode cannot be changed for instances with IPv6 enabled.
Prerequisites
You can change the access mode of a Kafka instance only when the instance is in the Running state.
Enabling Plaintext Access
- Log in to the console.
- Click in the upper left corner to select a region.
Select the region where your Kafka instance is located.
- Click and choose Middleware > Distributed Message Service (for Kafka) to open the console of DMS for Kafka.
- Click a Kafka instance to go to the Basic Information page.
- An instance can be accessed in plaintext over the private network and public network. For details about how to enable plaintext access, see Table 1.
Table 1 Enabling plaintext access Access Method
Enabling Plaintext Access
Private network plaintext access
- Click next to Plaintext Access in the Private Network Access area. A confirmation dialog box is displayed.
- Click OK. The Background Tasks page is displayed. If the status of the task turns to Successful, plaintext access is successfully enabled.
Public network plaintext access
- Check that Public Access is enabled. If it is not enabled, enable it. For details, see Configuring Kafka Public Access.
- Click next to Plaintext Access in the Public Network Access area. A confirmation dialog box is displayed.
- Click OK. The Background Tasks page is displayed. If the status of the task turns to Successful, plaintext access is successfully enabled.
Enabling Ciphertext Access
- Log in to the console.
- Click in the upper left corner to select a region.
Select the region where your Kafka instance is located.
- Click and choose Middleware > Distributed Message Service (for Kafka) to open the console of DMS for Kafka.
- Click a Kafka instance to go to the Basic Information page.
- An instance can be accessed in ciphertext over the private network and public network. For details about how to enable ciphertext access, see Table 2.
Table 2 Enabling ciphertext access Access Method
Enabling Ciphertext Access
Private network ciphertext access
- Click next to Ciphertext Access in the Private Network Access area. The Private Network Ciphertext Access dialog box is displayed.
- Set the Kafka security protocol, SASL/PLAIN mechanism, username, and password, and click OK. The Background Tasks page is displayed. If the status of the task turns to Successful, ciphertext access is successfully enabled.
NOTE:
- When enabling ciphertext access for the first time (including through private network and public network), you need to set the Kafka security protocol, SASL/PLAIN mechanism, username, and password. Next time when you enable ciphertext access, you only need to set the Kafka security protocol.
- Private network ciphertext access cannot be disabled in some regions. In this case, contact customer service.
Public network ciphertext access
- Check that Public Access is enabled. If it is not enabled, enable it. For details, see Configuring Kafka Public Access.
- Click next to Ciphertext Access in the Public Network Access area. The Public Network Ciphertext Access dialog box is displayed.
- Set the Kafka security protocol, SASL/PLAIN mechanism, username, and password, and click OK. The Background Tasks page is displayed. If the status of the task turns to Successful, ciphertext access is successfully enabled.
NOTE:
When enabling ciphertext access for the first time (including through private network and public network), you need to set the Kafka security protocol, SASL/PLAIN mechanism, username, and password. Next time when you enable ciphertext access, you only need to set the Kafka security protocol.
The Kafka security protocol, SASL/PLAIN mechanism, username, and password are described as follows.
Table 3 Ciphertext access parameters Parameter
Value
Description
Security Protocol
SASL_SSL
SASL is used for authentication. Data is encrypted with SSL certificates for high-security transmission.
SASL_PLAINTEXT
SASL is used for authentication. Data is transmitted in plaintext for high performance.
SCRAM-SHA-512 authentication is recommended for plaintext transmission.
Cross-VPC Access Protocol
-
- When Plaintext Access is enabled and Ciphertext Access is disabled, PLAINTEXT is used for Cross-VPC Access Protocol.
- When Ciphertext Access is enabled and Security Protocol is SASL_SSL, SASL_SSL is used for Cross-VPC Access Protocol.
- When Ciphertext Access is enabled and Security Protocol is SASL_PLAINTEXT, SASL_PLAINTEXT is used for Cross-VPC Access Protocol.
Fixed once the instance is created.
SASL/PLAIN
-
- If SASL/PLAIN is disabled, the SCRAM-SHA-512 mechanism is used for username and password authentication.
- If SASL/PLAIN is enabled, both the SCRAM-SHA-512 and PLAIN mechanisms are supported. You can select either of them as required.
The SASL/PLAIN setting cannot be changed once ciphertext access is enabled.
What are SCRAM-SHA-512 and PLAIN mechanisms?
- SCRAM-SHA-512: uses the hash algorithm to generate credentials for usernames and passwords to verify identities. SCRAM-SHA-512 is more secure than PLAIN.
- PLAIN: a simple username and password verification mechanism.
Username and Password
-
Username and password used by the client to connect to the Kafka instance.
A username should contain 4 to 64 characters, start with a letter, and contain only letters, digits, hyphens (-), and underscores (_).
A password must meet the following requirements:
- Contains 8 to 32 characters.
- Cannot start with a hyphen (-) and must contain at least three of the following character types: uppercase letters, lowercase letters, digits, spaces, and special characters `~! @#$ %^&*()-_=+\|[{}];:'",<.>?
- Cannot be the username spelled forward or backward.
The username cannot be changed once ciphertext access is enabled.
The Kafka security protocol, SASL/PLAIN mechanism, username, and password are required when the client accesses a Kafka instance with ciphertext access enabled. For details, see Connecting to Kafka Using the Client (SASL Enabled).
Disabling Plaintext Access
- Log in to the console.
- Click in the upper left corner to select a region.
Select the region where your Kafka instance is located.
- Click and choose Middleware > Distributed Message Service (for Kafka) to open the console of DMS for Kafka.
- Click a Kafka instance to go to the Basic Information page.
- An instance can be accessed in plaintext over the private network and public network. For details about how to disable plaintext access, see Table 4.
Table 4 Disabling plaintext access Access Method
Disabling Plaintext Access
Private network plaintext access
Once enabled, private network access cannot be disabled. Enable plaintext or ciphertext access, or both. If ciphertext access is disabled, plaintext access cannot be disabled.
- Click next to Plaintext Access in the Private Network Access area.
- Click OK. The Background Tasks page is displayed. If the status of the task turns to Successful, plaintext access is successfully disabled.
Public network plaintext access
- Click next to Plaintext Access in the Public Network Access area.
- Click OK. The Background Tasks page is displayed. If the status of the task turns to Successful, plaintext access is successfully disabled.
Disabling Ciphertext Access
- Log in to the console.
- Click in the upper left corner to select a region.
Select the region where your Kafka instance is located.
- Click and choose Middleware > Distributed Message Service (for Kafka) to open the console of DMS for Kafka.
- Click a Kafka instance to go to the Basic Information page.
- An instance can be accessed in ciphertext over the private network and public network. For details about how to disable ciphertext access, see Table 5.
Table 5 Disabling ciphertext access Access Method
Disabling Plaintext Access
Private network ciphertext access
In regions where private network ciphertext access cannot be disabled, contact customer service. In regions where it can be disabled, do as follows:
- Click next to Ciphertext Access in the Private Network Access area.
- Click OK. The Background Tasks page is displayed. If the status of the task turns to Successful, ciphertext access is successfully disabled.
Public network ciphertext access
- Click next to Ciphertext Access in the Public Network Access area.
- Click OK. The Background Tasks page is displayed. If the status of the task turns to Successful, ciphertext access is successfully disabled.
After you disable ciphertext access, the created users will not be deleted. You do not need to create users again when you enable ciphertext access next time.
Feedback
Was this page helpful?
Provide feedbackThank 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