Skip to main content
This document explains the detailed usage of a specific policy. If you are using Apinizer policies for the first time or want to learn the general working principles of policies, we recommend reading the What is Policy? page first.

Overview

What is its Purpose?

  • Ensures integrity and non-repudiation by adding digital signatures to critical parts of request or response messages.
  • Standardizes and makes the signing process auditable through centralized management of secret keys.
  • Reduces maintenance costs by creating reusable signature templates in different API Proxy flows.
  • Enables dynamic adaptation of the verification side by optionally adding signature algorithm information to the message.

Working Principle

  1. Request Arrival: For each HTTP/HTTPS request arriving at the API Gateway, the source IP address of the request is identified.
  2. Policy Check: If the Digital Signature policy is active, the system checks in the following order:
    • Is a Condition defined? If so, is the condition met?
    • Is the policy active (active=true)?
    • Is a Variable being used or is Apinizer default?
  3. Digital Signature Generation: For each defined signature rule, the text in the source variable is read, signed with the selected private key/certificate and algorithm, and the output is written to the target variable with the selected encoding (Base64/Hex); if the algorithm variable is defined, it is updated simultaneously.
  4. Decision Making:
    • Match Found: If data is found in the source variable, signature is generated and placed in the target variable.
    • No Match: If source data is empty, signature is skipped, target variable is updated with empty value and flow continues.
  5. Error Handling: Customizable HTTP status code and error message are returned for requests that do not comply with the policy rule.

Features and Capabilities

Basic Features

  • Multiple Signature Definition: Provides the ability to sign different message fields with different algorithms and keys under a single policy.
  • Variable-Based Targeting: Provides flexibility for both request and response by selecting variables for the data to be signed and the field where the signature will be written.
  • Certificate/Key Integration: Secret keys or certificates are selected through Apinizer Secret Manager, revocation checks are performed automatically.
  • Active/Passive Status Control: Easily change the active or passive status of the policy (active/passive toggle). In passive mode, the policy is not applied but its configuration is preserved.
  • Condition-Based Application: Determine when the policy will be applied by creating complex conditions with Query Builder (e.g., only for specific endpoints or header values).

Advanced Features

  • Dynamic Algorithm Broadcast: The applied algorithm name can be written into the message using signatureAlgorithmVar and provides information to consumer systems.
  • Advanced Variable Management: Existing variables can be selected and updated without editing through the Variable Update Dialog.
  • Instant Key/Certificate Creation: New Crypto Key or certificate records can be created from the configuration screen, updating the policy without waiting time.
  • Export/Import Feature: Export policy configuration as a ZIP file. Import to different environments (Development, Test, Production). Version control and backup capability.
  • Policy Group and Proxy Group Support: Manage multiple policies within Policy Group. Bulk policy assignment to Proxy Groups. Centralized update and deploy operations.
  • Deploy and Versioning: Deploy policy changes to live environment. See which API Proxies use it (Policy Usage). Proxy Group and Policy Group usage reports.

Usage Scenarios

Configuring Policy Parameters

In this step, users can create a new policy or configure existing policy parameters to define access rules. The defined parameters directly affect how the policy works (e.g., which IPs will be allowed, geographical restrictions, conditional activations, etc.). This allows the policy to be customized according to organization-specific requirements while being centrally manageable.

Creating a New Digital Signature Policy

Digital Signature Policy Configuration

Configuration Steps

For descriptions of Conditions and Error Message Customization panels, you can review the Conditions and Error Message Customization sections on the What is Policy? page. For a complete guide on all layers, priority order and scenario examples of the error message configuration system, see the Error Message Configuration Guide page.

Deleting the Policy

For deletion steps of this policy and operations to be applied when in use, you can refer to the Remove Policy from Flow section on the Policy Management page.

Exporting/Importing the Policy

For export (Export) and import (Import) steps of this policy, you can refer to the Export/Import page.

Connecting the Policy to API

For the process of how this policy will be connected to APIs, you can refer to the Connect Policy to API section on the Policy Management page.

Advanced Features

Best Practices

Things to Do and Best Practices

Security Best Practices

Things to Avoid

Performance Tips

Frequently Asked Questions (FAQ)