/
Digital signature validation
Published Jul 2, 2024

ЕСОЗ - публічна документація

Digital signature validation

Purpose

This page designed to describe main validations of Digital Signature

Validate DS

  1. Validate request is signed

    1. in case of error - return 422 (“Invalid signature” OR “Invalid signed content” for medical_events requests)

  2. Check DS is valid and not expired

  3. Validate that DS belongs to the user

    1. Check that DRFO from DS and party.tax_id matches

      1. in case of error - return 422 (“Does not match the signer drfo“)

Cases with more then 1 signature

If more then 1 signature is needed for request:

  • Validate request is signed

    • in case of error - return 422 (“Invalid signature”)

  • If 1 signature present (or more) - check other signatures / stamps

    • in case of error - return 422 (“document must contain <number> signature and <number> stamps but contains <number> signatures and <number> stamps”)

  • If all signatures / stamps are present, valid and not expired - validate that DS belongs to the user

    1. Check that DRFO from DS and party.tax_id matches

      1. in case of error - return 422 (“Does not match the signer drfo“)


Additional cases

In some cases DS timestamp check present (now is actual for PIS auth endpoints):

  • Check that the difference in minutes between the current datetime and datetime of signed_content signature timestamp (created_at field, in EET format) is less than the SIGNED_CONTENT_SIGNATURE_TIMESTAMP_VALID_MINUTES config parameter

    • in case of error - return 401 ('Digital signature timestamp is expired')

In some cases (for example Process Medication dispense) signer last_name check present:

  • Check that Last Name from DS and party.last_name matches

    • in case of error - return 422 (“Does not match the signer last name“)

Related content

Digital signature
Digital signature
Read with this
PIS. Sign Declaration request
PIS. Sign Declaration request
More like this
Технічні вимоги/Тестова програма
Технічні вимоги/Тестова програма
Read with this
RC_(CSI-1323)_Sign declaration request v3
RC_(CSI-1323)_Sign declaration request v3
More like this
Sign declaration request v3
Sign declaration request v3
More like this
PIS. Patient sign-up validation
PIS. Patient sign-up validation
More like this

ЕСОЗ - публічна документація