Skip to content

Remove encryption legacy#21781

Open
prastoin wants to merge 5 commits into
mainfrom
remove-encryption-legacy
Open

Remove encryption legacy#21781
prastoin wants to merge 5 commits into
mainfrom
remove-encryption-legacy

Conversation

@prastoin

@prastoin prastoin commented Jun 18, 2026

Copy link
Copy Markdown
Member

Introduction

Still preserving the cross-upgrade flow

close twentyhq/core-team-issues#2465

Review in cubic

prastoin added 3 commits June 17, 2026 17:13
…back

decryptVersioned now throws on non-enc:v2 envelopes instead of falling back to legacy AES-CTR. Update the application-variable and application-registration-variable integration tests to assert the live read path surfaces an error for legacy ciphertext rather than transparently decrypting them.
@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

TODOs/FIXMEs:

  • // TODO: Remove in follow-up PR once all legacy encryption fallbacks are dropped.: packages/twenty-server/src/engine/metadata-modules/connected-account/services/connected-account-token-encryption.service.ts
  • // TODO: Remove after 2-5 slow instance command has been run everywhere.: packages/twenty-server/src/engine/metadata-modules/connected-account/services/connected-account-token-encryption.service.ts
  • // TODO: drop this helper, the simpleSecretEncryptionUtil dep, and the legacy: packages/twenty-server/src/engine/core-modules/two-factor-authentication/two-factor-authentication.service.ts

Generated by 🚫 dangerJS against 84551f9

@twenty-ci-bot-public

twenty-ci-bot-public Bot commented Jun 18, 2026

Copy link
Copy Markdown

🔍 Automated Pre-Review

No issues detected - This PR is ready for human review.


View details

Automated pre-review — human approval still required.

@prastoin prastoin added the ci:allow-previous-version-upgrade-mutation Bypass `ci-server.yaml` `server-previous-version-upgrade-mutation-guard` job. label Jun 18, 2026

@cubic-dev-ai cubic-dev-ai Bot 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.

2 issues found and verified against the latest diff

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

@twenty-ci-bot-public

twenty-ci-bot-public Bot commented Jun 18, 2026

Copy link
Copy Markdown

🚀 Preview Environment Ready!

Your preview environment is available at: https://baker-entrance-literacy-solomon.trycloudflare.com

This environment will automatically shut down after 5 hours.

@Weiko Weiko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code LGTM but I'll let @charlesBochet validate if we can deprecate or not as I didn't really follow that track 👍

@Weiko Weiko assigned charlesBochet and unassigned prastoin Jun 18, 2026

@charlesBochet charlesBochet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

TBH,

  • I would just rename decryptVersioned to decryptWithFallbackForUpgradeCommandDeprecated. I would not touch upgrade command (only this renaming in the calls)
  • I would call decrypt in the production code

That's should be a few line of changes and not such a big change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

-PR: draft ci:allow-previous-version-upgrade-mutation Bypass `ci-server.yaml` `server-previous-version-upgrade-mutation-guard` job.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate encryption decryption legacy fallback while keep cross upgrade functional

3 participants