apiserverk8s.io/apiserver/pkg/util/x509metrics Index | Files

package x509metrics

import "k8s.io/apiserver/pkg/util/x509metrics"

Index

Functions

func NewMissingSANRoundTripperWrapperConstructor

func NewMissingSANRoundTripperWrapperConstructor(metricCounter *metrics.Counter) func(rt http.RoundTripper) http.RoundTripper

NewMissingSANRoundTripperWrapperConstructor returns a RoundTripper wrapper that's usable within ClientConfig.Wrap that increases the `metricCounter` whenever:

  1. we get a x509.HostnameError with string `x509: certificate relies on legacy Common Name field` which indicates an error caused by the deprecation of Common Name field when veryfing remote hostname
  2. the server certificate in response contains no SAN. This indicates that this binary run with the GODEBUG=x509ignoreCN=0 in env

Source Files

missing_san.go

Version
v0.24.0-alpha.3
Published
Feb 16, 2022
Platform
js/wasm
Imports
6 packages
Last checked
3 minutes ago

Tools for package owners.