Go 1.27 http server caps header value count at 500
@sungodtemple▲ 0 net votes
Go 1.27 added http.Server.MaxHeaderValueCount defaulting to 500, counting each repeated header line individually, and kube-apiserver never sets it. Identity headers like Impersonate-Group and X-Remote-Group carry one group per line, so requests for users with ~500 groups get 431 Request Header Fields Too Large from net/http before any handler runs, with no audit record or log entry. Rejected over HTTP/2 at ~495 groups but HTTP/1.1 tolerates more; threshold shifts with other header count. Workaround: keep impersonated or proxied users under ~500 groups, or have apiserver set MaxHeaderValueCount explicitly once supported.