esc: SSO enterprise-bypass overlay (reproducible build + upgrade path) - #1
Open
AmirMamd wants to merge 1 commit into
Open
esc: SSO enterprise-bypass overlay (reproducible build + upgrade path)#1AmirMamd wants to merge 1 commit into
AmirMamd wants to merge 1 commit into
Conversation
Captures the CT 175 twenty-esc-sso:v2.0.0 build (live since 2026-06-05) as a self-contained, upgrade-resilient overlay under esc/, mirroring the docuseal-full pattern Patryk pointed at. - patch-enterprise.cjs: rewrites 4 methods in compiled enterprise-plan.service.js (isValid / hasValidEnterpriseValidityToken / getLicenseInfo / getSubscriptionStatus); self-asserts all 4 applied or fails the build (upstream-drift tripwire). - Dockerfile: FROM twentycrm/twenty:TWENTY_VERSION + patch. - esc-build/deploy/upgrade.sh: one-command build, snapshotted cutover with one-step rollback, and re-apply-on-upgrade. - PATCH_MANIFEST.md + README.md: authorisation, legal (AGPLv3), per-method table, deployed state, upgrade procedure. Authorised by Patryk 2026-06-04. Previously the patch lived only as loose files in /root/twenty-esc-sso-build on CT 175 - not reproducible, not upgrade-safe. Refs twentyhq#6151.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Commits the ESC enterprise-bypass overlay under
esc/so the SSO patch that is already live on CT 175 (twenty-esc-sso:v2.0.0, running since 2026-06-05) is finally reproducible, documented, and upgrade-safe. Until now it existed only as loose files in/root/twenty-esc-sso-build/on the server — a single-machine artifact with no source of truth.Why
Twenty gates SSO behind a paid Enterprise key. ESC staff email is self-hosted (
mail.voltnation.pl), so Google/MS OAuth isn't an option — Keycloak (premium) is the only path. Patryk authorised forking Twenty to remove the gate (WhatsApp, 2026-06-04: "fork twenty plz, remove the enterprise limitations… mainly after SSO… but fork it smartly"), pointing at thedocuseal-fulloverlay pattern as the template. This is the "fork it smartly" part.How (option B — thin overlay on the official image)
patch-enterprise.cjsrewrites 4 methods in the compiledenterprise-plan.service.js(isValid,hasValidEnterpriseValidityToken,getLicenseInfo,getSubscriptionStatus).isValid()→trueunlocks the SSO guard; the other three keep the licence-aware UI/cron self-consistent so the daily enterprise-key-validation cron can't flip the gate back.esc-build.sh/esc-deploy.sh/esc-upgrade.shmake build, snapshotted cutover (one-step rollback), and re-apply-on-upgrade one-command each.PATCH_MANIFEST.md+README.mddocument authorisation, the AGPLv3 position, the per-method table, and the live deployed state.Live state captured
twenty-esc-sso:v2.0.0runs thetwenty-escstack →https://esc.crm.fiszu.com(healthy).twenty-esc(issuerhttps://auth.fiszu.com/realms/fiszu) is Active in the workspace.twenty-rc(v1.17.0) is a separate stack and is not touched.Test plan
node --check esc/patch-enterprise.cjs— validbash -non all three scripts — validisValid() { return trueconfirmed in the running container's compiled service../esc/esc-upgrade.sh <ver>should rebuild green (or fail loudly if the enterprise service changed).Refs twentyhq#6151.