signserver-ce icon indicating copy to clipboard operation
signserver-ce copied to clipboard

Improve documentation for "encoding" parameter in REST interface

Open Vampire opened this issue 1 year ago • 2 comments

I tried to get client-side hashing via the "REST Interface" to work. I had a hard time (in the end reading the source code) to find out, that I have to give data base64 encoded and addtionally set encoding to BASE64. I just got as error, that the supplied data length does not match the hash algorithm expected length. After I have set encoding to BASE64 it started working. But the only places where it is mentioned is in doc/htdocs/REST_Interface.html as possible request parameter. But it is nowhere really described and completely missing e.g. from https://docs.keyfactor.com/signserver/latest/plain-signer and https://docs.keyfactor.com/signserver/latest/client-side-hashing.

I think it would be very beneficial to add some words about it to the documentation.

Vampire avatar Nov 06 '24 16:11 Vampire

This is a parameter in the REST interface so it would not fit on the client-side-hashing page. The authoritative source for it should be in the OpenAPI spec but there currently it is only given with an example of encoding=NONE. The other place is on the REST interface page where as you say it is only mentioned as a possible parameter.

Two improvements could be made:

  • Specify it more clearly in the OpenAPI spec both with explanation about what it is and with its possible values
  • On the REST interface page also explain it there and/or include an example for it

netmackan avatar Feb 14 '25 18:02 netmackan

The REST documentation is getting a major overhaul including getting examples (both cURL and Postman) for most endpoints.

netmackan avatar Jul 01 '25 07:07 netmackan