pki icon indicating copy to clipboard operation
pki copied to clipboard

Handle SCEP PKI message in POST request body

Open borama opened this issue 3 years ago • 2 comments

This is a minimal implementation of parsing the SCEP PKI message from the body of the request. When a POST request is received in the servlet, the code expects binary data in the POST body and tries to parse it into the message, which is then handled the same way as the message from a GET parameter.

I am not sure whether Dogtag uses POST requests in the servlet internally but if it does, it might bring problems as reading the body clashes with current code for determining the parameters (AFAIK, the body of a servlet request may be read only once and both the new code as well as the current code in the toHashTable method try to read the request body). Ideally, we should only read POST body when the application/x-pki-message content_type is present in the request but in reality it seems that many SCEP clients don't do that.

borama avatar Aug 30 '20 02:08 borama

\o hey @borama -- sorry, we've been a bit busy. Hope to take a look at it by late next week. :)

cipherboy avatar Sep 08 '20 20:09 cipherboy

Hi @cipherboy, sure, no worries, thanks!

borama avatar Sep 08 '20 23:09 borama