Skip to content

Add redeemer authorization webhook - #81

Merged
j0sh merged 5 commits into
mainfrom
ja-codex/redeemer-webhook
Nov 12, 2026
Merged

j0sh merged 5 commits into
mainfrom
ja-codex/redeemer-webhook

Conversation

@j0sh

@j0sh j0sh commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Adds optional per-request authorization to the standalone redeemer. The webhook receives caller headers and ticket fields, including sig and recipient_rand_hash, while omitting recipient_rand. Denials and webhook errors prevent admission; accepted tickets and transaction retries continue independently.

Shares header configuration through nodeconfig, preserving the signer.Headers alias. Includes secret-file validation, authorization metrics and docs, and forwarding timeouts that accommodate the webhook call.

Validation:

  • go test ./nodeconfig ./signer ./redemption ./redeemer ./cmd/livepeer against an isolated PR snapshot, including pinned SDK fixtures.
  • Repeated focused race checks covering authorization, admission, replay, forwarding, and queued redemption. Timing tests use synctest.

Copilot AI balanced review requested due to automatic review settings November 12, 2026 02:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the optional per-request redeemer authorization change.

No open issues 🎉

What changed in this PR

Adds optional per-request authorization to the standalone redeemer before ticket validation and storage, while keeping accepted tickets and transaction retries independent of webhook availability.

Changes:

  • Sends caller headers and ticket fields to the webhook, excluding secret recipient_rand, and blocks admission on denials or errors.
  • Shares webhook header configuration through nodeconfig, preserves signer.Headers, and adds secret-file validation and authorization metrics.
  • Extends forwarding timeouts and adds tests, configuration examples, and documentation.
File Description
signer/​headers.go Preserves Headers as an alias to the shared type.
redemption/​http.go Adds the authorization hook and extends forwarding timeouts.
redemption/​http_test.go Tests authorization admission, concurrency, and forwarding budgets.
redeemer/​auth.go Implements webhook requests, decisions, and metrics.
redeemer/​auth_test.go Covers payload privacy, failures, replay prevention, and queued redemption.
redeemer/​app.go Configures, validates, and wires authorization into the service.
redeemer/​app_test.go Tests service integration, configuration, and secret protection.
nodeconfig/​headers.go Houses the shared header parser and serializer.
nodeconfig/​headers_test.go Moves header tests into the shared package.
nodeconfig/​config.go Updates the package comment to mention shared configuration types.
docs/​redeemer.md Documents webhook setup and caller identity precautions.
docs/​metrics.md Documents redeemer authorization metrics.
docs/​http-api.md Defines webhook payloads, decisions, and failure behavior.
configs/​redeemer/​config.example.toml Adds optional webhook secret-file examples.
cmd/​livepeer/​testdata/​cli/​redeemer-help.golden Updates expected help output for authorization settings.

Review effort: Balanced

@j0sh
j0sh deployed to docker-publish November 12, 2026 02:13 — with GitHub Actions Active
@j0sh
j0sh deployed to docker-publish November 12, 2026 02:13 — with GitHub Actions Active
@j0sh
j0sh deployed to docker-publish November 12, 2026 02:13 — with GitHub Actions Active
@j0sh
j0sh deployed to docker-publish November 12, 2026 02:14 — with GitHub Actions Active
Copilot AI balanced review requested due to automatic review settings November 12, 2026 03:46
@j0sh
j0sh deployed to docker-publish November 12, 2026 03:49 — with GitHub Actions Active
@j0sh
j0sh deployed to docker-publish November 12, 2026 03:49 — with GitHub Actions Active
@j0sh
j0sh deployed to docker-publish November 12, 2026 03:49 — with GitHub Actions Active
@j0sh
j0sh deployed to docker-publish November 12, 2026 03:50 — with GitHub Actions Active

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the optional ticket-admission authorization change.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 12, 2026 04:01
@j0sh
j0sh deployed to docker-publish November 12, 2026 04:03 — with GitHub Actions Active

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues for the change adding optional per-request authorization before ticket admission.

No open issues 🎉

Review effort: Balanced

@j0sh
j0sh deployed to docker-publish November 12, 2026 04:04 — with GitHub Actions Active
@j0sh
j0sh deployed to docker-publish November 12, 2026 04:04 — with GitHub Actions Active
@j0sh
j0sh deployed to docker-publish November 12, 2026 04:05 — with GitHub Actions Active
Copilot AI balanced review requested due to automatic review settings November 12, 2026 04:06
@j0sh
j0sh deployed to docker-publish November 12, 2026 04:08 — with GitHub Actions Active
@j0sh
j0sh deployed to docker-publish November 12, 2026 04:09 — with GitHub Actions Active
@j0sh
j0sh deployed to docker-publish November 12, 2026 04:09 — with GitHub Actions Active
@j0sh
j0sh deployed to docker-publish November 12, 2026 04:09 — with GitHub Actions Active

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed because upload, authorization, and admission can collectively exceed the server’s write timeout, leaving a ticket stored even though the response fails.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 12, 2026 04:11
@j0sh
j0sh deployed to docker-publish November 12, 2026 04:12 — with GitHub Actions Active
@j0sh
j0sh deployed to docker-publish November 12, 2026 04:13 — with GitHub Actions Active
@j0sh
j0sh deployed to docker-publish November 12, 2026 04:13 — with GitHub Actions Active
@j0sh
j0sh deployed to docker-publish November 12, 2026 04:13 — with GitHub Actions Active

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The review reports no active issues with the optional per-request authorization change.

No open issues 🎉

Review effort: Balanced

@j0sh
j0sh merged commit 5babcc7 into main Nov 12, 2026
14 checks passed
@j0sh
j0sh deleted the ja-codex/redeemer-webhook branch November 12, 2026 04:18

This branch was successfully deployed

1 active deployment
docker-publish — ba79a636 Deployed Nov 12, 2026 by j0sh via docker-pr / promote #163
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants