Skip to content

Replace the Jotform on the 451 page with the Kebabstack appeal form - #238

Open
r-birkner wants to merge 3 commits into
mainfrom
rjb/kebabstack-appeal-form
Open

r-birkner wants to merge 3 commits into
mainfrom
rjb/kebabstack-appeal-form

Conversation

@r-birkner

@r-birkner r-birkner commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Replaces the Jotform appeal form on the denylist (451) error page with the Kebabstack form provided by IT.

  • appeal_section.html: the Kebabstack embed snippet plus an "Open form separately" link. The embed script inserts a self-resizing iframe that follows light/dark mode.
  • error_cause.rs: fills the form's data-context with domain (the domain the page was requested on) and canister_id (the affected canister), taken from the request's error context. This lets appeals that come in through custom domains be matched to a canister. The values go in without escaping, since an FQDN and a principal can't contain characters that matter in JSON or in an HTML attribute.
  • The canister ID box (shown on "canister not found" and "domain/canister mismatch" pages) is now turned on by its own canister_section flag. canister_id then holds the canister for every error, taken from the error if it carries one or else from the request, and both the box and the appeal form use it. The 451 page still doesn't show the box.
  • template.html: styles for the appeal section and the fallback link.

Rendered on a denylisted canister:

data-context='{"domain":"22b4i-4aaaa-aaaal-qlzxa-cai.gateway.icp","canister_id":"22b4i-4aaaa-aaaal-qlzxa-cai"}'

Testing

  • New test checks that both values end up in the page; cargo test --lib error_cause passes.
  • Ran the gateway locally over HTTPS against a denylisted canister: the form loads, shows both context values, and renders in light and dark mode.
  • Not tested: an actual submission. The form's Turnstile check needs a human click.

No CSP changes needed, as the 451 response doesn't set a CSP header.

🤖 Generated with Claude Code

The appeal section on the denylist (451) error page now embeds the
Kebabstack form. The gateway fills in the form's context with the
domain the page was requested on and the affected canister ID, so
appeals coming in through custom domains can be matched to a canister.

The canister section now fills in {{CANISTER_ID}} only within itself,
as the appeal section uses the same placeholder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@r-birkner
r-birkner requested a review from a team as a code owner November 18, 2026 14:32
Copilot AI balanced review requested due to automatic review settings November 18, 2026 14:32
@zeropath-ai

zeropath-ai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

✅ No security or compliance issues detected. Reviewed everything up to 7143d05.

Security Overview
Detected Code Changes
Change Type Relevant files
Enhancement ► src/routing/error_pages/components/appeal_section.html
      Replace hard-coded appeal iframe with a generic appeal section using embed script and context placeholders
► src/routing/error_pages/template.html
      Update styling for new appeal section and ensure consistent theming from light to dark
Enhancement ► src/routing/error_cause.rs
      Add canister_section flag to ErrorData and propagate canister_id for canister-related errors
► src/routing/error_pages/template.html (themed styling changes included in same file)

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

The remotely hosted embed runs on gateway/custom-domain origins but is outside the snapshot, requiring human validation of its trust boundary and a successful Turnstile-protected appeal that preserves domain/canister attribution.

No open issues 🎉

What changed in this PR

Replaces Jotform with the Kebabstack appeal form on the gateway’s 451 denylist page, adding request context so appeals through custom domains can be matched to the affected canister.

Changes:

  • Adds the Kebabstack embed and an “Open form separately” fallback link.
  • Populates domain and canister context, with placeholder replacement scoped to each section.
  • Adds appeal-section styling and tests for context rendering.
File Description
src/​routing/​error_pages/​template.html Adds styles for the appeal section and fallback link.
src/​routing/​error_pages/​components/​appeal_section.html Replaces Jotform with the Kebabstack embed and fallback link.
src/​routing/​error_cause.rs Supplies request context, scopes placeholder replacement, and tests rendered appeal data.

Review effort: Balanced

The canister ID box is now turned on with its own `canister_section`
flag, set by the two errors that showed it before. That frees
`canister_id` to hold the canister for every error: from the error if
it carries one, otherwise from the request. Both sections now fill
{{CANISTER_ID}} from it, and `appeal_canister_id` is gone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 19, 2026 08:27

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

The remotely hosted embed script executes in canister and custom-domain origins, but its implementation is unavailable and appeal submission remains untested, requiring human security review and validation.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 19, 2026 10:16

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

The separate-form fallback omits the domain and canister ID, losing the request attribution this change adds, particularly on custom domains where the canister ID is not otherwise visible.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Separate-form fallback loses blocked canister attribution

src/​routing/​error_pages/​components/​appeal_section.html:14

The separate-form link drops both request-context values: they are attached only to the embed script, while this URL is identical for every blocked canister. On a custom domain, the canister ID also isn't visible in the hostname or the 451 page, so using the fallback loses the attribution this change adds. Preserve the context using the form's supported URL parameters, or display the domain and canister ID with instructions to include them when submitting separately.

Review effort: Balanced

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