Skip to main content

General Information

Policy Type

Description

Digital Sign Verification policy verifies digital signatures using cryptographic keys or certificates. It validates signatures against source data and ensures data integrity and authenticity. This policy provides signature verification capabilities for incoming requests or responses.

Endpoints

List Policies

Add Policy

Update Policy

Delete Policy


List Policies

Endpoint

Request

Headers

Path Parameters

Response

Success Response (200 OK)

cURL Example


Add Policy

Endpoint

Request

Headers

Path Parameters

Request Body

Full JSON Body Example - Verify with Key
Full JSON Body Example - Verify with Certificate
Full JSON Body Example - Dynamic Algorithm from Variable

Request Body Fields

operationMetadata
Enum: targetScope
  • API_PROXY - Policy applies to all endpoints
  • ENDPOINT - Policy applies only to specified endpoint
Enum: targetPipeline
  • REQUEST - Executes in request pipeline (verifies request signatures)
  • RESPONSE - Executes in response pipeline (verifies response signatures)
  • ERROR - Executes in error pipeline
Enum: targetEndpointHTTPMethod
  • GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD
policy
Note: digitalSignVerificationDefList must contain at least one verification definition.
digitalSignVerificationDefList
Each verification definition is an object with the following fields:

EnumSignatureAlgorithm

  • RSA algorithms: NONEwithRSA, MD2withRSA, MD5withRSA, SHA1withRSA, SHA224withRSA, SHA256withRSA, SHA384withRSA, SHA512withRSA
  • DSA algorithms: NONEwithDSA, SHA1withDSA, SHA224withDSA, SHA256withDSA
  • ECDSA algorithms: NONEwithECDSA, SHA1withECDSA, SHA224withECDSA, SHA256withECDSA, SHA384withECDSA, SHA512withECDSA

EnumKeyCertificateType

  • KEY - Use public key from CryptoKeyInfo by name
  • CERTIFICATE - Use certificate by name (extracts public key from certificate)

EnumEncodingType

  • BASE64 - Base64 encoding (matches BASE64 output from sign policy)
  • HEXADECIMAL - Hexadecimal encoding (matches HEXADECIMAL output from sign policy)

Note

  • sourceVar and signatureVar are required.
  • Either signatureAlgorithm or signatureAlgorithmVar must be provided.
  • If keyCertificateType: KEY, keyName is required.
  • If keyCertificateType: CERTIFICATE, certificateName is required.
  • inputEncodingType must match the outputEncodingType used when signing.

Response

Success Response (200 OK)

cURL Example


Update Policy

Endpoint

Request

Headers

Path Parameters

Request Body

Note: Request body structure is the same as Add Policy. All fields should be provided for update.

Response

Success Response (200 OK)


Delete Policy

Endpoint

Request

Headers

Path Parameters

Request Body

Full JSON Body Example

Response

Success Response (200 OK)


Notes and Warnings

  • Signature Algorithms:
    • RSA: SHA256withRSA, SHA384withRSA, SHA512withRSA (recommended)
    • ECDSA: SHA256withECDSA, SHA384withECDSA, SHA512withECDSA (for elliptic curve)
    • DSA: SHA1withDSA, SHA224withDSA, SHA256withDSA (legacy)
  • Key/Certificate Type:
    • KEY - Uses public key from CryptoKeyInfo (requires keyName)
    • CERTIFICATE - Extracts public key from certificate (requires certificateName)
  • Input Encoding:
    • BASE64 - Base64 encoding (must match sign policy output)
    • HEXADECIMAL - Hexadecimal encoding (must match sign policy output)
  • Source Variable: Variable containing data that was signed (must match original signed data)
  • Signature Variable: Variable containing signature to verify
  • Signature Algorithm:
    • Can be specified directly via signatureAlgorithm
    • Can be extracted from variable via signatureAlgorithmVar
    • Must match algorithm used for signing
  • Key Management:
    • CryptoKeyInfo or Certificate must be configured in Apinizer
    • Keys and certificates are referenced by name; the system resolves them to internal IDs automatically
    • Public key must be accessible for verification
    • Key must match signature algorithm (RSA key for RSA algorithms, ECDSA key for ECDSA algorithms)
  • Verification Failure:
    • Invalid signature causes verification to fail
    • Policy execution stops and error is returned
    • Request/response is blocked if verification fails
  • Performance: Signature verification adds cryptographic processing overhead. Use for necessary integrity/authenticity checks only.
  • Pipeline:
    • REQUEST pipeline verifies request signatures before processing
    • RESPONSE pipeline verifies response signatures before sending to client
  • Error Handling: Invalid signature, missing data, or algorithm mismatch causes verification to fail
  • Deployment: Policy changes require deployment to take effect. Set deploy: true or deploy manually.