
Redaction webhooks that do not leak in the URL. A webhook is a callback from the service to your endpoint. It should carry a job id and a status, not the document or the extracted text. The URL is often logged by proxies, so it is the wrong place for an identifier.
Part of redaction API and SDKs. For the adjacent case, read redaction sdk and batch redaction api.
What changes in this environment
Register an HTTPS endpoint, verify the signature, acknowledge quickly and fetch the output from the authenticated API. Retries are expected; the handler must be idempotent. A queue between the endpoint and the worker protects the response time.
Where the data hides
The visible page is only one layer. In this environment, check:
- Query strings and access logs
- Retry payloads kept in a queue
- Endpoint error logs
- The callback URL in a config file
- A job id reused across tenants
The redaction flow
- Register the endpoint and store the signing secret.
- Receive the event and verify the signature.
- Acknowledge with a 2xx and enqueue the job id.
- Fetch the report and the output from the API.
- Record the terminal state and delete the event.
Controls to verify
- HTTPS with a valid certificate.
- Signature verification and a timestamp window.
- Idempotency on the job id.
- No document data or PII in the URL.
- A dead-letter queue with an owner.
Retention and evidence
The callback payload and the queue can retain a job id longer than the document. That is usually acceptable, but the URL and the logs still need a retention rule. Do not put a file name or an email address in the path.
Limits
Webhooks are at-least-once in most designs, so duplicates are normal. A slow endpoint causes retries and timeouts. The callback is not a delivery guarantee for the document; the API download is.
The three failure modes
Webhooks fail in three familiar ways, and the design should name its answer to each. Delivery failure: the receiver is down, and the sender retries — your endpoint must be idempotent, because the retry is a duplicate of an event you may have processed. Ordering failure: events arrive out of sequence, and state built on order corrupts — sequence numbers or timestamps in the payload let you reconstruct. Spoofing: anyone can POST a payload shaped like yours — a shared secret or signature verification is the floor, not an option.
What belongs in the payload
The payload should carry identifiers, not documents: the job id, the file reference your system already holds, the status, and the report location. Payloads carrying the file or its content invite the webhook itself to become a data channel — a second copy of the sensitive payload, logged by every proxy in between. Verify the signature before parsing deeply, reject stale timestamps to blunt replays, and answer with a fast acknowledgment; heavy work belongs in your queue, not the HTTP handler.
The receiver's checklist
The receiving side earns its keep in six lines: verify the signature before parsing, reject timestamps older than a few minutes, answer two hundred fast, enqueue the payload, process idempotently by event id, and alert when the queue ages. Each line answers one outage. The endpoint also needs its own authentication story — the webhook URL is a door, and an unauthenticated door turns the sender's retry storm into your incident.
How Veilbrook fits
Veilbrook can notify a job state through a callback and return the output through the API. The signature check, the queue and the idempotency are yours to implement.
Before you release
Open the output in the same tool the recipient will use. Select each masked area and paste it into a text editor. Search for every value you removed, including the header, the attachment, the comment and the OCR layer. Compare the report with the file and keep both. If a value survives, the job is not done.
Common mistakes
- Covering text instead of replacing it.
- Checking the body but not the header or the attachment.
- Treating a successful job as a reviewed file.
- Calling a masked document anonymous.
- Leaving the original in a shared folder.
What to ask before you build
- What signing scheme is used?
- What are the retry and timeout rules?
- Is the callback at-least-once?
- What fields are in the payload?
- How are secrets rotated?