Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

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/ Developer Guide/ Microservice Developer Guide/ Using Microservice Engine Functions/ Using Security Authentication/ Configuring the Security Authentication Account and Password for a Microservice

Configuring the Security Authentication Account and Password for a Microservice

Updated on 2024-05-06 GMT+08:00

After enabling programming interface security authentication of an exclusive microservice engine, you need to enable the same function of microservice components connected to the engine. Programming interface security authentication is triggered by configuring the security authentication account and password. Currently, the configuration file configuration mode and environment variable injection mode are supported.

For security purposes, you are advised to encrypt the account and password before using them.

NOTE:

If programming interface security authentication is not enabled for the exclusive microservice engine, but the security authentication account name and password are configured for the microservice component, the engine will verify the account configured for the microservice component.

Configuring the Security Authentication Account and Password for a Spring Cloud Microservice Component

  • Configure the configuration file
    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 # Set this parameter based on the actual value.
              password: mima # Set this parameter based on the actual value.
              cipher: default
    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.

  • Enter environment variables

    Add the environment variables listed in Table 1 to the microservice.

    Add environment variables. For details, see Managing Application Environment Variables.

    Table 1 Environment variables

    Name

    Description

    spring_cloud_servicecomb_credentials_account_name

    Set it based on the actual value.

    spring_cloud_servicecomb_credentials_account_password

    Set it based on the actual value.

    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.

Configuring the Security Authentication Account and Password for a Java Chassis Microservice Component

  • Configure the configuration file

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

    servicecomb:
      credentials:
        rbac.enabled: true # Set this parameter based on the actual value.
        cipher: default
        account: 
          name: test # Set this parameter based on the actual value.
          password: mima # Set this parameter based on the actual value.
          cipher: default
    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 Configure security authentication parameters.

  • Enter environment variables

    Add the environment variables listed in Table 2 to the microservice.

    Add environment variables. For details, see Managing Application Environment Variables.

    Table 2 Environment variables

    Name

    Description

    servicecomb_credentials_rbac_enabled

    • true: security authentication enabled.
    • false: security authentication disabled.

    servicecomb_credentials_account_name

    Set it based on the actual value.

    servicecomb_credentials_account_password

    Set it based on the actual value.

    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 Configure security authentication parameters.

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback