8. 安全考虑事项 (Security Considerations)
HTTP [HTTP] 的安全考虑事项适用于 binary format 的使用. binary format 允许编码所有 HTTP messages, 包括具有 security-relevant attributes 的 messages.
关键安全考虑事项:
-
Message Integrity - Recipients MUST 验证 messages 符合 format specification
-
Size Limits - Implementations SHOULD 对 message 和 field sizes 施加限制, 以防止 resource exhaustion
-
Field Name Case - Implementations MUST 将 field names 转换为小写, 以防止 case-sensitivity attacks
-
Truncation - 必须检测并适当处理 truncated messages
-
Authenticated Encryption - 此格式支持对整个 messages 进行 authenticated encryption, 可防止 tampering
-
Information Exposure - 与 text encodings 相比, binary encoding 可能减少某些信息暴露
-
Invalid Messages - Implementations MUST 将 invalid messages 视为 errors, 并且 MUST NOT 转发它们
将 authenticated encryption, 例如 AEAD algorithms, 与 binary HTTP messages 一起使用, 可为整个 message 提供 confidentiality 和 integrity protection, 包括 headers 和 content.