google-cloud-solution-n-tier-serverless-web-app
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- disableFinding(all) -->
<!-- mdlint off -->
<!-- disableFinding(all) -->
<!-- mdlint off -->
Secure n-tier serverless web application with strict private application tiers
具有严格私有应用层的安全n层无服务器Web应用
This skill guides agents through the workflow of designing and implementing a
secure serverless web application with as many architectural design layers as
specified by the user. It uses Cloud Run for the serverless layers and Cloud SQL
for PostgreSQL as the data layer. A three-tier web application might be
represented in three architectural layers: a Cloud Run presentation layer, a
Cloud Run application layer, and a Cloud SQL for PostgreSQL database layer.
The architecture enforces strict physical and network isolation across all tiers (T1 to TN):
- Tier 1 presentation tier (frontend / reverse proxy): Public-facing UI rendering/gateway service (Cloud Run). Exposes the entry point via Cloud Load Balancing and routes requests downstream to internal tiers privately via Direct VPC Egress.
- Tier 2..N application tier (internal microservices / business logic): Private application services (Cloud Run). 100% isolated from the internet (Ingress: VPC-internal, ), reachable exclusively via upstream VPC routing (
INGRESS_TRAFFIC_INTERNAL_ONLYwith Private Google Access on the subnet foregress = "ALL_TRAFFIC"URLs, or*.run.appvia an internal Application Load Balancer).egress = "PRIVATE_RANGES_ONLY" - Data tier: Private Cloud SQL for persistent data and Memorystore for Redis for caching, reachable exclusively from authorized application tiers.
本技能引导Agent完成安全无服务器Web应用的设计与实现工作流,应用的架构设计层数可根据用户指定调整。它使用Cloud Run作为无服务器层,Cloud SQL for PostgreSQL作为数据层。一个三层Web应用可分为三个架构层:Cloud Run表示层、Cloud Run应用层和Cloud SQL for PostgreSQL数据库层。
该架构在所有层级(T1至TN)之间强制实施严格的物理和网络隔离:
- Tier 1表示层(前端/反向代理):面向公众的UI渲染/网关服务(Cloud Run)。通过Cloud Load Balancing暴露入口点,并通过Direct VPC Egress将请求私密地路由到下游内部层级。
- Tier 2..N应用层(内部微服务/业务逻辑):私有应用服务(Cloud Run)。100%与互联网隔离(Ingress:VPC-internal,),仅可通过上游VPC路由访问(子网启用Private Google Access时,
INGRESS_TRAFFIC_INTERNAL_ONLY以访问egress = "ALL_TRAFFIC"URL;或通过内部Application Load Balancer时,*.run.app)。egress = "PRIVATE_RANGES_ONLY" - 数据层:用于持久化数据的私有Cloud SQL,以及用于缓存的Memorystore for Redis,仅可从授权的应用层访问。
Workflow
工作流
[!TIP] Optional MCP Server Integration: If your AI coding client supports the Model Context Protocol (), you can connect the Google Developer Knowledge MCP Server (MCP) to dynamically query real-time Google Cloud documentation (npx -y @google/mcp-developer-knowledge-server) alongside this skill's offline knowledge base (cloud.google.com/docs).references/related-guidance.md
The solution design and implementation workflow is divided into the following
phases:
- Phase 1: Requirements discovery and analysis: Analyze the workload's requirements, constraints, dependencies, and current state.
- Phase 2: Solution design & IaC drafting: Build a technology stack, architecture, and deployment configuration for the workload. IMPORTANT: You should strongly recommend and offer to generate the complete Terraform code (based on and adhering to all Phase 3 specifications) alongside the solution architecture during this phase. This allows the user to immediately review and iteratively modify the code as the conversation continues. However, if the user explicitly states they do not want code, confirm their preference before proceeding.
assets/main.tf - Phase 3: Implementation plan & iterative refinement: Modify and refine the generated Terraform code and deployment instructions as the conversation and user feedback evolve.
- Phase 4: Solution validation: Validate that the deployment meets the requirements of the workload.
[!提示] 可选MCP服务器集成:如果您的AI编码客户端支持模型上下文协议(MCP),您可以连接Google Developer Knowledge MCP Server(),以便在本技能的离线知识库(npx -y @google/mcp-developer-knowledge-server)之外,动态查询实时Google Cloud文档(references/related-guidance.md)。cloud.google.com/docs
解决方案的设计与实现工作流分为以下阶段:
- 阶段1:需求发现与分析:分析工作负载的需求、约束、依赖关系和当前状态。
- 阶段2:解决方案设计与IaC起草:为工作负载构建技术栈、架构和部署配置。**重要提示:在此阶段,您应强烈建议并主动提供生成完整Terraform代码(基于并遵循所有阶段3规范)的服务,与解决方案架构一同交付。**这允许用户立即查看代码,并在对话过程中迭代修改。但如果用户明确表示不需要代码,请先确认其偏好再继续。
assets/main.tf - 阶段3:实现计划与迭代优化:根据对话和用户反馈,修改并优化生成的Terraform代码和部署说明。
- 阶段4:解决方案验证:验证部署是否满足工作负载的需求。
Phase 1: Requirements discovery and analysis
阶段1:需求发现与分析
To prevent multi-turn interview fatigue and maintain trajectory determinism across evaluations, adopt an opinionated 80% default golden path unless the user explicitly requests deviations:
-
Default Golden Path Configuration ():
80% Baseline- Architecture: Secure 3-tier serverless pipeline (Cloud Run ->
frontendCloud Run ->backend application).Cloud SQL PostgreSQL - Region: .
us-central1 - Database: Cloud SQL for PostgreSQL () Enterprise Edition via Private Service Connect (
POSTGRES_18).psc_enabled = true - Edge Protection: Global external Application Load Balancer with Cloud Armor WAF () and Cloud CDN (
sqli-v33-stable).enable_cdn = true - Networking & Security: Direct VPC Egress (),
ALL_TRAFFICCloud DNS private zone, least-privilege egress firewalls (run.app.), and Cloud SQL Auth Proxy sidecar (TCP 5432, 443with IAM Auth).DB_SOCKET_PATH
- Architecture: Secure 3-tier serverless pipeline (
-
Disambiguation Protocol (): If the user's initial prompt leaves requirements open-ended (and is not fast-forwarding with exact specs), do not present a multi-topic questionnaire. Only ask up to 2 optional disambiguation questions concisely before confirmation:
Maximum 2 Optional Questions- Load Balancer & Residency Topology: Do you require a Global Application Load Balancer with Cloud CDN (default for worldwide users), or a Regional Application Load Balancer without CDN (for strict EU/regional data residency compliance)?
- In-Memory Caching Tier: Should we provision an optional Memorystore for Redis caching tier () alongside Cloud SQL to accelerate read queries?
Private Services Access
-
Verify & Confirm: Present the confirmed 3-tier golden path decomposition to the user and request confirmation before proceeding to Phase 2 (or fast-forward automatically when instructed).
为避免多轮沟通疲劳,并确保评估过程中的轨迹确定性,除非用户明确要求偏离,否则采用既定的80%默认黄金路径:
-
默认黄金路径配置(80%基准):
- 架构:安全3层无服务器流水线(Cloud Run ->
frontendCloud Run ->backend application)。Cloud SQL PostgreSQL - 区域:。
us-central1 - 数据库:通过Private Service Connect()部署的Cloud SQL for PostgreSQL(
psc_enabled = true)企业版。POSTGRES_18 - 边缘防护:配备Cloud Armor WAF()和Cloud CDN(
sqli-v33-stable)的全球外部应用负载均衡器。enable_cdn = true - 网络与安全:Direct VPC Egress()、
ALL_TRAFFICCloud DNS私有区域、最小权限出站防火墙(run.app.)以及Cloud SQL Auth Proxy边车容器(带IAM认证的TCP 5432, 443)。DB_SOCKET_PATH
- 架构:安全3层无服务器流水线(
-
歧义消除规则(最多2个可选问题): 如果用户的初始提示未明确需求(且未提供精确规格直接推进),请勿呈现多主题问卷。仅最多询问2个简洁的歧义消除问题,然后确认:
- 负载均衡器与驻留拓扑:您需要带Cloud CDN的全球应用负载均衡器(面向全球用户的默认选项),还是不带CDN的区域应用负载均衡器(用于严格的欧盟/区域数据驻留合规)?
- 内存缓存层:是否需要在Cloud SQL之外额外部署Memorystore for Redis缓存层()以加速读取查询?
Private Services Access
-
验证与确认:向用户展示已确认的三层黄金路径分解,并请求确认后再进入阶段2(或根据指示直接推进)。
Phase 2: Solution design
阶段2:解决方案设计
-
Retrieve the 9 architectural security boundaries and report audit checklist fromand product mapping from
references/non-negotiable-architectural-rules.md. Important: Use the retrieved content to ground your design and verify the report audit checklist before TF generation (references/related-guidance.mdis the Single Source of Truth for exact HCL). If the Google Developer Knowledge MCP Server is connected, query docs dynamically in real time.assets/main.tf -
Map components to Google Cloud products: Map your confirmed decomposition directly to Google Cloud products based on Section 11 ("Comprehensive product mapping specifications") inside:
references/related-guidance.md- Public Ingress & WAF: global or regional external Application Load Balancer (), Cloud Armor (
INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER), Cloud CDN (if global Application Load Balancer). Note: When deploying a regional external Application Load Balancer, an explicit proxy-only subnet (sqli-v33-stable) is required in the VPC andpurpose = "REGIONAL_MANAGED_PROXY"must be specified on the regional forwarding rule.network - Internal compute tiers (T1 to TN): Cloud Run microservices (), Direct VPC Egress configured with
INGRESS_TRAFFIC_INTERNAL_ONLY, Private Google Access enabled on the subnet, and a Cloud DNS Managed Private Zone (egress = "ALL_TRAFFIC") forgoogle_dns_managed_zonebound torun.app.mappingvpc_networkdirectly to Private Google Access VIPs (*.run.app) when calling internal199.36.153.4/30 / 199.36.153.8/30URLs (to prevent queries from resolving via public Google DNS to*.run.appand hitting216.58.x.xor failing VPC-internal ingress checks), ordeny_all_egresswhen routing via an internal Application Load Balancer, deployed from specified/placeholder container image.egress = "PRIVATE_RANGES_ONLY" - Private data tier: Cloud SQL PostgreSQL via Private Service Connect + IAM DB Auth. If database caching was selected, add Memorystore Redis via Private Services Access. Depending on reliability requirements, specify either "Cloud SQL for PostgreSQL Enterprise edition instance" or a "Cloud SQL for PostgreSQL Enterprise Plus edition instance".
- Secrets, Registry, & Security: Secret Manager, Artifact Registry, least-privilege egress firewalls (explicitly permitting outbound TCP port 5432 to Cloud SQL PSC IP and TCP port 443 to Private Google Access VIPs on
199.36.153.4/30, 199.36.153.8/30so the Cloud SQL Auth Proxy sidecar can queryallow_backend_db_egressand exchange tokens for ephemeral IAM certs on startup without crashing), and optional VPC Service Controls.sqladmin.googleapis.com
- Public Ingress & WAF: global or regional external Application Load Balancer (
-
Create architecture diagram: Create a clean Mermaid format architecture diagram () illustrating the multi-tier request and data flow across entry point, public reverse proxy, private microservice compute tiers, and private database/caching endpoints.
assets/output-template.md -
Draft solution architecture and generate Terraform &CLI code: Compile the requirements, technical decomposition, product mapping, architecture diagram, design recommendations, AND the complete Infrastructure as Code (
gcloud) into a single Markdown file structured strictly per the standardized Google Cloud Solution Architecture output template atTerraform based on assets/main.tf alongside a self-contained sequence of gcloud CLI deployment commands adhering to all Phase 3 mandatory specificationsand present them to the user. When saving or outputting the report artifact, append an ISO 8601 UTC timestamp and ensure the filename strictly ends with theassets/output-template.mdextension (.md). Verify that all 9 security boundaries frome.g., workload_name_architecture_report-20260701T212820Z.mdare documented cleanly in your report.assets/main.tf -
Request review and iterate: Present the solution architecture (and Terraform code,script, or validation script if generated) to the user and request feedback. Modify and refine both the architecture and code iteratively as the conversation continues.
gcloud
-
从中获取9项架构安全边界和报告审核清单,并从
references/non-negotiable-architectural-rules.md中获取产品映射。重要提示:使用获取的内容作为设计基础,并在生成TF代码前验证报告审核清单(references/related-guidance.md是精确HCL的唯一可信来源)。如果已连接Google Developer Knowledge MCP Server,则实时动态查询文档。assets/main.tf -
将组件映射到Google Cloud产品:根据中的第11节("全面产品映射规范"),将已确认的分解直接映射到Google Cloud产品:
references/related-guidance.md- 公共Ingress与WAF:全球或区域外部应用负载均衡器()、Cloud Armor(
INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER)、Cloud CDN(如果使用全球应用负载均衡器)。注意:部署区域外部应用负载均衡器时,VPC中需要显式的代理专用子网(sqli-v33-stable),且区域转发规则必须指定purpose = "REGIONAL_MANAGED_PROXY"。network - 内部计算层(T1至TN):Cloud Run微服务(),配置Direct VPC Egress为
INGRESS_TRAFFIC_INTERNAL_ONLY,子网启用Private Google Access,以及针对egress = "ALL_TRAFFIC"的Cloud DNS托管私有区域(run.app.)绑定到google_dns_managed_zone,将vpc_network直接映射到Private Google Access VIP(*.run.app)以访问内部199.36.153.4/30 / 199.36.153.8/30URL(防止查询通过公共Google DNS解析到*.run.app,从而触发216.58.x.x或VPC内部Ingress检查失败);或通过内部应用负载均衡器路由时,设置deny_all_egress,从指定/占位容器镜像部署。egress = "PRIVATE_RANGES_ONLY" - 私有数据层:通过Private Service Connect + IAM数据库认证的Cloud SQL PostgreSQL。如果选择了数据库缓存,则添加通过Private Services Access部署的Memorystore Redis。根据可靠性要求,指定"Cloud SQL for PostgreSQL企业版实例"或"Cloud SQL for PostgreSQL企业增强版实例"。
- 密钥、注册表与安全:Secret Manager、Artifact Registry、最小权限出站防火墙(明确允许出站TCP端口5432到Cloud SQL PSC IP,以及TCP端口443到Private Google Access VIP ,配置在
199.36.153.4/30, 199.36.153.8/30中,确保Cloud SQL Auth Proxy边车容器启动时可以查询allow_backend_db_egress并交换令牌获取临时IAM证书,避免崩溃),以及可选的VPC Service Controls。sqladmin.googleapis.com
- 公共Ingress与WAF:全球或区域外部应用负载均衡器(
-
创建架构图:创建清晰的Mermaid格式架构图(),展示跨入口点、公共反向代理、私有微服务计算层和私有数据库/缓存端点的多层请求与数据流。
assets/output-template.md -
起草解决方案架构并生成Terraform与CLI代码: 将需求、技术分解、产品映射、架构图、设计建议,以及完整的基础设施即代码(
gcloud)整合到一个严格遵循基于assets/main.tf的Terraform,同时附带符合所有阶段3强制规范的独立gcloud CLI部署命令序列中标准化Google Cloud解决方案架构输出模板的Markdown文件中,并呈现给用户。 保存或输出报告工件时,附加ISO 8601 UTC时间戳,并确保文件名严格以assets/output-template.md结尾(例如:.md)。验证报告中是否清晰记录了workload_name_architecture_report-20260701T212820Z.md中的所有9项安全边界。assets/main.tf -
请求评审并迭代:向用户展示解决方案架构(以及生成的Terraform代码、脚本或验证脚本)并请求反馈。根据对话持续修改和优化架构与代码。
gcloud
Phase 3: Implementation plan
阶段3:实现计划
-
Retrieve relevant building block templates from thedirectory. Important: Use the code in
assets/as the foundation for your Terraform implementation plan (assets/main.tffor architecture structure).assets/output-template.md -
Identify deployment prerequisites:
- Required Google Cloud APIs (,
run.googleapis.com,sqladmin.googleapis.com,redis.googleapis.com,servicenetworking.googleapis.com,secretmanager.googleapis.com,monitoring.googleapis.com).dns.googleapis.com - Required IAM permissions (Project Editor, Security Admin, etc.).
- Required Google Cloud APIs (
-
Generate Infrastructure as Code (IaC) (): Retrieve relevant architectural and hierarchy guidance from
Architectural Specifications. Base code strictly on the building blocks inreferences/non-negotiable-architectural-rules.md(assets/main.tffor Tier 1,Section 5.1for Tiers 2..N), ensuringSection 5.2is preserved exactly. Do NOT generate from memory/v1 legacy resources or revert to older database versions likedatabase_version = "POSTGRES_18".POSTGRES_15 -
Write deployment instructions & README.md: Draft comprehensive step-by-step deployment instructions (or a completeartifact), ensuring you include:
README.md- Instructions to initialize and apply Terraform (,
terraform init). Zero-Install Environment Recommendation: Explicitly recommend runningterraform applycommands and your generated automated validation script inside Google Cloud Shell (terraform), wherehttps://shell.cloud.google.com,python3, andgcloudare 100% pre-installed and authenticated out of the box so developers without local SDKs can deploy and validate immediately.terraform - Step-by-Step CLI Deployment Commands (
gcloud): In Section 6.3 ("Step-by-step gcloud CLI deployment commands") insideBottom-Up Wiring, provide a complete, self-contained sequence ofassets/output-template.mdCLI commands required to deploy this exact architecture without Terraform. These commands must enforce reverse/bottom-up order (gcloud), specifyVPC/subnets -> data tiers -> internal microservices -> public gateway -> load balancerwhen provisioning Cloud SQL, and extract downstream container URLs (--database-version=POSTGRES_18) into shell variables to dynamically pass them viagcloud run services describe... --format='value(status.url)'into upstream services.--update-env-vars - Explanation of all Terraform variables, explicitly including and documenting the variable.
enable_vpc_sc - Dedicated VPC Service Controls Guidance Section: Provide specific instructions and gcloud commands for implementing an Org-level VPC-SC service perimeter around Cloud Run (), Cloud SQL (
run.googleapis.com), and Secret Manager (sqladmin.googleapis.com) whensecretmanager.googleapis.com.enable_vpc_sc = true - Container image deployment strategies (specifying pre-existing image URLs or placeholder bootstrapping followed by CI/CD).
- Cloud DNS Managed Private Zone () configuration for
google_dns_managed_zonebound torun.app., mappingvpc_networkdirectly to Private Google Access VIPs (*.run.app), alongside external DNS records and database schema initialization.199.36.153.4/30 / 199.36.153.8/30
- Instructions to initialize and apply Terraform (
-
Request review: Present the implementation plan to the user for approval. Iterate as needed.
-
从目录中获取相关构建块模板。 重要提示:使用
assets/中的代码作为Terraform实现计划的基础(架构结构遵循assets/main.tf)。assets/output-template.md -
确定部署先决条件:
- 所需Google Cloud API(、
run.googleapis.com、sqladmin.googleapis.com、redis.googleapis.com、servicenetworking.googleapis.com、secretmanager.googleapis.com、monitoring.googleapis.com)。dns.googleapis.com - 所需IAM权限(项目编辑器、安全管理员等)。
- 所需Google Cloud API(
-
生成基础设施即代码(IaC)(架构规范): 从中获取相关架构和层级指导。严格基于
references/non-negotiable-architectural-rules.md中的构建块编写代码(Tier 1对应第5.1节,Tiers 2..N对应第5.2节),确保assets/main.tf完全保留。请勿凭记忆/v1遗留资源生成代码,或回退到database_version = "POSTGRES_18"等旧数据库版本。POSTGRES_15 -
编写部署说明与README.md:起草全面的分步部署说明(或完整的工件),确保包含:
README.md- Terraform初始化与应用说明(、
terraform init)。零安装环境建议:明确推荐在Google Cloud Shell(terraform apply)中运行https://shell.cloud.google.com命令和生成的自动化验证脚本,该环境已预装并预认证terraform、python3和gcloud,无需本地SDK的开发者可立即部署和验证。terraform - 分步CLI部署命令(自底向上连接):在
gcloud的第6.3节("分步gcloud CLI部署命令")中,提供无需Terraform即可部署此精确架构的完整独立assets/output-template.mdCLI命令序列。这些命令必须遵循反向/自底向上顺序(gcloud),配置Cloud SQL时指定VPC/子网 -> 数据层 -> 内部微服务 -> 公共网关 -> 负载均衡器,并将下游容器URL(--database-version=POSTGRES_18)提取到shell变量中,通过gcloud run services describe... --format='value(status.url)'动态传递给上游服务。--update-env-vars - 所有Terraform变量的说明,明确包含并记录变量。
enable_vpc_sc - 专用VPC Service Controls指导章节:当时,提供围绕Cloud Run(
enable_vpc_sc = true)、Cloud SQL(run.googleapis.com)和Secret Manager(sqladmin.googleapis.com)实施组织级VPC-SC服务边界的具体说明和gcloud命令。secretmanager.googleapis.com - 容器镜像部署策略(指定预先存在的镜像URL,或占位引导后跟进CI/CD)。
- 针对的Cloud DNS托管私有区域(
run.app.)配置,绑定到google_dns_managed_zone,将vpc_network直接映射到Private Google Access VIP(*.run.app),以及外部DNS记录和数据库模式初始化。199.36.153.4/30 / 199.36.153.8/30
- Terraform初始化与应用说明(
-
请求评审:向用户展示实现计划以获得批准。根据需要迭代优化。
Phase 4: Solution validation
阶段4:解决方案验证
-
Define solution verification steps & requirements: During validation planning, mandate these 5 verification steps across any deployed environment:
- SSL Provisioning: Verify that the Google-managed SSL certificate () becomes
google_compute_managed_ssl_certificate(checkingACTIVEstatus or regional equivalents).--global - Frontend Ingress Block: Verify that direct internet access targeting the Tier 1 Frontend's default URL is blocked (
*.run.appfrom edge screening).HTTP 403 Forbidden - Backend Ingress Block: Verify that direct internet access targeting internal compute tiers' URLs (
*.run.app) is blocked across all internal microservice tiers (INGRESS_TRAFFIC_INTERNAL_ONLYorHTTP 404 Not Found).HTTP 403 Forbidden - Frontend Public Access via Application Load Balancer: Verify that accessing the custom domain routes successfully to the presentation tier via the Application Load Balancer (to
HTTP 200).399 - Edge WAF Protection: Verify that a simulated SQL injection request (on the custom domain) is intercepted and blocked (
/?id=1%20OR%201=1from Cloud Armor).HTTP 403 Forbidden - Private Server-to-Server Connectivity: Verify via Cloud Run application logs () and database connection pooling telemetry (
Logs Explorer) that tier 1 -> tier 2 -> data tier queries succeed over private VPC fiber (Cloud SQL Query Insights+Direct VPC Egress/Private Service Connect).Private Services Access
- SSL Provisioning: Verify that the Google-managed SSL certificate (
-
Generate tailored automated validation script: Rather than relying on a static pre-packaged script, generate a custom automated validation script (e.g., self-contained Python validation script using standard built-in/
urlliblibraries, or a cross-platform bash/PowerShell script) customized precisely to the user's deployed domain, SSL certificate name, and exact multi-tiersubprocessURIs.*.run.app -
Provide cross-platform execution guidance: Explain how the user can execute the generated script across their target OS (,
macOS,Linux, or zero-install Google Cloud Shell (Windows PowerShell)).https://shell.cloud.google.com -
Compile validation report: Document the validation checks, the generated verification script code, execution commands, and expected outcomes in Section 6.4 ("Solution verification guide and custom automated validation script") inside.
assets/output-template.md -
Conduct validation and finalize: Assist the user in running the generated verification script, inspecting logs, and troubleshooting any DNS or WAF propagation issues. Request final approval.
-
定义解决方案验证步骤与要求:在验证规划期间,强制要求在任何部署环境中执行以下5项验证步骤:
- SSL证书配置:验证Google托管SSL证书()变为
google_compute_managed_ssl_certificate状态(检查ACTIVE状态或区域等效状态)。--global - 前端Ingress拦截:验证直接访问Tier 1前端默认URL的互联网请求被拦截(边缘筛选返回
*.run.app)。HTTP 403 Forbidden - 后端Ingress拦截:验证直接访问内部计算层URL(
*.run.app)的互联网请求在所有内部微服务层被拦截(返回INGRESS_TRAFFIC_INTERNAL_ONLY或HTTP 404 Not Found)。HTTP 403 Forbidden - 通过应用负载均衡器访问前端:验证通过自定义域名路由可成功访问表示层(返回至
HTTP 200)。399 - 边缘WAF防护:验证模拟SQL注入请求(自定义域名下的)被拦截并阻止(Cloud Armor返回
/?id=1%20OR%201=1)。HTTP 403 Forbidden - 私有服务器间连接:通过Cloud Run应用日志(Logs Explorer)和数据库连接池遥测(Cloud SQL Query Insights)验证Tier 1 -> Tier 2 -> 数据层的查询通过私有VPC光纤成功完成(+
Direct VPC Egress/Private Service Connect)。Private Services Access
- SSL证书配置:验证Google托管SSL证书(
-
生成定制化自动化验证脚本:不要依赖静态预打包脚本,生成定制化自动化验证脚本(例如,使用标准内置/
urllib库的独立Python验证脚本,或跨平台bash/PowerShell脚本),精确适配用户部署的域名、SSL证书名称和确切的多层subprocessURI。*.run.app -
提供跨平台执行指导:说明用户如何在目标操作系统(、
macOS、Linux或零安装的Google Cloud Shell(Windows PowerShell))上执行生成的脚本。https://shell.cloud.google.com -
编制验证报告:在的第6.4节("解决方案验证指南与定制化自动化验证脚本")中记录验证检查项、生成的验证脚本代码、执行命令和预期结果。
assets/output-template.md -
执行验证并最终确认:协助用户运行生成的验证脚本、检查日志,并排查任何DNS或WAF传播问题。请求最终批准。