2026-01-20T09:44:18.393Z [INFO ] [org.mockserver.log.MockServerEventLog] - [] - 53837 request:
{
"method" : "POST",
"path" : "/oauth2/token",
"headers" : {
"User-Agent" : [ "Apache-HttpClient/5.4.4 (Java/21.0.2)" ],
"Host" : [ "127.0.0.1:53837" ],
"Content-Type" : [ "application/x-www-form-urlencoded;charset=UTF-8" ],
"Content-Length" : [ "93" ],
"Connection" : [ "keep-alive" ],
"Accept-Encoding" : [ "gzip, x-gzip, deflate" ],
"Accept" : [ "application/json;charset=UTF-8" ]
},
"keepAlive" : true,
"secure" : true,
"clientCertificateChain" : [ {
"serialNumber" : "318619774677618729124681099666146999785057909301",
"issuerDistinguishedName" : "1.2.840.113549.1.9.1=#1619737570706f7274406a6f75726e65792e69616d2e6c6f63616c,CN=journey-iam.local,OU=Testing,O=SomeCo,L=Margareten,ST=Vienna,C=AT",
"subjectDistinguishedName" : "CN=client@test.local",
"signatureAlgorithmName" : "SHA256withRSA"
}, {
"serialNumber" : "41037674007140229583236597161241126023700827647",
"issuerDistinguishedName" : "1.2.840.113549.1.9.1=#1619737570706f7274406a6f75726e65792e69616d2e6c6f63616c,CN=journey-iam.local,OU=Testing,O=SomeCo,L=Margareten,ST=Vienna,C=AT",
"subjectDistinguishedName" : "1.2.840.113549.1.9.1=#1619737570706f7274406a6f75726e65792e69616d2e6c6f63616c,CN=journey-iam.local,OU=Testing,O=SomeCo,L=Margareten,ST=Vienna,C=AT",
"signatureAlgorithmName" : "SHA256withRSA"
} ],
"protocol" : "HTTP_1_1",
"localAddress" : "127.0.0.1:53837",
"remoteAddress" : "127.0.0.1:53910",
"body" : "grant_type=client_credentials&scope=d41633aa-4858-42b5-a7bc-3cad4e7708cb&client_id=local-mTLS"
}
matched expectation:
Describe the issue
using
.retrieveRecordedRequests(HttpRequest.request())does not return theclientCertificateChaineven though I can clearly see them in the server's logs when it matched the request against a expectation:What you are trying to do
Description of what you are trying to do so we can understand the context of the problem
MockServer version
The version you are using
To Reproduce
Steps to reproduce the issue:
Expected behaviour
What you expected to happen
MockServer Log
Log output, as INFO level (or lower)