Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Configuring Plaintext or Ciphertext Access to Kafka Instances

Updated on 2025-02-14 GMT+08:00

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.

Notes and Constraints

  • 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.
  • 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

  1. Log in to the console.
  2. Click in the upper left corner to select the region where your instance is located.
  3. Click and choose Middleware > Distributed Message Service (for Kafka) to open the console of DMS for Kafka.
  4. In the navigation pane, choose Kafka Instances.
  5. Click a Kafka instance to go to the Basic Information page.
  6. 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

    1. Click next to Plaintext Access in the Private Network Access area. A confirmation dialog box is displayed.
    2. 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

    1. Check that Public Access is enabled. If it is not enabled, enable it. For details, see Configuring Kafka Public Access.
    2. Click next to Plaintext Access in the Public Network Access area. A confirmation dialog box is displayed.
    3. 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

  1. Log in to the console.
  2. Click in the upper left corner to select the region where your instance is located.
  3. Click and choose Middleware > Distributed Message Service (for Kafka) to open the console of DMS for Kafka.
  4. In the navigation pane, choose Kafka Instances.
  5. Click a Kafka instance to go to the Basic Information page.
  6. 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

    1. Click next to Ciphertext Access in the Private Network Access area. The Private Network Ciphertext Access dialog box is displayed.
    2. 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.

    Public network ciphertext access

    1. Check that Public Access is enabled. If it is not enabled, enable it. For details, see Configuring Kafka Public Access.
    2. Click next to Ciphertext Access in the Public Network Access area. The Public Network Ciphertext Access dialog box is displayed.
    3. 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.
    • Contains at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters `~!@#$%^&*()-_=+\|[{}];:'",<.>? and spaces, and cannot start with a hyphen (-).
    • 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

  1. Log in to the console.
  2. Click in the upper left corner to select the region where your instance is located.
  3. Click and choose Middleware > Distributed Message Service (for Kafka) to open the console of DMS for Kafka.
  4. In the navigation pane, choose Kafka Instances.
  5. Click a Kafka instance to go to the Basic Information page.
  6. 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.

    1. Click next to Plaintext Access in the Private Network Access area.
    2. 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

    1. Click next to Plaintext Access in the Public Network Access area.
    2. 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

  1. Log in to the console.
  2. Click in the upper left corner to select the region where your instance is located.
  3. Click and choose Middleware > Distributed Message Service (for Kafka) to open the console of DMS for Kafka.
  4. In the navigation pane, choose Kafka Instances.
  5. Click a Kafka instance to go to the Basic Information page.
  6. 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

    1. Click next to Ciphertext Access in the Private Network Access area.
    2. 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

    1. Click next to Ciphertext Access in the Public Network Access area.
    2. 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.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback