本文档采用自动化机器翻译技术翻译。 尽管我们力求提供准确的译文,但不对翻译内容的完整性、准确性或可靠性作出任何保证。 若出现任何内容不一致情况,请以原始 英文 版本为准,且原始英文版本为权威文本。

这是尚未发布的文档。 Admission Controller 1.34-dev.

加密能力

由于撰写时Wasm的限制,某些加密库无法编译为Wasm。与此同时,SUSE Security Admission Controller需要这些库的策略可以执行回调,以在主机端评估加密功能。它们接收结果,并继续执行任务。

行为

Wasm主机依赖于`rustls-wepki`来实现x.509和PKI证书。也就是说:

  • 密钥使用:我们选择接受任何密钥使用,这有助于覆盖多个用例(如往常一样,如果您想讨论不同的方法,请与我们联系)。

  • 证书链:如果其中间CA已过期,则该证书将被视为不受信任。

  • 证书到期日期:如果提供了证书链,我们将始终验证证书的整个有效期。Wepki不检查root CA的到期情况。

  • 我们始终验证证书,如果未提供链,则使用Mozilla的CA。

WaPC协议合同

如果您正在实现自己的语言SDK,这些是主机公开的执行加密检查的函数:

waPC函数 - v1/is_certificate_trusted 输入

# Certificate:
{
  # **mandatory**: Which encoding is used by the certificate
  # Either the string "Pem" or "Der".
  "encoding": string,
  # Actual certificate
  # The certificate is UTF-8 encoded.
  # It's an array of bytes of the unicode code pointers of a PEM/DER encoded
  # certificate string.
  "data": [byte(int), ..., byte(int)]
}

{
  # **mandatory**: PEM-encoded certificate to verify
  "cert": Certificate,
  # optional:
  "cert_chain": [
      # list of certs, ordered by trust
      # usage (intermediates first, root last)
      # If not provided, Mozilla's CA is used.
      Certificate,
      ...
      Certificate,
    ],
  # RFC 3339 time format string, to check expiration
  # against.
  # If missing, time is now.
  "not_after": string
}

waPC函数 - v1/is_certificate_trusted 输出

{
   # true if certificate verified:
   "trusted": boolean,
   # empty if trusted == true:
   "reason": string
}