Entra ID

Microsoft Entra ID 登录页将强制更严格 CSP,阻止脚本注入

3分钟阅读

摘要

Microsoft 将在 2026 年 10 月中下旬对 login.microsoftonline.com 的 Entra ID 浏览器登录页强制实施更严格的 CSP,限制脚本只能来自受信任的 Microsoft CDN,并通过 nonce 机制阻止任意内联脚本执行,以降低身份验证环节的脚本注入风险。这项更新对大多数组织属于无感增强,但依赖浏览器扩展、第三方工具或自定义脚本向登录页注入功能的场景可能失效,因此 IT 管理员应尽快盘点相关依赖并测试关键登录流程。

需要Entra ID方面的帮助?咨询专家

Introduction

Microsoft 正在根据 Secure Future Initiative (SFI) 加固 Microsoft Entra ID 的登录体验。即将实施的 Content Security Policy (CSP) 强制策略旨在防止在身份验证过程中发生外部脚本注入——这是攻击者经常瞄准的环节——通过限制登录页可加载与执行的脚本类型,从而提升安全性。

What’s new

Microsoft 将为 login.microsoftonline.com 上的 Entra ID 登录体验新增并强制执行更严格的 CSP 标头。主要变化包括:

  • Script downloads restricted to trusted Microsoft CDN domains 仅允许从 Microsoft 批准的内容分发网络加载脚本。

  • Inline script execution restricted to trusted Microsoft sources (nonce-based) 将通过 CSP nonce 模式管理内联脚本,阻止任意内联代码运行。

  • Scope limited to browser-based sign-ins on login.microsoftonline.com 该策略仅适用于浏览器中的交互式登录页面。

  • No impact to Microsoft Entra External ID Microsoft 表示,本次更新不影响 Entra External ID 相关体验。

Timeline

  • Global enforcement: Microsoft Entra ID 将在 2026 年 10 月中下旬强制执行更新后的 CSP。
  • Communications: Microsoft 将在推送前定期发送更新通知。

Impact on IT administrators and end users

对大多数组织而言,这将是一项“无感”的安全增强。但对于使用 浏览器扩展、脚本或第三方工具向登录页面注入代码 的环境,预计这类被注入的功能将出现中断。

需要注意的一点是:Microsoft 表示,即使被注入的工具停止工作,用户仍然可以登录——但任何依赖注入实现的覆盖层、埋点/检测、定制化或辅助逻辑都可能失效。

建议重点检查的典型项包括:

  • 会修改登录页面的密码管理器或“安全”类扩展
  • Helpdesk 或 SSO 故障排查覆盖层
  • 通过注入实现的自定义品牌或 UX 修改
  • 通过浏览器脚本挂接登录 UI 的监控或分析工具
  1. Inventory and reduce sign-in page injection dependencies Microsoft 明确建议避免使用会向 Entra 登录体验注入代码的扩展或工具。

  2. Test sign-in flows with Developer Tools open 在浏览器开发者工具开启的情况下,走查常见登录场景(受管设备、非受管设备、不同浏览器、不同条件访问组合),并关注 CSP violations(通常以红色显示)。

  3. Assess different user personas and flows 由于违规可能只在特定团队或特定用户配置(扩展或本地工具)下出现,请使用多个用户组与不同设备配置进行测试。

  4. Replace impacted tools with non-injecting alternatives 若发现关键业务工具依赖脚本注入,请尽早评估替代方案——一旦开始强制执行,登录页脚本注入将不再受支持。

Why this matters

身份验证页面属于高价值目标。在登录边界强制执行 CSP,是降低脚本注入与恶意脚本攻击面的重要举措,可在不影响合规配置的用户登录体验前提下,提高对现代 Web 身份攻击的防护韧性。

需要Entra ID方面的帮助?

我们的专家可以帮助您实施和优化Microsoft解决方案。

咨询专家

获取微软技术最新资讯

Entra IDauthenticationContent Security PolicyCSPSecure Future Initiative

相关文章

Entra ID

Microsoft Entra Backup and Recovery Enters Preview

Microsoft has launched Microsoft Entra Backup and Recovery in public preview, giving organizations a Microsoft-managed way to restore critical identity objects and configurations to a known-good state. The service helps IT teams recover faster from accidental admin changes, provisioning errors, and malicious modifications that could otherwise disrupt access and security.

Entra ID

Microsoft Entra External MFA Now Generally Available

Microsoft has announced general availability of external MFA in Microsoft Entra ID, allowing organizations to integrate trusted third-party MFA providers using OpenID Connect. The feature lets IT teams keep Microsoft Entra ID as the central identity control plane while maintaining Conditional Access, risk evaluation, and unified authentication method management.

Entra ID

Microsoft Entra RSAC 2026 Identity Security Updates

At RSAC 2026, Microsoft announced major Microsoft Entra updates aimed at securing not only users and devices but also AI agents, workloads, and modern multi-tenant environments. The new capabilities—such as expanded Entra Agent ID governance, shadow AI detection, prompt injection protection, passkey enhancements, and adaptive risk-based access—matter because they strengthen Zero Trust identity security as organizations adopt AI and face more dynamic access risks.

Entra ID

Microsoft Entra Secure Access Report 2026 on AI Risk

Microsoft’s Entra Secure Access Report 2026 says AI adoption is significantly increasing identity and network access risk, with 97% of organizations reporting an access-related incident in the past year and 70% tying incidents to AI activity. The report argues that fragmented identity and network tools are making the problem worse, which matters because more organizations are now moving toward consolidated access platforms to better secure AI tools, agents, and machine identities.

Entra ID

Microsoft Entra Conditional Access“所有资源”策略变更指南

微软将从 2026 年 3 月 27 日起逐步更新 Entra 条件访问策略:即使“所有资源”策略配置了资源排除项,只要客户端应用仅请求 OIDC 或少量目录 scopes,这类登录今后也会被一致地执行条件访问控制,不再出现可能绕过策略评估的情况。此变更对配置了“All resources + 资源排除”的租户尤其重要,因为用户可能开始收到新的 MFA、设备合规等验证提示,管理员也应尽快检查并测试那些刻意只请求最小 scopes 的自定义应用是否能正确处理这些质询。

Entra ID

Microsoft Entra Access Priorities:安全 AI 访问与代理身份

微软发布由四场网络研讨会组成的 Microsoft Entra Access Priorities 系列,聚焦构建统一访问基础、保护员工在 AI 时代的访问、治理 AI 代理身份,以及用 Security Copilot agents 提升身份运维效率。此举的重要性在于,随着身份成为用户、应用、设备和 AI 代理的统一控制平面,企业需要以 Zero Trust、抗钓鱼认证和统一访问策略来同时降低复杂性、应对 AI 驱动的新型攻击,并更安全地扩展 AI 应用。