LocalStack for Azure Enters Public Preview with Security Settings Stored but Not Enforced

TL;DR · AI 摘要
LocalStack Azure模拟器进入公开预览,但安全设置仅存储不强制执行,影响开发测试的准确性。
核心要点
- LocalStack支持ARM/Bicep/Terraform等模板但仅实现部分API(如App Service仅实现23%)
- 安全设置如HTTPS强制、VNet集成等在模拟器中存储但不生效
- 网络功能缺失严重,不支持路由、安全规则和ExpressRoute等关键组件
结构提纲
按章节快速跳转。
思维导图
用一张图看清主题之间的关系。
查看大纲文本(无障碍 / 无 JS 友好)
- LocalStack Azure模拟器
- 核心功能
- 支持ARM/Bicep/Terraform模板
- 部分API实现(24资源提供者)
- 安全限制
- 配置存储不生效
- HTTPS/访问控制未强制
- 网络缺失
- 无路由/安全规则
- ExpressRoute未实现
金句 / Highlights
值得收藏与分享的关键句。
If your solution runs perfectly on Azure but fails on our emulator, that is our bug to fix.
Storage Accounts covers 13 of 81 operations, App Service covers 143 of 616.
VNet integration is stored and returned with no network effect.
LocalStack for Azure 正式进入公开预览阶段,安全设置已存储但未强制执行 - InfoQ
InfoQ 首页新闻 LocalStack for Azure 正式进入公开预览阶段,安全设置已存储但未强制执行
DevOps
扩展 OpenTelemetry:管理收集器、配置和成本(网络研讨会 11月19日)
LocalStack for Azure 正式进入公开预览阶段,安全设置已存储但未强制执行
2026年10月31日 3分钟阅读
作者:
- Steef-Jan Wiggers
#### 关注我们
YouTube
232K 粉丝
26K 粉丝
新
RSS
19K 读者
X
57.1k 粉丝
21K 点赞
Bluesky
收听本文 -
0:00
音频准备就绪
您的浏览器不支持音频元素。
正常
1.25x
1.5x
喜欢
新下拉阅读列表
- 阅读列表
LocalStack 已将其 Azure 模拟器投入公开预览阶段,提供免费且自助式服务,预计2027年初将正式发布。其官方文档坦率地指出了资源模拟与行为模拟之间的差距。
该产品可在开发者的本地机器上运行 Azure 服务,无需重写即可支持现有的 ARM 和 Bicep 模板、Terraform 模块、Pulumi 程序以及 Azure CLI 脚本。其宣传点在于,如 LocalStack 所述,"无需等待开发订阅或为每次迭代付费即可测试应用程序"。服务范围广泛,涵盖 AKS、容器应用、函数、应用服务、Cosmos DB、服务总线、事件中心、密钥保管库、应用配置、托管身份、API 管理等,其覆盖范围甚至超出了公告本身的描述。每位开发者都会获得一个独立的沙盒环境,LocalStack 将其定位为开发和测试工具,而非 Azure 的替代方案。
该项目由 Paolo Salvatori 主导,他曾在微软担任28年高级主管,后加入 LocalStack,同时也是服务总线资源管理器的创建者。他用一句话定义了精确度标准:
如果您的解决方案在 Azure 上运行完美但在我们的模拟器上失败,那将是我们需要修复的错误。
文档涵盖了24个资源提供者,并报告了每个 API 的实现程度。存储账户实现了81个操作中的13个。应用服务实现了616个操作中的143个。虚拟网络实现了29个操作中的10个。
更有实用价值的是已实现操作的处理方式。配置通常会被接受、存储并返回,但不会生效。在应用服务中:
密钥、访问限制、身份验证设置和发布凭据策略均未强制执行。
同一页还记录了 httpsOnly 未被强制执行,模拟器提供 HTTP 服务,自定义主机名绑定被存储并列出,但应用程序仅响应默认名称,虚拟网络集成被存储并返回但无网络效果,备份配置被存储但未实现备份和恢复功能。
网络功能同样遵循这一模式。虚拟网络页面明确指出:"模拟器不路由网络流量或强制执行安全规则",不支持对等连接,且未实现 VPN 网关、ExpressRoute 电路、负载均衡器、应用网关和网络监视器。私有 DNS 区域仅接受 A 记录。
Several Storage divergences land on authentication. Data-plane requests with a bearer token succeed whenever a token is present unless RBAC enforcement is enabled. A user delegation SAS does not re-check the principal’s RBAC when used. A SAS restricted to the caller’s public IP is refused because the emulator sees a Docker or loopback address. Unsupported request headers are silently accepted rather than rejected, and the x-ms-version header is not validated at all.
在认证方面出现了多个存储差异。只要存在令牌,数据平面请求使用承载令牌即可成功,除非启用了RBAC强制执行。使用用户委托SAS时,不会重新检查主体的RBAC权限。由于模拟器看到的是Docker或回环地址,限制为调用者公共IP的SAS会被拒绝。不支持的请求头会被静默接受而非拒绝,且x-ms-version头根本不会被验证。
That promise is about code that runs in Azure and fails locally. The documented gaps mostly describe the reverse: an app with httpsOnly set serves HTTP here, and a data-plane request carrying any bearer token gets through. Both pass locally, and nothing in the run flags the difference.
该承诺涉及在Azure中运行但本地失败的代码。文档中描述的差距大多相反:设置httpsOnly的应用在此处提供HTTP服务,携带任何承载令牌的数据平面请求都能通过。两者在本地均能通过,运行中没有任何内容标记出差异。
Three behaviors will surprise people before any of that does. A web app created on a Windows plan runs its code in the Linux runtime. The Oryx build image ships for amd64 only, so on Apple Silicon a code deployment’s build fails, and the app starts without its dependencies. App Service state is held in memory and lost when the emulator stops.
在上述情况发生之前,有三种行为会让人感到意外。在Windows计划上创建的Web应用其代码在Linux运行时中运行。Oryx构建镜像仅提供amd64版本,因此在Apple Silicon上代码部署的构建会失败,应用在缺少依赖项的情况下启动。App Service的状态存储在内存中,模拟器停止时会丢失。
Microsoft’s own local tooling is narrower and older. Azurite emulates Blob, Queue, and Table storage, the Cosmos DB emulator covers that database, and Azure Functions Core Tools runs Functions locally. None compose into a single environment where an ARM or Bicep deployment can be exercised end to end, which is the gap LocalStack aims to fill.
微软自身的本地工具更为狭窄且陈旧。Azurite模拟Blob、队列和表存储,Cosmos DB模拟器覆盖该数据库,Azure Functions Core Tools可在本地运行函数。它们无法组合成一个单一环境来端到端测试ARM或Bicep部署,这正是LocalStack试图填补的空白。
LocalStack also pitches the sandbox at AI agents, somewhere they can "deploy, break, and retry" without live credentials. An agent iterating there gets access restrictions stored rather than applied, and any bearer token accepted. Both come back as passes.
LocalStack还将沙盒定位为AI代理的测试环境,代理可以在无需实时凭证的情况下“部署、破坏并重试”。在该环境中迭代的代理会存储而非应用访问限制,且接受任何承载令牌。两者均返回通过结果。
Developer experience features, including App Inspector, snapshots, and the chaos APIs, are not in preview. Pricing arrives at general availability, and preview access ends there. The transition terms are not settled: the product page still carries "[30 days]" as a literal placeholder and an unfilled next-steps section.
开发者体验功能(包括App Inspector、快照和混沌API)尚未公开预览。定价在一般可用性阶段发布,预览访问在此终止。过渡条款尚未确定:产品页面仍保留"[30 days]"作为字面占位符,且“下一步”部分尚未填写。
main wrapper for authors section
About the Author
section title
main wrapper for each author
#### Steef-Jan Wiggers
Show more
Show less
#### This content is in the DevOps topic
##### Related Topics:
- Development
- DevOps
- Cloud
- Infrastructure as Code
- Azure
- Developer Experience
- Related Editorial
- Related Sponsors AI's Physical Constraints: How AI Rewired the Data Center
- Related Sponsor PostgreSQL Built for Time-Series Scale Handle massive time-series data with PostgreSQL, without sacrificing performance. Discover how Tiger Data delivers high-speed ingest, fast queries, and scalable storage. Learn More .
The InfoQ Newsletter
A round-up of last week’s content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example
We protect your privacy.