跳到主要内容

4. 概述 (Overview)

4. 概述 (Overview)

WebRTC security architecture 由多个层次组成:

4.1 Protocols

WebRTC 使用现有 secure protocols:

  • DTLS-SRTP [RFC5764] 用于 media encryption 和 key establishment.
  • SCTP over DTLS [RFC8261] 用于 data channels.
  • ICE [RFC8445] 用于 NAT traversal 和 consent verification.

4.2 应用接口 (Application Interface)

WebRTC API 允许 web application 建立 secure connections. 但是, browser (UA) 会强制执行 application 无法覆盖的 security invariants, 例如:

  • 对所有 media 和 data 强制加密.
  • 对 device access (camera, microphone) 要求明确 user consent.
  • 强制执行 Same-Origin Policy.

4.3 身份 (Identity)

为了将 secure channel (DTLS) 绑定到人的身份, WebRTC 使用 identity assertion mechanism. Identity Provider (IdP) 生成 assertion (例如 digitally signed token), 将用户身份链接到其 UA 的 DTLS fingerprint. 此 assertion 会传递给 remote peer, 由 remote peer 使用 IdP 验证. 这确保 secure channel 另一端的人控制着 IdP 所断言的身份.