Bu sayfa henüz yerel dilinizde mevcut değildir. Daha fazla dil seçeneği eklemek için yoğun bir şekilde çalışıyoruz. Desteğiniz için teşekkür ederiz.

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

Configuring a Secret and Injecting It as an Environment Variable

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

In this practice, you can add DEW secrets and import them into components as environment variables to protect data.

Creating a DEW Credential

  1. Log in to DEW.
  2. Choose Cloud Secret Management Service.
  3. Click Create Secret and set parameters by referring to Table 1.

    Table 1 Secret parameters

    Parameter

    Description

    Type

    Select Shared secret.

    Secret Name

    Enter a secret name. In this practice, enter db.

    Enterprise Project

    ID of the enterprise project to which a secret is bound during creation.

    In this practice, select default.

    Secret Value

    Select Plaintext and enter 123456.

    Description

    In this practice, leave it blank.

    KMS Encryption Key

    Select csms/default.

    Associated Event

    In this practice, select None.

  4. Click Next. The rotation period cannot be set for shared secrets. Click Next again to confirm the secret information.
  5. Click OK.

    You can view the created secret in the secret list. The default status of a secret is Enabled.

Adding a Secret

  1. Log in to CAE.
  2. Choose System Settings.

    If KMS CMKFullAccess and CSMS ReadonlyAccess are not granted, grant them as the administrator.
    Figure 1 Authorization

  3. Click Edit in the Secret Configuration module.
  4. Click Create Secret. In the displayed dialog box, select the secret created in Creating a DEW Secret and the required version.

    Figure 2 Adding a secret

  5. Click OK.

Configuring an Environment Variable

  1. Choose Component Configurations.
  2. Select the target component.
  3. Click Edit in the Environment Variables module.
  4. Click Add Environment Variable and configure the environment variable by referring to Table 2.

    Table 2 Configuring an environment variable

    Parameter

    Description

    Type

    Select Import secret.

    Name

    Name of an environment variable, for example, test1.

    The name must be unique.

    Variable/Variable Reference

    Select the secret created in Adding a Secret from the drop-down list.

    Figure 3 Configuring an environment variable

  5. Click Save in the Operation column. On the Set Environment Variable page, click OK.
  6. Click Activate Settings in the upper part of the page.

    In the dialog box displayed on the right, confirm the configurations and click OK for the configurations to take effect.

Verifying the Configurations

  1. Choose Instance List.
  2. Select the target environment and application from the drop-down lists in the upper part of the page, and click the target component.
  3. Select the target instance and click Remote Login in the Operation column.
  4. Check the environment variable, which is the same as the secret value in the DEW secret.

    Figure 4 Secret value in DEW
    Figure 5 Environment variable in remote login

Sitemizi ve deneyiminizi iyileştirmek için çerezleri kullanırız. Sitemizde tarama yapmaya devam ederek çerez politikamızı kabul etmiş olursunuz. Daha fazla bilgi edinin

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback