I have a header coming from downstream that looks something like this:
“subjectdn: serialNumber=randomnumbers, ST=someStateOrProvinceName, L=someLocality, C=someCountryName, O=someOrganizationName, OU=someOrganizationalUnit, CN=someCommonName” - so basically some fields from the client TLS certificate. TLS is terminated downstream.
How can I extract the value of sertialNumber? I can get the whole subjectdn with capture.req.hdr(subjectdn) but using it later will just give me the last CN=someCommonName value.
Thanks, this lead me to the final solution I needed. Instead of a header I use it in variable that will be part of a composite key to identify API clients.