Skip to content

chore: remove Gotenberg basic auth on SKE - #645

Open
raphael-arce wants to merge 1 commit into
chore/ske-prod-prepfrom
chore/remove-gotenberg-basic-auth
Open

raphael-arce wants to merge 1 commit into
chore/ske-prod-prepfrom
chore/remove-gotenberg-basic-auth

Conversation

@raphael-arce

@raphael-arce raphael-arce commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Stacked on #641.

Asana: https://app.asana.com/1/1201970074282735/project/1208836734369129/task/1220625976899480

What

  • Gotenberg on SKE runs without --api-enable-basic-auth. The NetworkPolicy already lets only the backend (and sandbox) reach it.
  • Gotenberg has no env Secret anymore: sync-env-secrets.sh, render-and-apply.sh and the SKE deploy workflow only handle the backend Secret.
  • The backend no longer needs GOTENBERG_API_BASIC_AUTH_USERNAME/PASSWORD and sends no Authorization header.
  • Local dev: compose.yml has a gotenberg service on localhost:3001. The backend's predev script starts it, so npm run dev / turbo dev start it too.

Before merging

  • Prod backend must use the in-cluster Gotenberg (GOTENBERG_URL in the prod 1Password note).
  • Check that BACKEND_TEST_ENV sets NODE_ENV=test, so E2E uses the Gotenberg mock.

After deploying

  • Remove GOTENBERG_API_BASIC_AUTH_* from the staging, prod and sandbox 1Password notes.
  • Delete the gotenberg-env-a / gotenberg-env-b Secrets in staging and prod.
  • Devs: set GOTENBERG_URL=http://localhost:3001 in apps/backend/.env.

Not changed

The Cloud Foundry Gotenberg (infra/gotenberg/, gotenberg-deploy-stackit-cf.yml) keeps basic auth: it has a public route. A manual CF backend deploy now gets 401 from it. Remove the CF path in a follow-up.

Tested

  • shellcheck on infra/k8s/deploy/*.sh, kubectl kustomize on all overlays, tsc --noEmit.
  • Local Gotenberg via npm run predev: healthy, /forms/libreoffice/convert returns a PDF.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Local development now starts the document-conversion service automatically when you run the backend, including through turbo dev. Docker is required.
  • Documentation
    • Updated developer setup instructions with the local service address and commands for stopping the service.

The NetworkPolicy already lets only the backend reach Gotenberg, so the
credentials add nothing. Drop --api-enable-basic-auth, Gotenberg's env
Secret and the backend's GOTENBERG_API_BASIC_AUTH_* vars.

Local dev can no longer use the remote Gotenberg, so compose.yml gets a
gotenberg service that the backend's predev script starts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
baergpt-admin-panel Ready Ready Preview Nov 26, 2026 11:02am UTC
baergpt-frontend Ready Ready Preview Nov 26, 2026 11:02am UTC
baergpt-maintenance-mode Ready Ready Preview Nov 26, 2026 11:02am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The backend no longer uses Basic authentication for Gotenberg. Local development now starts Gotenberg through Compose. Kubernetes deployment and secret-sync scripts no longer configure or synchronize a Gotenberg Secret.

Changes

Gotenberg Runtime

Layer / File(s) Summary
Remove backend Gotenberg authentication
apps/backend/src/config.ts, apps/backend/.env.sample, apps/backend/src/services/document-extraction-service.ts
The backend no longer requires or exposes Gotenberg Basic credentials. Document conversion requests no longer send a Basic Authorization header.
Remove Gotenberg deployment secrets
infra/k8s/base/gotenberg/deployment.yaml, infra/k8s/deploy/sync-env-secrets.sh, infra/k8s/deploy/render-and-apply.sh, .github/workflows/backend-deploy-stackit-ske.yml
The Kubernetes deployment no longer enables Gotenberg Basic authentication or loads a Gotenberg Secret. The deployment scripts and workflow now handle only the backend Secret.
Run Gotenberg through local Compose
compose.yml, apps/backend/package.json, README_DEV.md
Compose adds a Gotenberg service and makes the backend wait for its health check. The backend predev script starts the service, and the development documentation describes local setup and shutdown.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Suggested reviewers: nlspnsgen

Merge Risk: Minimal · up to 8eae5

This change removes Gotenberg basic auth in the SKE deployment, relying on the existing NetworkPolicy. It also adds a local Gotenberg service for development. The access restriction holds in the reviewed policies. Before merging, complete the stated pre-merge configuration steps (production GOTENBERG_URL and NODE_ENV=test). Manual Cloud Foundry backend deploys will receive 401 until the follow-up lands.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "chore: remove Gotenberg basic auth on SKE" matches the main change. The PR removes Gotenberg basic auth from the SKE deployment, including the Kubernetes deployment, the render and sync scr…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "chore: remove Gotenberg basic auth on SKE" matches the main change. The PR removes Gotenberg basic auth from the SKE deployment, including the Kubernetes deployment, the render and sync scripts, the workflow secret, and the backend config and Authorization header. The title does not mention the added local Gotenberg service in compose.yml, but that is a secondary change, and the title does not need to cover every detail. The title is short, specific, and uses a conventional commit prefix.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit taps a Docker bell,
Gotenberg wakes and serves PDFs well.
No secret pouch is tucked away,
The backend calls without delay.
Compose hums through the evening light,
The rabbit hops to close the night.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5ef958b1-fc26-4fca-bc1b-ef2bb1225ab4
Commits

Reviewing files that changed from the base of the PR and between b611314 and 8eae5b4.

Files selected for processing: 10

  • .github/workflows/backend-deploy-stackit-ske.yml
  • README_DEV.md
  • apps/backend/.env.sample
  • apps/backend/package.json
  • apps/backend/src/config.ts
  • apps/backend/src/services/document-extraction-service.ts
  • compose.yml
  • infra/k8s/base/gotenberg/deployment.yaml
  • infra/k8s/deploy/render-and-apply.sh
  • infra/k8s/deploy/sync-env-secrets.sh
Files with no reviewable changes: 4

  • .github/workflows/backend-deploy-stackit-ske.yml
  • apps/backend/.env.sample
  • apps/backend/src/config.ts
  • apps/backend/src/services/document-extraction-service.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@nlspnsgen nlspnsgen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me 👍

This branch was successfully deployed

3 active deployments
Preview – baergpt-maintenance-mode — 8eae5b40 Deployed Nov 26, 2026 by vercel[bot]
Preview – baergpt-frontend — 8eae5b40 Deployed Nov 26, 2026 by vercel[bot]
Preview – baergpt-admin-panel — 8eae5b40 Deployed Nov 26, 2026 by vercel[bot]
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