dss-demonstrations icon indicating copy to clipboard operation
dss-demonstrations copied to clipboard

validate signature takes 20 seconds + to finish

Open exilonX opened this issue 3 months ago • 3 comments

Hello,

I was trying out the dss-demo-bundle for checking the signatures of a PDF file with multiple pages and on each page one signature, more than 5+ signatures and it takes a very long time to responde

curl --location 'http://localhost:8080/services/rest/validation/validateSignature' \
--header 'Content-Type: application/json' \
--data '{
    "signedDocument": {"bytes": ""},
"tokenExtractionStrategy": "EXTRACT_CERTIFICATES_ONLY"
}'

Any suggestions on how I could reduce the time? I don't need a very strict check of the signatures, I could also rely on validating only the first one, if possible. I just want it to be faster for this case specifically.

For 2-3 signatures per file, works fine under 2 seconds.

Thank you.

exilonX avatar Sep 26 '25 12:09 exilonX

Hi @exilonX ,

You may disable visual and object comparison checks. Please see Disabling PDF comparison security checks in the documentation.

Best regards, Aleksandr

bsanchezb avatar Sep 26 '25 12:09 bsanchezb

@bsanchezb Thanks a lot for the reply. I will try this approach!

I was thinking if there is some policy / extraction strategy which I could specify in the request ? I was looking for an example of validation with policy but didn't find a relevant XML example I could adapt...

The idea is that I need both scenarios (full validation vs basic validation)

exilonX avatar Sep 26 '25 13:09 exilonX

@exilonX , the changes must be implemented on the server side. If you need two validation strategies, you will probably need to introduce a separate end-point with a different validation configuration. Validation policy alone does not allow skipping of the PDF security checks.

bsanchezb avatar Sep 26 '25 13:09 bsanchezb