@huawei-iac-tools/landingzone-workbench 0.0.0-stage → 0.0.1
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/LICENSE +201 -0
- package/README.md +85 -2
- package/cordis.patch.yml +21 -0
- package/knowledge/account-qualification.md +128 -0
- package/knowledge/blueprints/_base/blueprint.json +481 -0
- package/knowledge/blueprints/_base/defaults.json +127 -0
- package/knowledge/blueprints/foundation-lz/blueprint.json +43 -0
- package/knowledge/blueprints/foundation-lz/defaults.json +47 -0
- package/knowledge/blueprints/full-lz/blueprint.json +11 -0
- package/knowledge/blueprints/full-lz/defaults.json +8 -0
- package/knowledge/config.json +43 -0
- package/knowledge/error-rules.json +14 -0
- package/knowledge/ic-policies.json +21 -0
- package/knowledge/modules/account-structure.md +101 -0
- package/knowledge/modules/compliance/config-rms.md +212 -0
- package/knowledge/modules/compliance/cts.md +179 -0
- package/knowledge/modules/compliance/obs-lts.md +155 -0
- package/knowledge/modules/ic-policies.json +21 -0
- package/knowledge/modules/identity-center.md +603 -0
- package/knowledge/modules/module-layers.md +169 -0
- package/knowledge/modules/network/er.md +222 -0
- package/knowledge/modules/network/nat-eip.md +123 -0
- package/knowledge/modules/network/ram-share.md +92 -0
- package/knowledge/modules/network/vpc-subnet.md +142 -0
- package/knowledge/modules/organization-security/scp.md +122 -0
- package/knowledge/modules/organizations.md +212 -0
- package/knowledge/modules/recommended-config.md +157 -0
- package/knowledge/modules/recommended-rules.json +175 -0
- package/knowledge/modules/scp-policies.json +111 -0
- package/knowledge/modules/security/aad.md +94 -0
- package/knowledge/modules/security/cfw.md +105 -0
- package/knowledge/modules/security/waf.md +110 -0
- package/knowledge/param-mappings.json +133 -0
- package/knowledge/prompts.md +83 -0
- package/knowledge/resource-types.json +1162 -0
- package/knowledge/scp-policies.json +111 -0
- package/knowledge/state-machine.md +33 -0
- package/lib/client.js +21 -0
- package/lib/index.js +28592 -0
- package/lib/types/account-role.d.ts +19 -0
- package/lib/types/account-scope.d.ts +10 -0
- package/lib/types/agency.d.ts +38 -0
- package/lib/types/client/DropdownSelect.d.ts +49 -0
- package/lib/types/client/LoginGate.d.ts +20 -0
- package/lib/types/client/PanelIcon.d.ts +11 -0
- package/lib/types/client/WorkbenchShell.d.ts +21 -0
- package/lib/types/client/account-role.d.ts +15 -0
- package/lib/types/client/credential-status.d.ts +15 -0
- package/lib/types/client/huawei-mark.d.ts +37 -0
- package/lib/types/client/index.d.ts +26 -0
- package/lib/types/client/layout-ref.d.ts +23 -0
- package/lib/types/client/pages/ConfigPage/AdviceCard.d.ts +26 -0
- package/lib/types/client/pages/ConfigPage/AuditBar.d.ts +21 -0
- package/lib/types/client/pages/ConfigPage/ChangeSummaryCard.d.ts +22 -0
- package/lib/types/client/pages/ConfigPage/ChangesCard.d.ts +27 -0
- package/lib/types/client/pages/ConfigPage/ComplianceDetail.d.ts +25 -0
- package/lib/types/client/pages/ConfigPage/ComplianceSummaryCard.d.ts +31 -0
- package/lib/types/client/pages/ConfigPage/FindingsCard.d.ts +21 -0
- package/lib/types/client/pages/ConfigPage/GlossaryDrawer.d.ts +17 -0
- package/lib/types/client/pages/ConfigPage/OrgComplianceDetail.d.ts +15 -0
- package/lib/types/client/pages/ConfigPage/Pager.d.ts +32 -0
- package/lib/types/client/pages/ConfigPage/ResourceDrawer.d.ts +26 -0
- package/lib/types/client/pages/ConfigPage/ResourcesTable.d.ts +35 -0
- package/lib/types/client/pages/ConfigPage/RollupPanel.d.ts +17 -0
- package/lib/types/client/pages/ConfigPage/RuleDetailDrawer.d.ts +23 -0
- package/lib/types/client/pages/ConfigPage/StatusCards.d.ts +26 -0
- package/lib/types/client/pages/ConfigPage/UncoveredDialog.d.ts +22 -0
- package/lib/types/client/pages/ConfigPage/config-api.d.ts +101 -0
- package/lib/types/client/pages/ConfigPage/config-store.d.ts +57 -0
- package/lib/types/client/pages/ConfigPage/index.d.ts +21 -0
- package/lib/types/client/pages/ConfigPage/paging.d.ts +46 -0
- package/lib/types/client/pages/ConfigPage/scope-options.d.ts +51 -0
- package/lib/types/client/pages/CostPage/AccountAllocation.d.ts +24 -0
- package/lib/types/client/pages/CostPage/AccountBars.d.ts +20 -0
- package/lib/types/client/pages/CostPage/AccountColumns.d.ts +24 -0
- package/lib/types/client/pages/CostPage/AccountDonut.d.ts +18 -0
- package/lib/types/client/pages/CostPage/AccountSwitcher.d.ts +25 -0
- package/lib/types/client/pages/CostPage/AdviceCard.d.ts +43 -0
- package/lib/types/client/pages/CostPage/AdviceFindings.d.ts +43 -0
- package/lib/types/client/pages/CostPage/BillingPanels.d.ts +23 -0
- package/lib/types/client/pages/CostPage/BudgetCard.d.ts +36 -0
- package/lib/types/client/pages/CostPage/GlossaryDrawer.d.ts +16 -0
- package/lib/types/client/pages/CostPage/KpiRow.d.ts +23 -0
- package/lib/types/client/pages/CostPage/MarkdownBlock.d.ts +16 -0
- package/lib/types/client/pages/CostPage/ReportView.d.ts +17 -0
- package/lib/types/client/pages/CostPage/ResourceColumns.d.ts +19 -0
- package/lib/types/client/pages/CostPage/ResourceDonut.d.ts +18 -0
- package/lib/types/client/pages/CostPage/ResourcesCard.d.ts +40 -0
- package/lib/types/client/pages/CostPage/RuleDetailDrawer.d.ts +23 -0
- package/lib/types/client/pages/CostPage/SavingView.d.ts +38 -0
- package/lib/types/client/pages/CostPage/ServiceDonut.d.ts +17 -0
- package/lib/types/client/pages/CostPage/TrendChart.d.ts +24 -0
- package/lib/types/client/pages/CostPage/budget-input.d.ts +30 -0
- package/lib/types/client/pages/CostPage/cost-api.d.ts +266 -0
- package/lib/types/client/pages/CostPage/cost-store.d.ts +25 -0
- package/lib/types/client/pages/CostPage/format.d.ts +37 -0
- package/lib/types/client/pages/CostPage/index.d.ts +34 -0
- package/lib/types/client/pages/CostPage/trend-fold.d.ts +32 -0
- package/lib/types/client/pages/CostPage/useEcharts.d.ts +70 -0
- package/lib/types/client/pages/OrgStructurePage/AccountStatsCard.d.ts +22 -0
- package/lib/types/client/pages/OrgStructurePage/CoreAccountsCard.d.ts +18 -0
- package/lib/types/client/pages/OrgStructurePage/CreateAccountDialog.d.ts +28 -0
- package/lib/types/client/pages/OrgStructurePage/ManageUsersDialog.d.ts +28 -0
- package/lib/types/client/pages/OrgStructurePage/MemberAccountsTable.d.ts +32 -0
- package/lib/types/client/pages/OrgStructurePage/MoveAccountDialog.d.ts +29 -0
- package/lib/types/client/pages/OrgStructurePage/OrgGlossaryDrawer.d.ts +13 -0
- package/lib/types/client/pages/OrgStructurePage/OrgTreeCard.d.ts +31 -0
- package/lib/types/client/pages/OrgStructurePage/index.d.ts +21 -0
- package/lib/types/client/pages/OrgStructurePage/org-api.d.ts +166 -0
- package/lib/types/client/pages/OverviewPage/AnchorRow.d.ts +24 -0
- package/lib/types/client/pages/OverviewPage/AttentionList.d.ts +29 -0
- package/lib/types/client/pages/OverviewPage/OverviewCharts.d.ts +79 -0
- package/lib/types/client/pages/OverviewPage/OverviewGlossaryDrawer.d.ts +15 -0
- package/lib/types/client/pages/OverviewPage/index.d.ts +22 -0
- package/lib/types/client/pages/OverviewPage/overview-api.d.ts +115 -0
- package/lib/types/client/pages/ResourcePage/AccountResourceList.d.ts +21 -0
- package/lib/types/client/pages/ResourcePage/components/GlossaryDrawer.d.ts +20 -0
- package/lib/types/client/pages/ResourcePage/components/MetricCards.d.ts +19 -0
- package/lib/types/client/pages/ResourcePage/components/MultiSelect.d.ts +27 -0
- package/lib/types/client/pages/ResourcePage/components/PanelPager.d.ts +26 -0
- package/lib/types/client/pages/ResourcePage/components/RankBars.d.ts +25 -0
- package/lib/types/client/pages/ResourcePage/components/ScopeSelect.d.ts +27 -0
- package/lib/types/client/pages/ResourcePage/components/SourceConfigModal.d.ts +21 -0
- package/lib/types/client/pages/ResourcePage/components/SyncControls.d.ts +18 -0
- package/lib/types/client/pages/ResourcePage/components/TrendChart.d.ts +14 -0
- package/lib/types/client/pages/ResourcePage/components/useColumnWidths.d.ts +12 -0
- package/lib/types/client/pages/ResourcePage/format.d.ts +9 -0
- package/lib/types/client/pages/ResourcePage/index.d.ts +20 -0
- package/lib/types/client/pages/ResourcePage/summary-api.d.ts +205 -0
- package/lib/types/client/pages/SetupPage/AskPanel.d.ts +21 -0
- package/lib/types/client/pages/SetupPage/ChatEmbed.d.ts +40 -0
- package/lib/types/client/pages/SetupPage/ChatTab.d.ts +17 -0
- package/lib/types/client/pages/SetupPage/FormTab.d.ts +12 -0
- package/lib/types/client/pages/SetupPage/FormTabV2.d.ts +14 -0
- package/lib/types/client/pages/SetupPage/ProgressTreeView.d.ts +15 -0
- package/lib/types/client/pages/SetupPage/StageFlow.d.ts +16 -0
- package/lib/types/client/pages/SetupPage/index.d.ts +10 -0
- package/lib/types/client/pages/SetupPage/progress-types.d.ts +36 -0
- package/lib/types/client/pages/SetupPage/session-binding.d.ts +38 -0
- package/lib/types/client/pages/SetupPage/session-store.d.ts +57 -0
- package/lib/types/client/pages/SetupPage/sessions-ref.d.ts +5 -0
- package/lib/types/client/pages/SetupPage/setup-replan.d.ts +13 -0
- package/lib/types/client/pages/SetupPage/wb-api.d.ts +192 -0
- package/lib/types/client/pages/list-preview.d.ts +36 -0
- package/lib/types/client/permission-mode.d.ts +53 -0
- package/lib/types/client/store.d.ts +22 -0
- package/lib/types/collect.d.ts +78 -0
- package/lib/types/config/account-scope.d.ts +61 -0
- package/lib/types/config/advice-findings.d.ts +31 -0
- package/lib/types/config/advice-prompt.d.ts +60 -0
- package/lib/types/config/advice.d.ts +116 -0
- package/lib/types/config/cts.d.ts +30 -0
- package/lib/types/config/evidence/rules.d.ts +31 -0
- package/lib/types/config/evidence/types.d.ts +103 -0
- package/lib/types/config/failure-note.d.ts +46 -0
- package/lib/types/config/fingerprint-cache.d.ts +45 -0
- package/lib/types/config/identity.d.ts +67 -0
- package/lib/types/config/query.d.ts +49 -0
- package/lib/types/config/rms.d.ts +412 -0
- package/lib/types/config/routes.d.ts +32 -0
- package/lib/types/config/types.d.ts +785 -0
- package/lib/types/config/views.d.ts +158 -0
- package/lib/types/cost/accounts.d.ts +29 -0
- package/lib/types/cost/advice-findings.d.ts +77 -0
- package/lib/types/cost/advice-model.d.ts +19 -0
- package/lib/types/cost/advice-prompt.d.ts +73 -0
- package/lib/types/cost/advice-subagent-types.d.ts +6 -0
- package/lib/types/cost/advice-subagent.d.ts +116 -0
- package/lib/types/cost/advice-types.d.ts +63 -0
- package/lib/types/cost/advice.d.ts +125 -0
- package/lib/types/cost/aggregate.d.ts +157 -0
- package/lib/types/cost/assume.d.ts +43 -0
- package/lib/types/cost/bss.d.ts +166 -0
- package/lib/types/cost/budget-overview.d.ts +38 -0
- package/lib/types/cost/budget.d.ts +56 -0
- package/lib/types/cost/cache.d.ts +58 -0
- package/lib/types/cost/caliber.d.ts +40 -0
- package/lib/types/cost/console-links.d.ts +27 -0
- package/lib/types/cost/credentials.d.ts +38 -0
- package/lib/types/cost/data-window.d.ts +38 -0
- package/lib/types/cost/evidence/catalog.d.ts +35 -0
- package/lib/types/cost/evidence/index.d.ts +70 -0
- package/lib/types/cost/evidence/inventory.d.ts +44 -0
- package/lib/types/cost/evidence/pricing.d.ts +72 -0
- package/lib/types/cost/evidence/projects.d.ts +18 -0
- package/lib/types/cost/evidence/rules.d.ts +66 -0
- package/lib/types/cost/evidence/state.d.ts +38 -0
- package/lib/types/cost/evidence/thresholds.d.ts +68 -0
- package/lib/types/cost/evidence/types.d.ts +288 -0
- package/lib/types/cost/evidence/utilization.d.ts +37 -0
- package/lib/types/cost/history.d.ts +36 -0
- package/lib/types/cost/ledger.d.ts +97 -0
- package/lib/types/cost/normalize.d.ts +37 -0
- package/lib/types/cost/period-projection.d.ts +57 -0
- package/lib/types/cost/plan-check.d.ts +102 -0
- package/lib/types/cost/plan-db.d.ts +73 -0
- package/lib/types/cost/plan-types.d.ts +183 -0
- package/lib/types/cost/plan.d.ts +63 -0
- package/lib/types/cost/quote.d.ts +45 -0
- package/lib/types/cost/report.d.ts +136 -0
- package/lib/types/cost/resources.d.ts +108 -0
- package/lib/types/cost/routes.d.ts +38 -0
- package/lib/types/cost/scope.d.ts +42 -0
- package/lib/types/cost/types.d.ts +335 -0
- package/lib/types/cost/unit-prices-derive.d.ts +19 -0
- package/lib/types/cost/unit-prices.d.ts +23 -0
- package/lib/types/db.d.ts +228 -0
- package/lib/types/host-log.d.ts +7 -0
- package/lib/types/http.d.ts +42 -0
- package/lib/types/index.d.ts +30 -0
- package/lib/types/inventory.d.ts +286 -0
- package/lib/types/obs.d.ts +16 -0
- package/lib/types/org/aggregate.d.ts +36 -0
- package/lib/types/org/churn.d.ts +10 -0
- package/lib/types/org/orgs.d.ts +258 -0
- package/lib/types/org/routes.d.ts +28 -0
- package/lib/types/org-types.d.ts +156 -0
- package/lib/types/per-service.d.ts +39 -0
- package/lib/types/setup/blueprint-loader.d.ts +81 -0
- package/lib/types/setup/caller.d.ts +105 -0
- package/lib/types/setup/engine.d.ts +41 -0
- package/lib/types/setup/form-store.d.ts +13 -0
- package/lib/types/setup/nodes/n1-check.d.ts +14 -0
- package/lib/types/setup/nodes/n10-governance.d.ts +6 -0
- package/lib/types/setup/nodes/n11-infra.d.ts +6 -0
- package/lib/types/setup/nodes/n12-reconcile.d.ts +6 -0
- package/lib/types/setup/nodes/n2-region.d.ts +6 -0
- package/lib/types/setup/nodes/n3-blueprint.d.ts +6 -0
- package/lib/types/setup/nodes/n4-modules.d.ts +6 -0
- package/lib/types/setup/nodes/n5-details.d.ts +6 -0
- package/lib/types/setup/nodes/n6-plan.d.ts +6 -0
- package/lib/types/setup/nodes/n7-verify.d.ts +6 -0
- package/lib/types/setup/nodes/n8-approve.d.ts +6 -0
- package/lib/types/setup/nodes/n9-buildmode.d.ts +6 -0
- package/lib/types/setup/plan-state.d.ts +10 -0
- package/lib/types/setup/prompt-loader.d.ts +16 -0
- package/lib/types/setup/routes.d.ts +22 -0
- package/lib/types/setup/session-notify.d.ts +30 -0
- package/lib/types/setup/tools.d.ts +19 -0
- package/lib/types/setup/types.d.ts +157 -0
- package/lib/types/sse-bus.d.ts +23 -0
- package/lib/types/tools/config-facts.d.ts +16 -0
- package/lib/types/tools/cost-facts.d.ts +10 -0
- package/lib/types/tools/register.d.ts +18 -0
- package/lib/types/wb-conventions.d.ts +140 -0
- package/package.json +77 -4
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "recommended-rules-v1",
|
|
3
|
+
"description": "各交互点推荐值(唯一来源)。2026-11-13 从 interaction-config.md 拆出(交互选项与推荐值分离;SCP 策略全文只在 scp-policies.json,以 ref 引用)。planner.ts getModuleRecommendedConfig 消费 P1-4_* 键;P1-1/P1-2/P1-3/P1-5 为设计基准值留档(运行时各自由 dimensions.md/prompts.md 驱动)。改推荐值 → 只改本文件。",
|
|
4
|
+
"interactions": {
|
|
5
|
+
"P1-1_region": {
|
|
6
|
+
"recommended": "cn-north-4"
|
|
7
|
+
},
|
|
8
|
+
"P1-2_direction": {
|
|
9
|
+
"recommended": "standard"
|
|
10
|
+
},
|
|
11
|
+
"P1-3_modules": {
|
|
12
|
+
"recommended": {
|
|
13
|
+
"base": ["organization", "ou_structure", "accounts", "trusted_services"],
|
|
14
|
+
"enhanced": [],
|
|
15
|
+
"extended": []
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
"P1-4_ou_structure": {
|
|
20
|
+
"recommended": {
|
|
21
|
+
"root": { "code": "root", "label": "组织根(Root)" },
|
|
22
|
+
"ous": [
|
|
23
|
+
{ "code": "coreOu", "name": "Core", "dependsOn": ["root"] },
|
|
24
|
+
{ "code": "applicationsOu", "name": "Applications", "dependsOn": ["root"] }
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
"P1-4_accounts": {
|
|
30
|
+
"recommended": {
|
|
31
|
+
"buildDebugAccounts": true,
|
|
32
|
+
"accountNames": {
|
|
33
|
+
"sharedServicesAccount": { "name": "es_SharedServices_test5", "ou": "coreOu", "displayName": "共享服务账号" },
|
|
34
|
+
"logArchiveAccount": { "name": "es_LogArchive_test5", "ou": "coreOu", "displayName": "日志归档账号" },
|
|
35
|
+
"securityAccount": { "name": "es_SecurityServices_test5", "ou": "coreOu", "displayName": "安全服务账号" },
|
|
36
|
+
"opsAccount": { "name": "es_OpsService_test5", "ou": "applicationsOu", "displayName": "运维账号" },
|
|
37
|
+
"devAccount": { "name": "es_DailyService_test5", "ou": "applicationsOu", "displayName": "测试账号" },
|
|
38
|
+
"prodAccount": { "name": "es_ProdService_test5", "ou": "applicationsOu", "displayName": "生产账号" }
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
"P1-4_trusted_services": {
|
|
44
|
+
"recommended": {
|
|
45
|
+
"services": [
|
|
46
|
+
{ "code": "ctsTrustedService", "label": "CTS 可信服务", "dependsOn": ["root"], "servicePrincipal": "service.CTS" },
|
|
47
|
+
{ "code": "configTrustedService", "label": "Config 可信服务", "dependsOn": ["root"], "servicePrincipal": "service.RMSMultiAccountSetup" },
|
|
48
|
+
{ "code": "icTrustedService", "label": "IC 可信服务", "dependsOn": ["root"], "servicePrincipal": "service.IdentityCenter" }
|
|
49
|
+
],
|
|
50
|
+
"delegatedAdmins": [
|
|
51
|
+
{ "code": "ctsDelegatedAdmin", "label": "CTS 委托管理员(LogArchive账号)", "dependsOn": ["ctsTrustedService", "logArchiveAccount"], "servicePrincipal": "service.CTS", "delegateTo": "logArchiveAccount" },
|
|
52
|
+
{ "code": "configDelegatedAdmin", "label": "Config 委托管理员(Security账号)", "dependsOn": ["configTrustedService", "securityAccount"], "servicePrincipal": "service.RMSMultiAccountSetup", "delegateTo": "securityAccount" }
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
"P1-4_identity_center": {
|
|
58
|
+
"recommended": {
|
|
59
|
+
"identitySource": "local",
|
|
60
|
+
"alias": "landingzone-ic",
|
|
61
|
+
"instance": { "code": "icInstance", "label": "Identity Center 实例", "dependsOn": ["icTrustedService"] },
|
|
62
|
+
"users": [
|
|
63
|
+
{ "code": "lzadminUser", "label": "IC 用户 lzadmin", "dependsOn": ["icInstance"], "userName": "lzadmin", "displayName": "LZ Admin", "email": "", "passwordMode": "EMAIL", "name": { "family_name": "Admin", "given_name": "LZ" } }
|
|
64
|
+
],
|
|
65
|
+
"groups": [
|
|
66
|
+
{ "code": "lzAdminGroup", "label": "IC 组 LZ-Administrators", "dependsOn": ["icInstance"], "name": "LZ-Administrators", "members": ["lzadminUser"] }
|
|
67
|
+
],
|
|
68
|
+
"memberships": [
|
|
69
|
+
{ "code": "lzadminLzAdminMembership", "label": "lzadminUser 加入 LZ-Administrators", "dependsOn": ["lzAdminGroup", "lzadminUser"], "group": "lzAdminGroup", "member": "lzadminUser" }
|
|
70
|
+
],
|
|
71
|
+
"permissionSets": [
|
|
72
|
+
{ "code": "lzReadOnlyPs", "label": "权限集 LZ-ReadOnly", "dependsOn": ["icInstance"], "name": "LZ-ReadOnly", "policies": { "ref": "ic-policies.json" } }
|
|
73
|
+
],
|
|
74
|
+
"assignments": [
|
|
75
|
+
{ "code": "lzReadOnlyLzAdminSharedAssign", "label": "账号分配:sharedServicesAccount", "dependsOn": ["lzReadOnlyPs", "lzAdminGroup", "sharedServicesAccount"], "permissionSet": "lzReadOnlyPs", "group": "lzAdminGroup", "account": "sharedServicesAccount" },
|
|
76
|
+
{ "code": "lzReadOnlyLzAdminLogArchiveAssign", "label": "账号分配:logArchiveAccount", "dependsOn": ["lzReadOnlyPs", "lzAdminGroup", "logArchiveAccount"], "permissionSet": "lzReadOnlyPs", "group": "lzAdminGroup", "account": "logArchiveAccount" },
|
|
77
|
+
{ "code": "lzReadOnlyLzAdminSecurityAssign", "label": "账号分配:securityAccount", "dependsOn": ["lzReadOnlyPs", "lzAdminGroup", "securityAccount"], "permissionSet": "lzReadOnlyPs", "group": "lzAdminGroup", "account": "securityAccount" },
|
|
78
|
+
{ "code": "lzReadOnlyLzAdminOpsAssign", "label": "账号分配:opsAccount", "dependsOn": ["lzReadOnlyPs", "lzAdminGroup", "opsAccount"], "permissionSet": "lzReadOnlyPs", "group": "lzAdminGroup", "account": "opsAccount" },
|
|
79
|
+
{ "code": "lzReadOnlyLzAdminDevAssign", "label": "账号分配:devAccount", "dependsOn": ["lzReadOnlyPs", "lzAdminGroup", "devAccount"], "permissionSet": "lzReadOnlyPs", "group": "lzAdminGroup", "account": "devAccount" },
|
|
80
|
+
{ "code": "lzReadOnlyLzAdminProdAssign", "label": "账号分配:prodAccount", "dependsOn": ["lzReadOnlyPs", "lzAdminGroup", "prodAccount"], "permissionSet": "lzReadOnlyPs", "group": "lzAdminGroup", "account": "prodAccount" }
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
"P1-4_audit_logging": {
|
|
86
|
+
"recommended": {
|
|
87
|
+
"trustAgency": {
|
|
88
|
+
"code": "configTrustAgency", "label": "Config 信任委托(rms_tracker_trust_agency)",
|
|
89
|
+
"dependsOn": [], "name": "rms_tracker_trust_agency"
|
|
90
|
+
},
|
|
91
|
+
"obsBucket": {
|
|
92
|
+
"code": "configObsBucket", "label": "OBS 桶(config-bucket-{domainId})",
|
|
93
|
+
"dependsOn": [], "name": "config-bucket-{domainId}", "account": "logArchiveAccount"
|
|
94
|
+
},
|
|
95
|
+
"ctsTracker": {
|
|
96
|
+
"code": "ctsTracker", "label": "CTS 组织追踪器",
|
|
97
|
+
"dependsOn": ["configObsBucket", "ctsDelegatedAdmin"],
|
|
98
|
+
"bucketRef": "configObsBucket", "ctsBucketName": "obs-cts-{domainId}", "trailName": "system", "account": "logArchiveAccount"
|
|
99
|
+
},
|
|
100
|
+
"configRecorder": {
|
|
101
|
+
"code": "configRecorder", "label": "Config 资源记录器",
|
|
102
|
+
"dependsOn": ["configTrustAgency", "configObsBucket"],
|
|
103
|
+
"agencyName": "rms_tracker_trust_agency", "bucketRef": "configObsBucket"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
"P1-4_scp": {
|
|
109
|
+
"recommended": { "ref": "scp-policies.json" }
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
"P1-4_vpc_network": {
|
|
113
|
+
"recommended": {
|
|
114
|
+
"networkTopology": "multi-vpc",
|
|
115
|
+
"ram": { "code": "ramOrgShare", "label": "RAM 组织共享", "dependsOn": ["root"] },
|
|
116
|
+
"vpcs": [
|
|
117
|
+
{ "code": "sharedVpc", "label": "共享 VPC", "dependsOn": ["sharedServicesAccount"], "account": "sharedServicesAccount", "cidr": "10.0.0.0/16",
|
|
118
|
+
"subnets": [
|
|
119
|
+
{ "code": "subnetSharedErA", "label": "Shared ER 接入子网 A", "dependsOn": ["sharedVpc"], "name": "subnet-shared-er-a", "cidr": "10.0.0.8/29", "azIndex": 0 },
|
|
120
|
+
{ "code": "subnetSharedErB", "label": "Shared ER 接入子网 B", "dependsOn": ["sharedVpc"], "name": "subnet-shared-er-b", "cidr": "10.0.0.16/29", "azIndex": 1 }
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
{ "code": "devVpc", "label": "Dev VPC", "dependsOn": ["devAccount"], "account": "devAccount", "cidr": "10.1.0.0/16",
|
|
124
|
+
"subnets": [
|
|
125
|
+
{ "code": "subnetDevErA", "label": "Dev ER 接入子网 A", "dependsOn": ["devVpc"], "name": "subnet-dev-er-a", "cidr": "10.1.0.8/29", "azIndex": 0 },
|
|
126
|
+
{ "code": "subnetDevErB", "label": "Dev ER 接入子网 B", "dependsOn": ["devVpc"], "name": "subnet-dev-er-b", "cidr": "10.1.0.16/29", "azIndex": 1 },
|
|
127
|
+
{ "code": "subnetDevBizA", "label": "Dev 业务子网 A", "dependsOn": ["devVpc"], "name": "subnet-dev-biz-a", "cidr": "10.1.4.0/22", "azIndex": 0 },
|
|
128
|
+
{ "code": "subnetDevBizB", "label": "Dev 业务子网 B", "dependsOn": ["devVpc"], "name": "subnet-dev-biz-b", "cidr": "10.1.8.0/22", "azIndex": 1 }
|
|
129
|
+
],
|
|
130
|
+
"nat": { "code": "natDev", "label": "Dev NAT", "dependsOn": ["devVpc", "subnetDevErA", "eipDev"], "subnet": "subnetDevErA" },
|
|
131
|
+
"eip": { "code": "eipDev", "label": "Dev EIP", "dependsOn": ["devVpc"] }
|
|
132
|
+
},
|
|
133
|
+
{ "code": "prodVpc", "label": "Prod VPC", "dependsOn": ["prodAccount"], "account": "prodAccount", "cidr": "10.2.0.0/16",
|
|
134
|
+
"subnets": [
|
|
135
|
+
{ "code": "subnetProdErA", "label": "Prod ER 接入子网 A", "dependsOn": ["prodVpc"], "name": "subnet-prod-er-a", "cidr": "10.2.0.8/29", "azIndex": 0 },
|
|
136
|
+
{ "code": "subnetProdErB", "label": "Prod ER 接入子网 B", "dependsOn": ["prodVpc"], "name": "subnet-prod-er-b", "cidr": "10.2.0.16/29", "azIndex": 1 },
|
|
137
|
+
{ "code": "subnetProdBizA", "label": "Prod 业务子网 A", "dependsOn": ["prodVpc"], "name": "subnet-prod-biz-a", "cidr": "10.2.4.0/22", "azIndex": 0 },
|
|
138
|
+
{ "code": "subnetProdBizB", "label": "Prod 业务子网 B", "dependsOn": ["prodVpc"], "name": "subnet-prod-biz-b", "cidr": "10.2.8.0/22", "azIndex": 1 }
|
|
139
|
+
],
|
|
140
|
+
"nat": { "code": "natProd", "label": "Prod NAT", "dependsOn": ["prodVpc", "subnetProdErA", "eipProd"], "subnet": "subnetProdErA" },
|
|
141
|
+
"eip": { "code": "eipProd", "label": "Prod EIP", "dependsOn": ["prodVpc"] }
|
|
142
|
+
},
|
|
143
|
+
{ "code": "opsVpc", "label": "Ops VPC", "dependsOn": ["opsAccount"], "account": "opsAccount", "cidr": "10.3.0.0/16",
|
|
144
|
+
"subnets": [
|
|
145
|
+
{ "code": "subnetOpsErA", "label": "Ops ER 接入子网 A", "dependsOn": ["opsVpc"], "name": "subnet-ops-er-a", "cidr": "10.3.0.8/29", "azIndex": 0 },
|
|
146
|
+
{ "code": "subnetOpsBizA", "label": "Ops 业务子网 A", "dependsOn": ["opsVpc"], "name": "subnet-ops-biz-a", "cidr": "10.3.4.0/22", "azIndex": 0 }
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"er": { "code": "erInstance", "label": "ER er-enterprise-lz", "dependsOn": ["sharedVpc", "ramOrgShare"], "name": "er-enterprise-lz", "asn": 64512, "account": "sharedServicesAccount" },
|
|
151
|
+
"erAttachment": { "code": "erVpcAttachmentShared", "label": "ER VPC attachment(共享)", "dependsOn": ["erInstance", "sharedVpc"], "vpc": "sharedVpc", "account": "sharedServicesAccount" }
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
|
|
155
|
+
"P1-4_er_mesh": {
|
|
156
|
+
"recommended": { "erName": "er-enterprise-lz", "erAsn": 64512 }
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
"P1-4_cfw": {
|
|
160
|
+
"recommended": { "code": "cfwInstance", "label": "云防火墙 CFW", "dependsOn": ["sharedVpc"], "account": "sharedServicesAccount", "edition": "Professional", "name": "lz-cfw" }
|
|
161
|
+
},
|
|
162
|
+
|
|
163
|
+
"P1-4_waf": {
|
|
164
|
+
"recommended": { "code": "wafInstance", "label": "Web 应用防火墙 WAF", "dependsOn": [], "account": "sharedServicesAccount", "edition": "Standard", "name": "lz-waf" }
|
|
165
|
+
},
|
|
166
|
+
|
|
167
|
+
"P1-4_aad": {
|
|
168
|
+
"recommended": { "code": "aadInstance", "label": "抗 DDoS AAD", "dependsOn": [], "account": "sharedServicesAccount", "edition": "Basic" }
|
|
169
|
+
},
|
|
170
|
+
|
|
171
|
+
"P1-5_budget": {
|
|
172
|
+
"recommended": 0
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "scp-policies-v2",
|
|
3
|
+
"description": "SCP 策略规则(唯一来源):策略 content 全文 + 结构定义(typeEnable/code/label/attach)。2026-11-13 拆分:interaction-config.md 与 standard-baseline.md 不再内联拷贝,均以 ref 引用本文件。消费形态:①loadScpPoliciesDisplay(剥 content)→ planner recommended 给 AI,确认回传只带 code/attach 引用,服务端按 code 回填全文(防长参数 MALFORMED_RESPONSE 事故);②loadScpPoliciesFull(content 转 JSON 字符串)→ standard-loader 解析 standard-baseline.md scpPolicies ref 作 spec 基线。改策略 content/增删推荐策略 → 只改本文件。",
|
|
4
|
+
"typeEnable": {
|
|
5
|
+
"code": "scpPolicyTypeEnable",
|
|
6
|
+
"label": "SCP 策略类型启用",
|
|
7
|
+
"dependsOn": ["root"]
|
|
8
|
+
},
|
|
9
|
+
"policies": [
|
|
10
|
+
{
|
|
11
|
+
"code": "denyHighRiskPortsPolicy",
|
|
12
|
+
"label": "SCP 策略 DenyHighRiskPortsIngress",
|
|
13
|
+
"dependsOn": ["root"],
|
|
14
|
+
"name": "DenyHighRiskPortsIngress",
|
|
15
|
+
"description": "禁止安全组对公网(0.0.0.0/0)入方向开放高危端口",
|
|
16
|
+
"attachTarget": "root",
|
|
17
|
+
"attachTargetType": "root",
|
|
18
|
+
"attach": {
|
|
19
|
+
"code": "denyHighRiskPortsAttach",
|
|
20
|
+
"label": "绑定 DenyHighRiskPortsIngress→root",
|
|
21
|
+
"dependsOn": ["denyHighRiskPortsPolicy", "scpPolicyTypeEnable"],
|
|
22
|
+
"target": "root",
|
|
23
|
+
"targetType": "root"
|
|
24
|
+
},
|
|
25
|
+
"content": {
|
|
26
|
+
"Version": "5.0",
|
|
27
|
+
"Statement": [
|
|
28
|
+
{
|
|
29
|
+
"Sid": "DenyHighRiskPortsIngressPublicIP",
|
|
30
|
+
"Effect": "Deny",
|
|
31
|
+
"Action": [
|
|
32
|
+
"vpc:securityGroups:create",
|
|
33
|
+
"vpc:securityGroups:update",
|
|
34
|
+
"vpc:securityGroupRules:create",
|
|
35
|
+
"vpc:securityGroupRules:update",
|
|
36
|
+
"vpc:nativeSecurityGroups:create",
|
|
37
|
+
"vpc:nativeSecurityGroups:update",
|
|
38
|
+
"vpc:nativeSecurityGroupRules:create"
|
|
39
|
+
],
|
|
40
|
+
"Condition": {
|
|
41
|
+
"ForAnyValue:NumberEquals": {
|
|
42
|
+
"vpc:SecurityGroupRulePort": [
|
|
43
|
+
"20","21","22","23","69","111","135","137","139","161","162","177","389","445","513","636","639","830","1433","1435","1521","1530","2049","2081","2181","3306","3389","4899","5000","5432","5555","5672","5900","5901","5984","6000","6030","6041","6063","6379","6800","7306","8083","8086","8161","8635","9042","9092","9095","9200","9300","9999","11211","15672","25308","26800","27017","27019","28017","50000","50050","61616","65432"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"ForAnyValue:StringEquals": {
|
|
47
|
+
"vpc:SecurityGroupRuleDirection": ["ingress"]
|
|
48
|
+
},
|
|
49
|
+
"ForAnyValue:StringMatch": {
|
|
50
|
+
"vpc:SecurityGroupRuleRemoteIpPrefix": ["0.0.0.0/0"]
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"code": "denyDeleteLogArchivePolicy",
|
|
59
|
+
"label": "SCP 策略 DenyDeleteLogArchive",
|
|
60
|
+
"dependsOn": ["root"],
|
|
61
|
+
"name": "DenyDeleteLogArchive",
|
|
62
|
+
"description": "禁止删除/关闭组织内成员账号(日志归档保护,全组织生效)",
|
|
63
|
+
"attachTarget": "root",
|
|
64
|
+
"attachTargetType": "root",
|
|
65
|
+
"attach": {
|
|
66
|
+
"code": "denyDeleteLogArchiveAttach",
|
|
67
|
+
"label": "绑定 DenyDeleteLogArchive→root",
|
|
68
|
+
"dependsOn": ["denyDeleteLogArchivePolicy", "scpPolicyTypeEnable"],
|
|
69
|
+
"target": "root",
|
|
70
|
+
"targetType": "root"
|
|
71
|
+
},
|
|
72
|
+
"content": {
|
|
73
|
+
"Version": "5.0",
|
|
74
|
+
"Statement": [
|
|
75
|
+
{
|
|
76
|
+
"Sid": "DenyDeleteMemberAccount",
|
|
77
|
+
"Effect": "Deny",
|
|
78
|
+
"Action": [
|
|
79
|
+
"organizations:accounts:leave",
|
|
80
|
+
"organizations:accounts:close"
|
|
81
|
+
],
|
|
82
|
+
"Resource": ["*"]
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"attachTargetRules": {
|
|
89
|
+
"options": [
|
|
90
|
+
{ "value": "root", "label": "根组织(全组织)", "desc": "推荐" },
|
|
91
|
+
{ "value": "custom", "label": "自定义(填 OU名 或 账号名)", "desc": "绑定到特定 OU 或账号" },
|
|
92
|
+
{ "value": "", "label": "不绑定(只创建规则)", "desc": "用户自行绑定" }
|
|
93
|
+
],
|
|
94
|
+
"typeRecognition": {
|
|
95
|
+
"rule": "attachTarget=root → type=root; attachTarget=空 → type=空(不绑定); 其他 → 从方案资源清单匹配 OU名/账号名",
|
|
96
|
+
"matchHint": "AI 判断:用户输入 attachTarget 后,从方案资源清单(instances)找 typeId=ou 且 semanticParams.name===attachTarget → type=ou; typeId=account 且 semanticParams.name===attachTarget → type=account; 两个都匹配或都不匹配 → 问用户指定类型(ou/account/空)"
|
|
97
|
+
},
|
|
98
|
+
"verifyingCheck": {
|
|
99
|
+
"rule": "检查 attachTarget 对应实体是否在方案资源清单(已建/待建),不在标⚠️提示用户",
|
|
100
|
+
"matchHint": "AI 检查:type=ou 时找 typeId=ou 且 name 匹配的实例,在→✅/⏳,不在→⚠️提示'绑定实体不在方案里,请删除绑定或换绑定';type=account 时同理找 typeId=account;type=root 或空→不检查"
|
|
101
|
+
},
|
|
102
|
+
"entityIdResolve": {
|
|
103
|
+
"rule": "执行时(run)按 attachTarget 类型查 API 拿实体 ID",
|
|
104
|
+
"matchHint": "AI 执行:attachTarget=root → 调 ListRoots(GET /v1/organizations/roots) 拿 roots[0].id; attachTarget 是 OU名 → 调 ListOrganizationalUnits(GET /v1/organizations/organizational-units?parent_id={rootId}) 按 name 匹配拿 id; attachTarget 是账号名 → 调 ListAccounts(GET /v1/organizations/accounts) 按 name 匹配拿 id。查不到标⚠️"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"rules": {
|
|
108
|
+
"exceptionSupport": "SCP 支持 Condition 的 ForAnyValue:StringNotEquals 排除特定账号(如 g:DomainName != 某账号 可绕过 Deny)。推荐策略默认不含例外(全员生效),用户可在 moduleDetail 自定义 content 添加例外。",
|
|
109
|
+
"exceptionReference": "已有策略 SecurityGroupDenyHighRiskPort 用 g:DomainName 排除了 es_workload_ai1shell_manager 账号"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# 抗 DDoS AAD(aad)
|
|
2
|
+
|
|
3
|
+
> AAD(Advanced Anti-DDoS)防护大规模 DDoS 攻击。
|
|
4
|
+
> LZ 安全防护之一,高防需求时启用。
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 一、是什么 / 为什么需要
|
|
9
|
+
|
|
10
|
+
AAD 提供高防 IP,清洗 DDoS 流量,保障业务可用。适合易受 DDoS 攻击的公网业务(游戏/金融/政务)。
|
|
11
|
+
|
|
12
|
+
**为什么需要**:普通 DDoS 基础防护有限,大规模攻击需高防 IP 清洗。
|
|
13
|
+
|
|
14
|
+
## 二、里面应该有什么(子结构)
|
|
15
|
+
|
|
16
|
+
| 资源 | 职责 | 必备 |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| AAD 高防实例 | DDoS 清洗 | 高防需求时 |
|
|
19
|
+
|
|
20
|
+
## 三、注意点 / 最佳实践 / 坑
|
|
21
|
+
|
|
22
|
+
### 约束
|
|
23
|
+
- **AAD 费用较高**(高防 IP 按防护峰值计费)
|
|
24
|
+
- **AAD 需备案域名 + 公网业务**
|
|
25
|
+
- **AAD 不支持退款**:一旦开通无法退款
|
|
26
|
+
|
|
27
|
+
### 最佳实践
|
|
28
|
+
- 仅高防需求启用(游戏/金融/政务)
|
|
29
|
+
- 按业务峰值选防护规格
|
|
30
|
+
|
|
31
|
+
### 坑
|
|
32
|
+
- **AAD 费用高**:误启产生高额账单
|
|
33
|
+
- **需域名备案**
|
|
34
|
+
- **不支持退款**:开通后无法退款,务必确认后再开通
|
|
35
|
+
|
|
36
|
+
## 四、费用属性(版本基价,沟通口径)
|
|
37
|
+
> 下表为版本**基价**(元/月),即方案沟通与预估使用的价格口径(2026-11 确认)。
|
|
38
|
+
> AAD 高防 IP 按防护峰值计费(保底/弹性带宽)——**基价是下限,不是封顶**。
|
|
39
|
+
|
|
40
|
+
| 版本 | 基价(元/月) | 说明 |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| 基础版 | 8820 | DDoS 高防基础版(LZ 方案选型) |
|
|
43
|
+
|
|
44
|
+
> ⚠️ AAD 需配合域名使用,且 **DDoS 不支持退款**。
|
|
45
|
+
> 标准方案默认不开通 AAD(费用考虑),用户显式选择才开通。
|
|
46
|
+
|
|
47
|
+
## 五、创建依赖
|
|
48
|
+
|
|
49
|
+
### 前置
|
|
50
|
+
- 公网业务已部署(域名 + 备案)
|
|
51
|
+
|
|
52
|
+
### 被依赖
|
|
53
|
+
- 无
|
|
54
|
+
|
|
55
|
+
## 六、怎么查接口(指向 ops-deploy)
|
|
56
|
+
|
|
57
|
+
| 查什么 | productshort | 关键 API |
|
|
58
|
+
|---|---|---|
|
|
59
|
+
| AAD 高防实例 | AAD | CreateInstance / ListInstances |
|
|
60
|
+
|
|
61
|
+
**查法**:`apiexplorer('AAD')` → compact → `apiexplorerHost('AAD', region)`。
|
|
62
|
+
|
|
63
|
+
## 七、演示示例
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
高防需求(金融/游戏): AAD 启用,按峰值选规格
|
|
67
|
+
普通业务: 不启
|
|
68
|
+
```
|
|
69
|
+
## 八、资源探测指引
|
|
70
|
+
|
|
71
|
+
> MCP 契约(ListInstance):GET /v1/aad/instances,响应 items[].instance_id/instance_name。
|
|
72
|
+
> 探测在归属成员账号内(assumed)。AAD 实例按存在性判定(实例名由购买时定,不强制匹配)。
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"probes": [
|
|
77
|
+
{
|
|
78
|
+
"typeId": "aad",
|
|
79
|
+
"service": "AAD",
|
|
80
|
+
"hostMode": "global",
|
|
81
|
+
"steps": [
|
|
82
|
+
{ "step": 1, "action": "query-host", "productshort": "AAD", "via": "apiexplorerHost", "output": "aadHost" },
|
|
83
|
+
{ "step": 2, "action": "query-list", "method": "GET", "api": "ListInstance",
|
|
84
|
+
"path": "/v1/aad/instances", "hostKey": "aadHost", "output": "instances", "save": true, "depends": ["aadHost"] }
|
|
85
|
+
],
|
|
86
|
+
"match": { "field": "instances.items", "expect": "exists-non-empty", "idFields": ["instance_id"] },
|
|
87
|
+
"existsStatus": "historical_exists",
|
|
88
|
+
"existsDetail": "AAD 高防实例已存在,复用",
|
|
89
|
+
"pendingDetail": "AAD 高防实例未购买,待建"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# 云防火墙 CFW(cfw)
|
|
2
|
+
|
|
3
|
+
> CFW(Cloud Firewall)提供边界防护。
|
|
4
|
+
> LZ 安全防护之一,按合规等级启用(非默认)。
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 一、是什么 / 为什么需要
|
|
9
|
+
|
|
10
|
+
CFW 提供 VPC 边界防护:入/出方向访问控制、入侵检测、流量审计。等保三级要求边界防护,CFW 是华为云对应方案。
|
|
11
|
+
|
|
12
|
+
**为什么需要**:合规(等保三级要求边界防护);安全(防止未授权访问/入侵)。
|
|
13
|
+
|
|
14
|
+
## 二、里面应该有什么(子结构)
|
|
15
|
+
|
|
16
|
+
| 资源 | 职责 | 必备 |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| CFW 实例 | 云防火墙 | 等保三级+ |
|
|
19
|
+
|
|
20
|
+
## 三、注意点 / 最佳实践 / 坑
|
|
21
|
+
|
|
22
|
+
### 约束
|
|
23
|
+
- **CFW 是区域服务**
|
|
24
|
+
- **CFW 挂在 SharedServices 账号**(边界集中防护)
|
|
25
|
+
|
|
26
|
+
### 最佳实践
|
|
27
|
+
- 仅等保三级+ 启用
|
|
28
|
+
- 标准方案默认全关(避免高额费用)
|
|
29
|
+
- 用户显式启用才建
|
|
30
|
+
|
|
31
|
+
### 坑
|
|
32
|
+
- **CFW 是付费重资产**:误建会产生高额账单,必须用户确认
|
|
33
|
+
- **CFW 与 VPC 关联**:需 VPC 已建
|
|
34
|
+
|
|
35
|
+
## 四、费用属性(版本基价,沟通口径)
|
|
36
|
+
> 下表为版本**基价**(元/月),即方案沟通与预估使用的价格口径(2026-11 确认)。
|
|
37
|
+
> 扩展包(防护公网 IP 数/互联网流量峰值/VPC 数)按需另购,LZ 多 VPC 场景实际费用会随扩展上浮——**基价是下限,不是封顶**。
|
|
38
|
+
|
|
39
|
+
| 版本 | 基价(元/月) | 防护能力 | 说明 |
|
|
40
|
+
|---|---|---|---|
|
|
41
|
+
| 标准版 | 2800 | 出入公网防护(防护 EIP) | 仅公网边界防护,不含东西向流量 |
|
|
42
|
+
| 专业版 | 9800 | IP 防护 + VPC 防护 | 东西向流量防护必备(等保三级要求);默认含 50Mbps 互联网带宽 + 2 VPC/200Mbps 东西向,防护 VPC>2 需扩 VPC 包 |
|
|
43
|
+
|
|
44
|
+
> ⚠️ 实测(cn-north-4,2026-11):该账号不支持按需计费(is_support_postpaid=false),仅包月。
|
|
45
|
+
> 标准方案默认不开通 CFW(费用考虑),用户显式选择才开通。
|
|
46
|
+
> 等保三级需东西向流量防护 → 建议专业版(基价 9800 元/月起,扩展另计)。
|
|
47
|
+
|
|
48
|
+
## 五、创建依赖
|
|
49
|
+
|
|
50
|
+
### 前置
|
|
51
|
+
- **SharedServices 账号已建**(CFW 挂此账号)
|
|
52
|
+
- **VPC 已建**(CFW 防护边界)
|
|
53
|
+
|
|
54
|
+
### 被依赖
|
|
55
|
+
- 无
|
|
56
|
+
|
|
57
|
+
## 六、怎么查接口(指向 ops-deploy)
|
|
58
|
+
|
|
59
|
+
| 查什么 | productshort | 关键 API |
|
|
60
|
+
|---|---|---|
|
|
61
|
+
| CFW 实例 | CFW | ListFirewallList / CreateFirewall |
|
|
62
|
+
|
|
63
|
+
**查法**:`apiexplorer('CFW')` → compact → `apiexplorerHost('CFW', region)`(区域服务,host 带 `cfw.<region>.`)。
|
|
64
|
+
|
|
65
|
+
## 七、演示示例
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
合规=等保三级 → CFW 启用(建议专业版,东西向防护)
|
|
69
|
+
实例: cfw-lz-default (SharedServices)
|
|
70
|
+
费用: 标准版 2800 元/月起 / 专业版 9800 元/月起
|
|
71
|
+
|
|
72
|
+
合规=无 → CFW 关(标准方案默认)
|
|
73
|
+
```
|
|
74
|
+
## 八、资源探测指引
|
|
75
|
+
|
|
76
|
+
> 从 verifyByType 代码专用分支收编(2026-11-12):方法/路径/body/响应字段照
|
|
77
|
+
> MCP 契约(ListFirewallList)沉淀,引擎通用机制执行,删代码分支。
|
|
78
|
+
> 契约:POST /v1/{project_id}/firewalls/list,body {limit,offset};
|
|
79
|
+
> 响应 data.records[].fw_instance_id/name。探测在归属成员账号内(assumed),
|
|
80
|
+
> project_id 由 assumed.getProjectId 提供(engine query-project 步骤)。
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"probes": [
|
|
85
|
+
{
|
|
86
|
+
"typeId": "cfw_instance",
|
|
87
|
+
"service": "CFW",
|
|
88
|
+
"hostMode": "regional",
|
|
89
|
+
"steps": [
|
|
90
|
+
{ "step": 1, "action": "query-host", "productshort": "CFW", "via": "apiexplorerHost", "output": "cfwHost" },
|
|
91
|
+
{ "step": 2, "action": "query-project", "output": "projectId", "save": true, "depends": ["cfwHost"] },
|
|
92
|
+
{ "step": 3, "action": "query-list", "method": "POST", "api": "ListFirewallList",
|
|
93
|
+
"path": "/v1/{projectId}/firewalls/list", "hostKey": "cfwHost",
|
|
94
|
+
"bodyTemplate": { "limit": 10, "offset": 0 },
|
|
95
|
+
"output": "firewalls", "save": true, "depends": ["cfwHost", "projectId"] }
|
|
96
|
+
],
|
|
97
|
+
"match": { "field": "firewalls.data.records", "expect": "exists-non-empty", "idFields": ["fw_instance_id"] },
|
|
98
|
+
"existsStatus": "historical_exists",
|
|
99
|
+
"existsDetail": "CFW 已存在,复用",
|
|
100
|
+
"pendingDetail": "CFW 未创建,待建"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Web 应用防火墙 WAF(waf)
|
|
2
|
+
|
|
3
|
+
> WAF 保护 Web 应用免受 OWASP 攻击。
|
|
4
|
+
> LZ 安全防护之一,有 Web 业务暴露时启用。
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 一、是什么 / 为什么需要
|
|
9
|
+
|
|
10
|
+
WAF(Web Application Firewall)防护 SQL 注入、XSS、CC 等 Web 攻击。适合有公网暴露的 Web 业务。
|
|
11
|
+
|
|
12
|
+
**为什么需要**:有 Web 业务对外服务时,需应用层防护(网络层防火墙不够)。
|
|
13
|
+
|
|
14
|
+
## 二、里面应该有什么(子结构)
|
|
15
|
+
|
|
16
|
+
| 资源 | 职责 | 必备 |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| WAF 实例/域名防护 | Web 应用防护 | 有 Web 业务时 |
|
|
19
|
+
|
|
20
|
+
## 三、注意点 / 最佳实践 / 坑
|
|
21
|
+
|
|
22
|
+
### 约束
|
|
23
|
+
- **WAF 需绑定域名**:防护具体 Web 应用,域名需备案(一周以上)
|
|
24
|
+
- **WAF 需 SSL 证书**:证书费用 2 万元以上/年
|
|
25
|
+
- **WAF 按量或包月计费**
|
|
26
|
+
|
|
27
|
+
### 最佳实践
|
|
28
|
+
- 有公网 Web 业务才启
|
|
29
|
+
- 按量计费试水,稳定后包月
|
|
30
|
+
|
|
31
|
+
### 坑
|
|
32
|
+
- **WAF 需域名 + 证书**:无域名无法用,域名备案周期长(一周以上),证书费用高(2 万以上/年)
|
|
33
|
+
- **WAF 与 ELB/CDN 配合**:架构较复杂
|
|
34
|
+
|
|
35
|
+
## 四、费用属性(版本基价,沟通口径)
|
|
36
|
+
> 下表为版本**基价**(元/月),即方案沟通与预估使用的价格口径(2026-11 确认)。
|
|
37
|
+
> 扩展规格(域名数/ QPS 等)按需另购——**基价是下限,不是封顶**。
|
|
38
|
+
|
|
39
|
+
| 版本 | 基价(元/月) | 说明 |
|
|
40
|
+
|---|---|---|
|
|
41
|
+
| 入门版 | 99 | 基础 Web 防护 |
|
|
42
|
+
| 标准版 | 3880 | 标准 Web 防护(LZ 方案选型) |
|
|
43
|
+
|
|
44
|
+
> ⚠️ WAF 需配合域名和证书使用:
|
|
45
|
+
> - 域名需备案(一周以上)
|
|
46
|
+
> - SSL 证书费用 2 万元以上/年
|
|
47
|
+
> - 标准方案默认不开通 WAF(费用考虑),用户显式选择才开通。
|
|
48
|
+
|
|
49
|
+
## 五、创建依赖
|
|
50
|
+
|
|
51
|
+
### 前置
|
|
52
|
+
- Web 业务已部署(有域名)
|
|
53
|
+
|
|
54
|
+
### 被依赖
|
|
55
|
+
- 无
|
|
56
|
+
|
|
57
|
+
## 六、怎么查接口(指向 ops-deploy)
|
|
58
|
+
|
|
59
|
+
| 查什么 | productshort | 关键 API |
|
|
60
|
+
|---|---|---|
|
|
61
|
+
| WAF 云模式 | WAF | CreateCloudWafPostPaidResource / ShowSubscriptionInfo |
|
|
62
|
+
|
|
63
|
+
**查法**:`apiexplorer('WAF')` → compact → `apiexplorerHost('WAF', region)`。
|
|
64
|
+
|
|
65
|
+
## 七、演示示例
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
有 Web 业务: WAF 按量计费,绑域名
|
|
69
|
+
无 Web 业务: 不启
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## 八、资源探测指引
|
|
73
|
+
|
|
74
|
+
> **云模式 WAF 探测方法(2026-11-13 实测核实)**:
|
|
75
|
+
> LZ 方案的 WAF 是**云模式标准版**(按订阅,spec.security.waf.edition=Standard)。
|
|
76
|
+
> - ShowSubscriptionInfo(`GET /v1/{project_id}/waf/subscription`)查租户订购信息,
|
|
77
|
+
> `type` 字段就是云模式版本枚举:**-1=未订购 / -2=冻结 / 2=标准 / 3=专业 / 4=企业 / 7=入门 / 22=按需**;
|
|
78
|
+
> `premium.purchased` 是独享模式(另一资源,勿混淆)。
|
|
79
|
+
> - ⚠️ ListInstance(premium-waf)查的是**独享引擎**,与云模式订阅不是同一资源,
|
|
80
|
+
> 不能用它探测云模式 WAF(会造成"已购但查不到"的假阴)。
|
|
81
|
+
> - project_id 用**区域项目 ID**(管理账号 cn-north-4 → 019f8c84484872be9b282fe29a3afd36);
|
|
82
|
+
> 传全局项目 ID 会报 WAF.00012002 Invalid project_id(实测)。
|
|
83
|
+
> - 判定:type=2(标准版)→已购复用;type=-1 →未购待建;type=-2 →冻结(异常态,标 probe_failed)。
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"probes": [
|
|
88
|
+
{
|
|
89
|
+
"typeId": "waf",
|
|
90
|
+
"service": "WAF",
|
|
91
|
+
"hostMode": "regional",
|
|
92
|
+
"steps": [
|
|
93
|
+
{ "step": 1, "action": "query-host", "productshort": "WAF", "via": "apiexplorerHost", "output": "wafHost" },
|
|
94
|
+
{ "step": 2, "action": "query-project", "output": "projectId", "save": true, "depends": ["wafHost"] },
|
|
95
|
+
{ "step": 3, "action": "query-list", "method": "GET", "api": "ShowSubscriptionInfo",
|
|
96
|
+
"path": "/v1/{projectId}/waf/subscription", "hostKey": "wafHost",
|
|
97
|
+
"output": "subscription", "save": true, "depends": ["wafHost", "projectId"] }
|
|
98
|
+
],
|
|
99
|
+
"match": { "field": "subscription.type", "expect": "waf-subscription-type" },
|
|
100
|
+
"existsStatus": "historical_exists",
|
|
101
|
+
"existsDetail": "云模式 WAF 已订购(类型 {typeLabel}),复用",
|
|
102
|
+
"pendingDetail": "云模式 WAF 未订购,待建"
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
> match 说明:`waf-subscription-type` 为 WAF 订阅专用判定(引擎机制,值语义在上方枚举表):
|
|
109
|
+
> type ∈ {2,3,4,7,22} → 已购(historical_exists,cloudId=resourceId);
|
|
110
|
+
> type = -1 → 未购(pending);type = -2 → 冻结(probe_failed,需人工处理)。
|