Malformed ATS Configuration
格式错误的 ATS 配置
描述
该问题源于 NSExceptionDomains 配置中不正确或格式错误的结构。NSExceptionDomains 结构应遵循特定的格式,其中包括一个包含域名或 IP 地址的字典,每个域名或 IP 地址都与一个字典相关联,该字典指定了各种与安全相关的属性,例如 NSIncludesSubdomains、NSExceptionAllowsInsecureHTTPLoads、NSExceptionMinimumTLSVersion 和 NSExceptionRequiresForwardSecrecy。如果不符合此预期结构,可能会导致安全漏洞或应用程序中出现意外行为。
正确示例 :
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>test.io</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
<key>example-mobile.com</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
错误示例 :
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>test.io</key>
<string>test</string>
<key>example-mobile.com</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
建议
务必遵守指定的标准,以确保与预期用法的一致性和兼容性。下面概述的预期结构作为预期的标准:
NSExceptionDomains : Dictionary {
<domain-name-or-ip-address-string> : Dictionary {
NSIncludesSubdomains : Boolean
NSExceptionAllowsInsecureHTTPLoads : Boolean
NSExceptionMinimumTLSVersion : String
NSExceptionRequiresForwardSecrecy : Boolean
}
}
链接
标准
- PCI_STANDARDS:
- REQ_2_2
- REQ_6_2
- HIPAA_CONTROLS:
- SECURITY252
- SECURITY212
- SECURITY213