หน้านี้ยังไม่พร้อมใช้งานในภาษาท้องถิ่นของคุณ เรากำลังพยายามอย่างหนักเพื่อเพิ่มเวอร์ชันภาษาอื่น ๆ เพิ่มเติม ขอบคุณสำหรับการสนับสนุนเสมอมา

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
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
Help Center/ ServiceStage/ Best Practices/ Enabling Security Authentication for an Exclusive ServiceComb Engine

Enabling Security Authentication for an Exclusive ServiceComb Engine

Updated on 2024-09-27 GMT+08:00

Overview

The exclusive ServiceComb engine supports security authentication based on the Role-Based Access Control (RBAC) policy and allows you to enable or disable security authentication.

After security authentication is enabled for an engine, the security authentication account and password must be configured for all microservices connected to the engine. Otherwise, the microservice fails to be registered, causing service loss.

Application Scenarios

This section describes how to enable security authentication for an exclusive ServiceComb engine and ensure that services of microservice components connected to the engine are not affected.

Procedure

  1. Upgrade SDK used by microservice components.

    To enable the security authentication function, SDK must support the security authentication function. If the SDK version used by the current microservice components is earlier than the required version (Spring Cloud Huawei requires 1.6.1 or later, and Java chassis requires 2.3.5 or later), you need to upgrade SDK.

  2. Configure security authentication parameters for microservice components.

    Before enabling security authentication for a ServiceComb engine, configure security authentication parameters for the microservice components that have been connected to the engine. To configure security authentication parameters, you need to configure the security authentication account and password:

    • Configuring the security authentication account and password for a Spring Cloud microservice component
    Table 1 Configuring the security authentication account and password for a Spring Cloud microservice component

    Configuration File Configuration

    Environmental Variables Injection

    Add the following configurations to the bootstrap.yml file of the microservice. If they are configured, skip this step.

    spring:
      cloud:
        servicecomb:
          credentials:
            account:
              name: test   #Security authentication account. Set this parameter based on the site requirements.
              password: mima  #Password of the security authentication account. Set this parameter based on the site requirements.
              cipher: default

    Add the following environment variables. For details, see Manually Adding an Application Environment Variable.

    • spring_cloud_servicecomb_credentials_account_name: security authentication account. Set this parameter based on the site requirements.
    • spring_cloud_servicecomb_credentials_account_password: password of the security authentication account. Set this parameter based on the site requirements.
    NOTE:
    • By default, the user password is stored in plaintext, which cannot ensure security. You are advised to encrypt the password for storage. For details, see Custom Encryption Algorithms for Storage.
    • If security authentication is not enabled for the ServiceComb engine and security authentication parameters are configured for the microservice components connected to the ServiceComb engine, the normal service functions of the microservice components are not affected.
    • Configuring the security authentication account and password for a Java chassis microservice component
      Table 2 Configuring the security authentication account and password for a Java chassis microservice component

      Configuration File Configuration

      Environmental Variables Injection

      Add the following configurations to the microservice.yml file of the microservice. If they are configured, skip this step.

      servicecomb:
        credentials:
          rbac.enabled: true  #Whether to enable security authentication. Set this parameter based on the site requirements.
          cipher: default
          account: 
            name: test #Security authentication account. Set this parameter based on the site requirements.
            password: mima #Password of the security authentication account. Set this parameter based on the site requirements.
            cipher: default

      Add the following environment variables. For details, see Manually Adding an Application Environment Variable.

      • servicecomb_credentials_rbac_enabled: whether to enable security authentication. Set this parameter based on the site requirements. true: security authentication is enabled; false: security authentication is disabled.
      • servicecomb_credentials_account_name: security authentication account. Set this parameter based on the site requirements.
      • servicecomb_credentials_account_password: password of the security authentication account. Set this parameter based on the site requirements.

  3. Enable security authentication for an exclusive ServiceComb engine. For details, see Enabling Security Authentication.

    NOTE:

    After security authentication is enabled, if security authentication parameters are not configured for the microservice components connected to the engine, or the security authentication account and password configured for the microservice components are incorrect, the heartbeat of the microservice components fails and the service is forced to go offline.

เราใช้คุกกี้เพื่อปรับปรุงไซต์และประสบการณ์การใช้ของคุณ การเรียกดูเว็บไซต์ของเราต่อแสดงว่าคุณยอมรับนโยบายคุกกี้ของเรา เรียนรู้เพิ่มเติม

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback