Introduction
The Verity Prover is a proxy server that enables you to generate cryptographic proofs for API interactions. It acts as a middleware between your application and target APIs, allowing you to prove specific aspects of the request/response cycle while selectively redacting sensitive information.
Key Concepts
Request ID
Every proof generation requires a unique Request ID (UUID) to track and retrieve the proof. You can generate one using:
Proof Subscription
Proofs are delivered asynchronously via Server-Sent Events (SSE). You’ll need to establish a connection to receive proofs as they’re generated.
Core Endpoints
Proxy Endpoint (/proxy
)
This endpoint forwards your requests to target APIs while generating proofs. You can use any HTTP method to call this endpoint, such as GET, POST, PUT, DELETE, etc.
Required Headers:
T-PROXY-URL
: The target API URL you want to callT-REQUEST-ID
: Your generated UUID for tracking the proofT-REDACTED
(optional): Comma-separated list of fields to redactT-PROVE-FAILED-REQ
(optional): If set to true, the proof will be generated even if the request fails
Redaction Syntax:
Fields in the T-REDACTED
header follow this pattern:
req:body:fieldName
: Redact request body fieldreq:header:headerName
: Redact request headerres:body:fieldName
: Redact response body fieldres:header:headerName
: Redact response header
Proof Subscription (/proof/{requestId}
)
Subscribe to receive proofs for a specific request ID via SSE.
Basic POST Request
Simple GET Request
Subscribing to Proofs
Best Practices
- Always Generate Fresh UUIDs: Use a new UUID for each proof request to avoid collisions.
- Subscribe First: Set up your SSE connection before making the proxy request.
- Handle Timeouts: Implement appropriate timeout handling for both proxy requests and SSE connections.
- Redact Sensitive Data: Use the
T-REDACTED
header to protect sensitive information from TLS proofs while maintaining proof validity. - Error Handling: The API uses standard HTTP status codes:
- 200: Successful request
- 400: Bad request (invalid headers or body)
- 404: Target API not found
- 500: Server error