envoyproxy/envoy

Question: Does XFCC http header has to formatted following RFC 2253 ?

Open

#13,244 opened on Sep 23, 2020

View on GitHub
 (2 comments) (0 reactions) (0 assignees)C++ (5,373 forks)batch import
area/tlsenhancementhelp wanted

Repository metrics

Stars
 (27,997 stars)
PR merge metrics
 (Avg merge 8d) (378 merged PRs in 30d)

Description

Background

SSL info is deserialized from x509 to string and the potential consumers are XFCC header and access log.

Envoy deserialize cert subject following the RFC2253

std::string Utility::getSubjectFromCertificate(X509& cert) {
  return getRFC2253NameFromCertificate(cert, CertName::Subject);
}

RFC2253 explicitly mentioned that if the key is not well-known, the value's string representation is BER encoding of an OCTET STRING.

   An example name in which an RDN was of an unrecognized type.  The
   value is the BER encoding of an OCTET STRING containing two bytes
   0x48 and 0x69.

   1.3.6.1.4.1.1466.0=#04024869,O=Test,C=GB

The OCTET STRING is not very user-friendly in access log. #04024869 is printable ascii.

My question is

  1. Is there any workaround so we can print ASCII 0x48 0x69 to "Hi" in access log?
  2. Does XFCC header have to be RFC2253? What if we make it "1.3.6.1.4.1.1466.0=Hi"?

Contributor guide