feat(onprem): APP_ENV=onprem for a customer's own node #142
Closed
sharang
wants to merge 2 commits from
feat/onprem-mode into main
pull from: feat/onprem-mode
merge into: platform:main
platform:main
platform:feat/einstieg-plan
platform:feat/update-policy
platform:feat/telemetry-relay
platform:feat/feedback-endpoint
platform:feat/onprem
platform:feat/onprem-mail
platform:feat/onprem-directory-users
platform:feat/avv-autofill
platform:feat/release-avv-1.0.0
platform:fix/erpsetup-dunning-and-small
platform:feat/module-user-count
platform:feat/usage-summary
platform:feat/mahnung-ladder
platform:fix/toms-status-available
platform:feat/contractdocs-agb-tom
platform:feat/company-rules
platform:feat/staff-brand-slug
platform:fix/intake-outlives-purge
platform:fix/catalogue-labels
platform:feat/trial-offer-status
platform:feat/function-holders
platform:feat/assignable-bundles
platform:feat/contract-documents
platform:feat/erp-lb-versions
platform:feat/store-merges-unterlagen
platform:feat/product-hierarchy
platform:feat/preview-grants
platform:ci/platform-image-and-webhook
platform:ci/registry-meghsakha-orca-webhook
No Reviewers
Dismiss Review
Are you sure you want to dismiss this review?
Labels
Clear labels
cra:annex-i
cve
pruefwerk
risk:accepted
severity:critical
severity:high
severity:low
severity:medium
CRA Anhang I, wesentliche Cybersicherheitsanforderungen / CRA Annex I
Bekannte Schwachstelle in einer Abhängigkeit / known vulnerability in a dependency
Befund aus Prüfwerk / Prüfwerk finding
Risiko akzeptiert, nicht behoben / accepted risk, not fixed
Schweregrad kritisch / critical
Schweregrad hoch / high
Schweregrad niedrig / low
Schweregrad mittel / medium
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: platform/tenant-registry#142
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
On-prem blocker #1 from the test install (
platform/onprem,testenv/results/gaps.md), plus gaps 2–5, 7 and 9. This addsAPP_ENV=onprem, a mode for a registry running on a customer's own node.Problem. Today the provisioning and launch URLs come from the migrations (
*.breakpilot.com, keyed stage/prod). Activating a workspace on-prem would send its id, name and slug to our cloud, together with a service token.What on-prem changes
PRODUCTSandPRODUCT_LAUNCH_URLS/PRODUCT_PROVISION_URLS(key=url,…). A store decorator applies them to every product read, so catalog, activation, provisioning, entitlement checks and the Prüfwerk targets all agree. The URLs are checked at start.active, and the time ladder never escalates. The cloud still escalates, and a control test pins that.not_available:SMTP_TLS=starttls|tls|none(plain internal relay). Credentials are never sent unencrypted.Cloud. Without the new variables, stage and prod behave as before (
TestLoad_cloudUnchangedWithoutTheNewVariables).Migration 0032. The Werkpilot catalog text no longer names
llm.breakpilot.com. It now says "the platform's language-model gateway". This applies to all environments, so the text on prod changes too.Not in this PR:
POST /v1/tenantswithadmin_emailanswersemail_taken. The next PR adds attaching an existing directory user.Tests.
go test ./...passes. The server and migration suites also pass with Postgres (testcontainers via podman). New tests:onprem_test.go(server, config) andplain_test.go(mail).🤖 Generated with Claude Code
The registry on a customer's node must never reach a Breakpilot host and must not run the cloud's commercial machinery. - APP_ENV=onprem: no ERP (nothing queued, webhook off), no trial (new workspaces start active, the ladder never escalates by time), and the trial-offer, trial-terms, catalog/trial request and admin trial routes answer 404 not_available. - PRODUCTS, PRODUCT_LAUNCH_URLS, PRODUCT_PROVISION_URLS: one store decorator applies the product list and URLs to every catalog read (catalog, activation, provisioning, entitlement checks). On-prem has no seeded URLs, so provisioning goes only to the local products. Checked at start ({id} in provision URLs, absolute http(s)). - On-prem start fails when the values leave something to a cloud or dev default (auth off, no authz rules, ephemeral licence key, portal, invite, sender, LLM gateway) or set an ERP or contract documents. - SMTP_TLS=starttls|tls|none: a plain relay inside the customer's network; no AUTH without encryption. - Migration 0032: the Werkpilot text no longer names our LLM host. Cloud behaviour is unchanged without the new variables (tested). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Heads-up: #145 (tenant connections, merged
c6de358) addedmigrations/0032_tenant_connections. This PR also adds a0032(0032_werkpilot_description), so once it's rebased onto main the two collide.0033_werkpilot_description.{up,down}.sqlwhen you rebase. #143 and #144 are stacked on this PR and add no migrations, so they need nothing.0032_tenant_connectionssince this morning.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
Merged as part of #146 (the same commits on today's main; migration renumbered to 0033).
Pull request closed