200 OK, the operation proceeds. Any other response rejects it.
This gives you full control over which operations your signers are allowed to perform, based on your own business logic.
How it works
1
Signer receives a request
A signing or key export request reaches the signer through the normal DFNS flow.
2
Signer calls your validation gate handler
Before performing the operation, the signer sends an HTTP
POST request with a JSON body to the URL you configured. The payload contains information about the operation (see Request payload below).3
Your handler decides
Your handler inspects the payload and returns:
200 OKto approve the operation- Any other status code to reject it
4
Signer acts on the response
If approved, the signer proceeds with the signing or key export. If rejected, the operation fails and the rejection is propagated back to the caller.
Request payload
Your handler receives aPOST request with a JSON body.
signerInfo fields
The signerInfo object contains trusted information provided by the signer itself. These values are derived from the signer’s own state and are not user-supplied.
Examples
Signing request with HD derivation:Response handling
Your handler must return200 OK to approve the operation. The signer treats any other response as a rejection:
When your handler rejects a request, return a meaningful response body. The signer includes it in the error message propagated to the caller.
Setup
The validation gate is configured as part of the signer deployment, through the signer’s command-line options:--validation-gate-secret and --validation-gate-disable-tls are only valid when --validation-gate-url is set.
Request authentication (HMAC)
When a shared secret is configured, the signer signs the raw request body with HMAC-SHA256 and sends the signature with each request:
Verify the signature in your handler before trusting the payload.
TLS
The TLS material for the connection to your handler is delivered in the signer’s key pack, created with the signer CLI’smake-pack subcommand:
Three modes are supported:
- mTLS: all three options are provided (server CA + client key + client certificate).
- TLS (no client authentication): only
--validation-gate-tls-server-cais provided. - Disabled: no TLS material is provided, and
--validation-gate-disable-tlsis explicitly passed.
--validation-gate-disable-tls is not set, the signer refuses to start.