SignServer exposes four HTTP servlets that accept signing and validation requests directly over HTTP, without going through the REST API or a web client. Each servlet accepts GET or POST requests and returns the signed or validated result in the HTTP response body.
Overview
|
Servlet |
Endpoint |
Methods |
Purpose |
|---|---|---|---|
|
Generic Process Servlet |
|
|
General-purpose signing and validation requests |
|
Worker Servlet |
|
|
Same as Generic Process Servlet, with the Worker fixed in the URL |
|
SOD Process Servlet |
|
|
ePassport (MRTD) SOD signing, and Signer certificate retrieval |
|
SOD Process Worker Servlet |
|
|
Same as SOD Process Servlet, with the Worker fixed in the URL |
Generic Process Servlet
General-purpose endpoint for signing and validation requests. The Worker is selected with the workerName or workerId parameter.
Request
GET|POST /signserver/process
Request content-type: None, x-www-form-urlencoded, multipart/form-data, or other.
If the request content-type in a POST is specified as something else than x-www-form-urlencoded or multipart/form-data, the message body is not parsed but instead directly passed to the Worker specified by workerName or workerId in the URI's query string.
|
Request Parameter |
Description |
|---|---|
|
|
Name of the Worker that should handle the request. Required unless |
|
|
ID of the Worker that should handle the request. Required unless |
|
|
The bytes that should be signed or validated. Required for |
|
|
File upload used with multipart/form-data. |
|
|
(Optional) Password for changing PDF. This can also be specified using the generic meta data parameters described below, using the key "pdfPassword". Only used by PDF Signer. |
|
|
(Optional) Metadata to pass on. Specified in Java properties file syntax. |
|
|
(Optional) Sets a meta data parameter with the key specified by |
|
|
(Optional) Encoding of the data field. By specifying |
|
|
(Optional) The type of request. Valid options: If not specified, defaults to |
Response
Response content-type depends on the Worker. For validators, the type is text/plain. See Response Codes.
Response content:
-
Signers return the signed document.
-
Document validators return a string starting with
VALIDorINVALID. -
Certificate validators return a
;-separated string: validation status code (see below), valid purposes, status message, revocation reason (-1if not revoked), and revocation date (empty if not revoked).
|
Validation Status Code |
Description |
|---|---|
|
|
The certificate is valid |
|
|
The certificate has been revoked |
|
|
The certificate is not yet valid |
|
|
The certificate has expired |
|
|
The certificate does not verify |
|
|
The CA certificate has been revoked |
|
|
The CA certificate is not yet valid |
|
|
The CA certificate has expired |
|
|
The certificate has no valid certificate purpose |
|
|
The issuer of the certificate is not supported |
Worker Servlet
HTTP requests can be sent to the SignServer servlet WorkerServlet located at /signserver/worker/* using either POST or GET.
Requests are forwarded to the GenericProcessServlet, except that the Worker name is taken from the URL. Worker name or ID given through request parameters are ignored.
Request
GET|POST /signserver/worker/* (* denotes a Worker name)
Request content-type: None, x-www-form-urlencoded, multipart/form-data, or other.
|
Request Parameter |
Description |
|---|---|
|
|
The bytes that should be signed or validated. Required for |
|
|
File upload used with multipart/form-data. |
|
|
(Optional) Password for changing PDF. This can also be specified using the generic meta data parameters described below, using the key "pdfPassword". Only used by PDF Signer. |
|
|
(Optional) Encoding of the data field. By specifying |
Response
Response content-type depends on the Worker. For validators, the type is text/plain. See Response Codes.
SOD Process Servlet
The SOD Process Servlet receives HTTP POST requests containing data group hashes and creates a MRTD SOD Signer Request and passes it to the specified MRTD SOD Signer. The response from the servlet is the signed security object in binary format.
ePassport Signing Requests
POST /signserver/sod
|
Request parameters |
Description |
|---|---|
|
|
Name of the Worker to get the certificate from. Required unless |
|
|
Id of the Worker to get the certificate from. Required unless |
|
|
The data group hashes that should be put in the SO(d). At least one required.
|
|
|
(Optional) Encoding of the data group hash fields. By specifying |
|
|
(Optional) Request a specific LDS version:
If not specified, the version from the configuration is used. If version is V1.8, |
|
|
(Optional) Unicode version to store in the SOD. Only supported if the LDS version is V1.8. Specify |
Other Requests
GET /signserver/sod
|
Request parameters |
Description |
|---|---|
|
|
Name of the Worker to get the certificate from. Required unless |
|
|
Id of the Worker to get the certificate from. Required unless |
|
|
If set to |
|
|
If set to |
Response
Response content-type: application/octet-stream. See Response Codes.
SOD Process Worker Servlet
Servlet receiving HTTP POST requests containing data group hashes and creates a MRTD SOD Signer Request and passes it to the specified MRTD SOD Signer. The response from the servlet is the signed security object in binary format.
Requests are forwarded to the SOD Process Servlet, except that the Worker name is taken from the URL. Worker name or ID given through request parameters are ignored.
Request
POST /signserver/sodworker
|
Request parameters |
Description |
|---|---|
|
|
The data group hashes that should be put in the SO(d). At least one required.
|
|
|
(Optional) Encoding of the data group hash fields. By specifying |
|
|
(Optional) Request a specific LDS version:
If not specified, the version from the configuration is used. If version is V1.8, |
|
|
(Optional) Unicode version to store in the SOd. Optional. Only supported if the LDS version is V1.8. Specify |
Response
Response content-type: application/octet-stream. See Response Codes.
Response Codes
|
Status |
Meaning |
|---|---|
|
|
The request was successful. |
|
|
The request could not be fulfilled. Some request data were missing or incorrect. |
|
|
The Worker requires user authentication. |
|
|
The requested |
|
|
The data field or uploaded file is too large. See the HTTP_MAX_UPLOAD_SIZE global configuration property. |
|
|
There was an internal error when processing the request. Typically indicating a configuration problem or unexpected error at the server side. |
|
|
The Worker is not active, such as the Crypto Token is not activated or similar issue. |
Configuration Properties
These global configuration properties apply to all four servlets. For more information, see Global Configuration Properties for the full list and how to set them.
|
Property |
Default |
Description |
|---|---|---|
|
|
|
Global configuration property that can be set to specify the maximum size (in bytes) that is allowed for an HTTP request. |
|
|
|
Global configuration property that is set to a default of 16 which typically would support up to around 10 request metadata properties depending on how many other fields are provided. If more fields are needed, the property can be adjusted. |
|
|
|
Global configuration property that can be set to specify the size threshold (in bytes) after which the data is written to disk. The directory uploaded files are temporarily stored to is the default temp directory and can be changed by starting the application server with a different value for the Java property java.io.tmpdir. |