huaweicloud-devkit 1.0.2-dev.9 → 1.0.2-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/plugins/marketplace.json +20 -20
- package/LICENSE +201 -201
- package/README.md +178 -138
- package/README.zh-CN.md +176 -138
- package/bin/setup.cjs +10 -8
- package/integrations/opencode/commands/huaweicloud-doctor.md +14 -14
- package/integrations/opencode/opencode.json +11 -14
- package/integrations/opencode/skills/huaweicloud-core/SKILL.md +32 -32
- package/package.json +60 -44
- package/plugins/huaweicloud-core/.claude-plugin/plugin.json +31 -44
- package/plugins/huaweicloud-core/.codex-plugin/plugin.json +30 -43
- package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +31 -44
- package/plugins/huaweicloud-core/.mcp.json +13 -15
- package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +31 -44
- package/plugins/huaweicloud-core/hooks/hooks.json +26 -26
- package/plugins/huaweicloud-core/hooks/huaweicloud-safety.py +136 -136
- package/plugins/huaweicloud-core/safety/policy.json +76 -100
- package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +227 -199
- package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +164 -164
- package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +48 -48
- package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +50 -50
- package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +103 -101
- package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +90 -90
- package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +191 -190
- package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +171 -124
- package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +55 -55
- package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +70 -70
- package/plugins/huaweicloud-core/skills/huawei-deployment/SKILL.md +57 -56
- package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +106 -97
- package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +36 -29
- package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +29 -23
- package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +188 -185
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +144 -133
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/evs.md +31 -31
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +57 -55
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +52 -52
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +132 -131
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +60 -58
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +72 -71
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/deploy-workflow.md +119 -119
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +142 -142
- package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +56 -56
- package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +69 -65
- package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +111 -111
- package/plugins/huaweicloud-core/skills/huawei-iam/references/policy-examples.md +148 -122
- package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +56 -56
- package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +65 -65
- package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +134 -127
- package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-create.md +49 -49
- package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +31 -26
- package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +101 -100
- package/plugins/huaweicloud-core/skills/huawei-obs/references/single-file-share.md +40 -40
- package/plugins/huaweicloud-core/skills/huawei-obs/references/static-website.md +56 -56
- package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +229 -224
- package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +173 -134
- package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +69 -69
- package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +84 -84
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +77 -76
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +60 -59
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/subnet.md +50 -50
- package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +63 -63
- package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/SKILL.md +56 -56
- package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +56 -47
- package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +138 -128
- package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +111 -96
- package/plugins/huaweicloud-core/skills/huaweicloud-core/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +20 -20
- package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +30 -28
- package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +59 -60
- package/plugins/huaweicloud-core/skills/huaweicloud-safety/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +83 -83
- package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +54 -1
- package/plugins/huaweicloud-core/src/auth/credentials.mjs +103 -95
- package/plugins/huaweicloud-core/src/auth/service.mjs +63 -63
- package/plugins/huaweicloud-core/src/data/icons-manifest.v1.json +3517 -0
- package/plugins/huaweicloud-core/src/hcloud-cli.mjs +283 -265
- package/plugins/huaweicloud-core/src/icon-library.mjs +171 -0
- package/plugins/huaweicloud-core/src/mcp-server.mjs +130 -129
- package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +68 -0
- package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +94 -0
- package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +140 -137
- package/plugins/huaweicloud-core/src/safety-policy.mjs +356 -302
- package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +86 -87
- package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +150 -153
- package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +196 -105
- package/plugins/huaweicloud-core/src/search-market.mjs +208 -169
- package/plugins/huaweicloud-core/src/setup-cli.mjs +2622 -1594
- package/plugins/huaweicloud-core/src/tools.mjs +463 -111
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +447 -427
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +128 -132
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +215 -227
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +189 -202
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +164 -158
- package/plugins/huaweicloud-core/src/ws-exec/index.js +19 -19
- package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.js +338 -338
|
@@ -1,56 +1,57 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: huawei-deployment
|
|
3
|
-
description:
|
|
4
|
-
version: 1
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Huawei Cloud CloudDeploy
|
|
8
|
-
|
|
9
|
-
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
-
|
|
11
|
-
Always run `hcloud <Service> <Operation> --help` before constructing commands to discover exact parameter names and requirements.
|
|
12
|
-
|
|
13
|
-
## Overview
|
|
14
|
-
|
|
15
|
-
Domain expertise for Huawei Cloud CloudDeploy. Covers application creation, deployment task management, pipeline execution, and artifact configuration.
|
|
16
|
-
|
|
17
|
-
## Critical Warnings
|
|
18
|
-
|
|
19
|
-
| Trap
|
|
20
|
-
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
|
32
|
-
| Create
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
- MUST
|
|
50
|
-
- MUST
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
- **
|
|
56
|
-
- **
|
|
1
|
+
---
|
|
2
|
+
name: huawei-deployment
|
|
3
|
+
description: 'Use when creating, managing, or running deployment tasks and pipelines on Huawei Cloud CloudDeploy. Triggers: CloudDeploy, deployment, CI/CD, pipeline, release, artifact deployment, deploy task. NOT for: CodeArts Build (build pipeline), SWR container registry.'
|
|
4
|
+
version: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Huawei Cloud CloudDeploy
|
|
8
|
+
|
|
9
|
+
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
+
|
|
11
|
+
Always run `hcloud <Service> <Operation> --help` before constructing commands to discover exact parameter names and requirements.
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
Domain expertise for Huawei Cloud CloudDeploy. Covers application creation, deployment task management, pipeline execution, and artifact configuration.
|
|
16
|
+
|
|
17
|
+
## Critical Warnings
|
|
18
|
+
|
|
19
|
+
| Trap | Why |
|
|
20
|
+
| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| **Flyway SQL dialect mismatch (H2 dev → MySQL prod)** | Spring Boot apps commonly develop with H2 in-memory DB, then deploy to RDS MySQL. Flyway migrations using H2-specific syntax (e.g. `DATEADD`, `CHARACTER_LENGTH`, `BOOLEAN`) silently succeed on H2 but fail on MySQL. Before deploying, audit `V*__*.sql` migration files: replace `DATEADD` with `DATE_ADD`, `BOOLEAN` with `TINYINT(1)`, remove `characterEncoding=utf8mb4` from Spring Boot datasource URL (KooCLI RDS CreateInstance sets charset at the instance level). Use `Flyway.validate-on-migrate=true` in CI to catch dialect issues early. |
|
|
22
|
+
| Service name may be `CodeArtsDeploy` | hcloud service name for deployment may be `CodeArtsDeploy` instead of `CloudDeploy`. Run `hcloud --help` to verify |
|
|
23
|
+
| Deployment hosts need agent | Install CloudDeploy agent on target hosts first |
|
|
24
|
+
| Task must reference application first | Create application before task |
|
|
25
|
+
| Artifact source defaults to OBS | Most deployment tasks pull artifacts from OBS. Ensure bucket and object exist |
|
|
26
|
+
| Parallel deployments may conflict | Lock resources or use deployment groups |
|
|
27
|
+
|
|
28
|
+
## Common Workflows
|
|
29
|
+
|
|
30
|
+
| Task | Operation |
|
|
31
|
+
| ---------------------- | ---------------------------------------------------------------- |
|
|
32
|
+
| Create application | `CreateApp --name=<n> --platform=<p> --cli-region=<r>` |
|
|
33
|
+
| Create deployment task | `CreateTask --name=<n> --app_id=<id> --artifact_source_type=OBS` |
|
|
34
|
+
| Start deployment | `StartTask --task_id=<id>` |
|
|
35
|
+
| List tasks | `ListTasks --app_id=<id>` |
|
|
36
|
+
| Delete task | `DeleteTask --task_id=<id>` |
|
|
37
|
+
|
|
38
|
+
## Troubleshooting
|
|
39
|
+
|
|
40
|
+
| Error | Fix |
|
|
41
|
+
| ------------------ | ----------------------------------------------------------------------------- |
|
|
42
|
+
| Agent offline | Check agent service on target host, network connectivity, firewall rules |
|
|
43
|
+
| Deployment timeout | Check artifact size, increase task timeout, verify target host resources |
|
|
44
|
+
| Artifact not found | Verify OBS bucket and object path, check artifact permissions |
|
|
45
|
+
| Permission denied | Verify IAM roles for deployment: `CodeArtsDeploy FullAccess` or custom policy |
|
|
46
|
+
|
|
47
|
+
## Security
|
|
48
|
+
|
|
49
|
+
- MUST use IAM roles for deployment permissions
|
|
50
|
+
- MUST verify artifact integrity before deployment
|
|
51
|
+
- MUST not store credentials in deployment scripts
|
|
52
|
+
|
|
53
|
+
## Cross-Skill References
|
|
54
|
+
|
|
55
|
+
- **OBS artifact storage**: See `huawei-obs`
|
|
56
|
+
- **ECS deployment target**: See `huawei-ecs`
|
|
57
|
+
- **IAM permissions**: See `huawei-iam`
|
|
@@ -1,97 +1,106 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: huawei-dew
|
|
3
|
-
description:
|
|
4
|
-
version: 1
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Huawei Cloud DEW (Data Encryption Workshop)
|
|
8
|
-
|
|
9
|
-
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
-
|
|
11
|
-
Always run `hcloud <Service> <Operation> --help` before constructing commands to discover exact parameter names and requirements.
|
|
12
|
-
|
|
13
|
-
## Overview
|
|
14
|
-
|
|
15
|
-
Domain expertise for Huawei Cloud Data Encryption Workshop (DEW). Covers CSMS for secret lifecycle management, KMS for encryption key management, credential rotation, and secure application integration patterns.
|
|
16
|
-
|
|
17
|
-
## Critical Warnings
|
|
18
|
-
|
|
19
|
-
| Trap
|
|
20
|
-
|
|
21
|
-
| NEVER fetch secret values into agent context | Use {{resolve:csms:secret-id:SecretString:key}} runtime injection
|
|
22
|
-
| NEVER echo credentials in conversation
|
|
23
|
-
| KMS key deletion is irreversible
|
|
24
|
-
| Secret rotation requires automation
|
|
25
|
-
| Cross-account KMS needs grants
|
|
26
|
-
|
|
27
|
-
## CSMS Operations
|
|
28
|
-
|
|
29
|
-
### Read-only (safe — metadata only)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
#
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
##
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
##
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
1
|
+
---
|
|
2
|
+
name: huawei-dew
|
|
3
|
+
description: 'Use when managing secrets, credentials, encryption keys, certificates, or any sensitive data on Huawei Cloud. Covers CSMS (Cloud Secret Management Service) for secrets, KMS for encryption keys, and credential rotation. Triggers on: secret, credential, API key, token, password, encrypt, decrypt, KMS, CSMS, DEW, certificate, CSR, rotation. Activates for ANY task involving secrets or credentials — load this skill first before touching secrets.'
|
|
4
|
+
version: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Huawei Cloud DEW (Data Encryption Workshop)
|
|
8
|
+
|
|
9
|
+
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
+
|
|
11
|
+
Always run `hcloud <Service> <Operation> --help` before constructing commands to discover exact parameter names and requirements.
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
Domain expertise for Huawei Cloud Data Encryption Workshop (DEW). Covers CSMS for secret lifecycle management, KMS for encryption key management, credential rotation, and secure application integration patterns.
|
|
16
|
+
|
|
17
|
+
## Critical Warnings
|
|
18
|
+
|
|
19
|
+
| Trap | Why |
|
|
20
|
+
| -------------------------------------------- | ------------------------------------------------------------------ |
|
|
21
|
+
| NEVER fetch secret values into agent context | Use {{resolve:csms:secret-id:SecretString:key}} runtime injection |
|
|
22
|
+
| NEVER echo credentials in conversation | AK/SK, passwords, tokens must never appear in chat |
|
|
23
|
+
| KMS key deletion is irreversible | 7-30 day pending deletion window. Once gone, data is unrecoverable |
|
|
24
|
+
| Secret rotation requires automation | Manual rotation risks stale credentials |
|
|
25
|
+
| Cross-account KMS needs grants | KMS keys are regional. Cross-region data needs grant setup |
|
|
26
|
+
|
|
27
|
+
## CSMS Operations
|
|
28
|
+
|
|
29
|
+
### Read-only (safe — metadata only)
|
|
30
|
+
|
|
31
|
+
| Operation | Description |
|
|
32
|
+
| ------------------ | ------------------------------------------------------ |
|
|
33
|
+
| ListSecrets | List all secrets (names only, no values) |
|
|
34
|
+
| DescribeSecret | Get secret metadata (rotation config, KMS key, status) |
|
|
35
|
+
| ListSecretVersions | List version IDs and stages (no values) |
|
|
36
|
+
|
|
37
|
+
### Secret Value (blocked by policy — use runtime injection)
|
|
38
|
+
|
|
39
|
+
| Operation | Safe Alternative |
|
|
40
|
+
| ----------------- | --------------------------------------------- |
|
|
41
|
+
| DownloadSecret | Use {{resolve:csms:secret-id}} in IaC or SDK |
|
|
42
|
+
| ShowSecretVersion | Use runtime injection, never in agent context |
|
|
43
|
+
| GetSecretValue | Blocked. Use MCP proxy resolve pattern |
|
|
44
|
+
|
|
45
|
+
## KMS Operations
|
|
46
|
+
|
|
47
|
+
| Task | Command | Notes |
|
|
48
|
+
| ---------- | ------------------------------------------------------ | -------------------------- |
|
|
49
|
+
| List keys | hcloud KMS ListKeys | Read-only |
|
|
50
|
+
| Create key | hcloud KMS CreateKey --key_alias=<name> | Requires write approval |
|
|
51
|
+
| Encrypt | hcloud KMS EncryptData --key_id=<id> --plaintext=<b64> | Prefer SDK offline encrypt |
|
|
52
|
+
| Decrypt | hcloud KMS DecryptData (**BLOCKED**) | Use runtime injection |
|
|
53
|
+
|
|
54
|
+
## Runtime Injection Pattern
|
|
55
|
+
|
|
56
|
+
`ash
|
|
57
|
+
|
|
58
|
+
# Terraform / IaC
|
|
59
|
+
|
|
60
|
+
resource "huaweicloud_csms_secret" "db_password" {
|
|
61
|
+
secret_string = var.db_password # NEVER hardcode
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
# SDK
|
|
65
|
+
|
|
66
|
+
secret_value = client.get_secret(secret_id="my-secret")
|
|
67
|
+
|
|
68
|
+
# Use immediately, never print or store in context
|
|
69
|
+
|
|
70
|
+
# hcloud (for approved automation only)
|
|
71
|
+
|
|
72
|
+
hcloud CSMS DownloadSecret --secret_name=<name>
|
|
73
|
+
|
|
74
|
+
# WARNING: Output goes to stdout. Pipe directly, never capture in agent.
|
|
75
|
+
|
|
76
|
+
`
|
|
77
|
+
|
|
78
|
+
## Troubleshooting
|
|
79
|
+
|
|
80
|
+
| Error | Root Cause -> Fix |
|
|
81
|
+
| -------------------- | --------------------------------------------------------------------------- |
|
|
82
|
+
| Secret not found | Wrong region or project -> Verify secret ARN includes region/project |
|
|
83
|
+
| AccessDenied on CSMS | Missing IAM CSMS policy -> Add csms:DescribeSecret + kms:Decrypt |
|
|
84
|
+
| KMS key disabled | Key scheduled for deletion or manually disabled -> Enable or create new key |
|
|
85
|
+
| Rotation stuck | Lambda/Python function error -> Check rotation function logs |
|
|
86
|
+
|
|
87
|
+
## Security Considerations
|
|
88
|
+
|
|
89
|
+
- MUST use runtime injection. NEVER fetch secrets into agent context
|
|
90
|
+
- MUST rotate credentials every 90 days
|
|
91
|
+
- MUST enable automatic rotation for CSMS secrets
|
|
92
|
+
- MUST audit KMS key usage via CTS
|
|
93
|
+
- SHOULD use customer-managed keys (CMK) for sensitive data
|
|
94
|
+
- MUST NOT use default KMS keys for production workloads
|
|
95
|
+
|
|
96
|
+
## MCP Tools
|
|
97
|
+
|
|
98
|
+
- huaweicloud_list_operations service=DEW or CSMS or KMS
|
|
99
|
+
- huaweicloud_run_readonly_command for ListSecrets/ListKeys (metadata only)
|
|
100
|
+
- huaweicloud_safety policy blocks all secret value reads
|
|
101
|
+
|
|
102
|
+
## References
|
|
103
|
+
|
|
104
|
+
- DEW Docs: https://support.huaweicloud.com/dew/
|
|
105
|
+
- CSMS usage: references/csms-usage.md
|
|
106
|
+
- KMS usage: references/kms-usage.md
|
|
@@ -1,29 +1,36 @@
|
|
|
1
|
-
# CSMS Usage Guide
|
|
2
|
-
|
|
3
|
-
## Create Secret
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
hcloud CSMS
|
|
14
|
-
|
|
15
|
-
##
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- hcloud CSMS
|
|
29
|
-
-
|
|
1
|
+
# CSMS Usage Guide
|
|
2
|
+
|
|
3
|
+
## Create Secret
|
|
4
|
+
|
|
5
|
+
hcloud CSMS CreateSecret --secret_name=prod-db-password --secret_string='{"password":"CHANGE_ME"}'
|
|
6
|
+
|
|
7
|
+
## List Secrets (metadata only)
|
|
8
|
+
|
|
9
|
+
hcloud CSMS ListSecrets
|
|
10
|
+
|
|
11
|
+
## Describe Secret
|
|
12
|
+
|
|
13
|
+
hcloud CSMS DescribeSecret --secret_name=prod-db-password
|
|
14
|
+
|
|
15
|
+
## List Versions
|
|
16
|
+
|
|
17
|
+
hcloud CSMS ListSecretVersions --secret_name=prod-db-password
|
|
18
|
+
|
|
19
|
+
## Runtime Injection (Terraform)
|
|
20
|
+
|
|
21
|
+
data "huaweicloud_csms_secret" "db" {
|
|
22
|
+
secret_name = "prod-db-password"
|
|
23
|
+
}
|
|
24
|
+
Use: data.huaweicloud_csms_secret.db.secret_string
|
|
25
|
+
|
|
26
|
+
## Rotation
|
|
27
|
+
|
|
28
|
+
- Enable auto-rotation: hcloud CSMS EnableSecretRotation --secret_name=<name> --rotation_interval=30
|
|
29
|
+
- Rotation function ARN: provide Lambda to generate new secret value
|
|
30
|
+
|
|
31
|
+
## Policy Rules
|
|
32
|
+
|
|
33
|
+
- hcloud CSMS DownloadSecret -> BLOCKED (use runtime injection)
|
|
34
|
+
- hcloud CSMS ShowSecretVersion -> BLOCKED
|
|
35
|
+
- hcloud CSMS ListSecrets -> ALLOWED (metadata only)
|
|
36
|
+
- hcloud CSMS DescribeSecret -> ALLOWED (metadata only)
|
|
@@ -1,23 +1,29 @@
|
|
|
1
|
-
# KMS Usage Guide
|
|
2
|
-
|
|
3
|
-
## Create Key
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
## Key
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
1
|
+
# KMS Usage Guide
|
|
2
|
+
|
|
3
|
+
## Create Key
|
|
4
|
+
|
|
5
|
+
hcloud KMS CreateKey --key_alias=app-encryption-key --key_description="Application data encryption"
|
|
6
|
+
|
|
7
|
+
## List Keys (metadata only)
|
|
8
|
+
|
|
9
|
+
hcloud KMS ListKeys
|
|
10
|
+
|
|
11
|
+
## Encrypt (offline preferred)
|
|
12
|
+
|
|
13
|
+
hcloud KMS EncryptData --key_id=<key-id> --plaintext=<base64-data>
|
|
14
|
+
|
|
15
|
+
## Decrypt (BLOCKED - use runtime)
|
|
16
|
+
|
|
17
|
+
DO NOT use hcloud KMS DecryptData directly.
|
|
18
|
+
Use SDK with KMS client in application runtime.
|
|
19
|
+
|
|
20
|
+
## Key Rotation
|
|
21
|
+
|
|
22
|
+
- Enable: hcloud KMS EnableKeyRotation --key_id=<key-id>
|
|
23
|
+
- Rotation period: 365 days (default)
|
|
24
|
+
|
|
25
|
+
## Key Deletion
|
|
26
|
+
|
|
27
|
+
- Schedule: hcloud KMS ScheduleKeyDeletion --key_id=<key-id> --pending_days=7
|
|
28
|
+
- Cancel during pending window: hcloud KMS CancelKeyDeletion --key_id=<key-id>
|
|
29
|
+
- WARNING: After deletion window passes, data encrypted with this key is UNRECOVERABLE
|