Skip to content

feat(web): send CSA Vercel protection bypass on GDPR scrub - #5455

Merged
eshurakov merged 1 commit into
mainfrom
session/agent_52810711-b7dc-488e-9dda-5605b7ef35f7
Aug 24, 2026
Merged

feat(web): send CSA Vercel protection bypass on GDPR scrub#5455
eshurakov merged 1 commit into
mainfrom
session/agent_52810711-b7dc-488e-9dda-5605b7ef35f7

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Cloud → CSA POST /api/internal/cloud/users/gdpr-scrub was getting csa_unauthorized because Vercel Deployment Protection runs before CSA's KILO_SUPPORT_API_SECRET check. CSA → Cloud working does not cover this path.

  • Send x-vercel-protection-bypass from CSA_VERCEL_PROTECTION_BYPASS (header only, never a query param).
  • Keep Authorization: Bearer $SUPPORT_API_SECRET for CSA route auth.
  • Update the csa_unauthorized operator hint to mention both secrets.

After merge, set the secret with pnpm web:env set CSA_VERCEL_PROTECTION_BYPASS (CSA project's Vercel automation bypass).

Verification

  • oxfmt on changed files
  • git diff --check
  • oxlint on changed deletion-queue files: clean
  • Jest for csa-support-db / deletion-hints not run here (no local Postgres)

Visual Changes

None. Operator hint text for csa_unauthorized now mentions CSA_VERCEL_PROTECTION_BYPASS.

Add support for the `CSA_VERCEL_PROTECTION_BYPASS` environment variable to
allow the Cloud deletion worker to authenticate with CSA when Vercel
Deployment Protection is enabled.

- Add `CSA_VERCEL_PROTECTION_BYPASS` to `.env.local.example` and
  `ENVIRONMENT.md`.
- Update `handleCsaSupportDb` to include the `x-vercel-protection-bypass`
  header in requests to CSA.
- Update `deletionAttentionHint` to provide more descriptive instructions
  when a `csa_unauthorized` error occurs.
- Add unit tests to verify the bypass header is correctly sent or omitted
  based on the environment configuration.
@kilo-code-bot

kilo-code-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (6 files)
  • .env.local.example
  • ENVIRONMENT.md
  • apps/web/src/lib/user/deletion-queue/deletion-hints.test.ts
  • apps/web/src/lib/user/deletion-queue/deletion-hints.ts
  • apps/web/src/lib/user/deletion-queue/handlers/csa-support-db.test.ts
  • apps/web/src/lib/user/deletion-queue/handlers/csa-support-db.ts

Reviewed by grok-4.6 · Input: 58.6K · Output: 9.9K · Cached: 514.2K

Review guidance: REVIEW.md from base branch main

@eshurakov
eshurakov requested a review from pandemicsyn August 24, 2026 20:09
@eshurakov
eshurakov merged commit 3f64c4c into main Aug 24, 2026
14 checks passed
@eshurakov
eshurakov deleted the session/agent_52810711-b7dc-488e-9dda-5605b7ef35f7 branch August 24, 2026 20:24
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