envoyproxy/envoy

Expose TLS peer certificate validation status in CEL context etc.

已關閉

#45,660 建立於 2026年6月16日

 (1 則留言) (1 個反應) (0 位負責人)C++ (5,373 個分叉)batch import
area/celenhancementhelp wanted

倉庫指標

星標
 (27,997 顆星)
PR 合併指標
 (平均合併 8天) (30 天內合併 378 個 PR)

描述

In an optional mTLS setting, i.e. where a client may present a certificate, which in turn is accepted even if untrusted (i.e. with verify_trust_chain: ACCEPT_UNTRUSTED), a user is still interested in whether a peer certificate was presented and whether it was valid.

The information whether a certificate was presented is currently already being exposed using the connection.mtls context attribute. The validation status, however, is not. I therefore propose introducing a new context attribute that reflects the validation status in a similar vein, e.g. connection.peer_certificate_valid.

Furthermore, but I'm open to opening a separate issue for this, having a substitution formatter variable like '%DOWNSTREAM_PEER_CERTIFICATE_VALIDATION_STATUS%' that reflects this information would be good to have as well. There could be some predefined values for successful validation, failed validation, and no certificate having been presented. nginx exposes something similar in its ssl_client_verify variable.

Relevant Links: This information is already exposed to the Lua filter, as was introduced in #12174. Making it available in more locations makes it easier to do certain things (such as add a header with this information) without having to resort to the "big guns" of a Lua filter.

貢獻者指南