chore: deprecate LDAP and SAML on workspaces without a Premium plan - #41642
Conversation
|
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: 7f8f78d The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughLDAP and SAML authentication now warn when the required Premium license module is absent. Related settings display a version 9.0.0 Premium requirement alert, and a changeset records the deprecation and package bumps. ChangesAuthentication deprecation
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant LDAPLogin
participant SAMLLogin
participant warnUnlicensedAuthService
participant License
participant SystemLogger
LDAPLogin->>warnUnlicensedAuthService: warn LDAP usage
SAMLLogin->>warnUnlicensedAuthService: warn SAML usage
warnUnlicensedAuthService->>License: check license module coverage
warnUnlicensedAuthService->>SystemLogger: log one deprecation warning per module
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
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. Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #41642 +/- ##
===========================================
- Coverage 68.75% 68.60% -0.16%
===========================================
Files 4151 4163 +12
Lines 159513 158825 -688
Branches 27997 28318 +321
===========================================
- Hits 109681 108959 -722
- Misses 44657 44693 +36
+ Partials 5175 5173 -2
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Both keep working on 8.x. Admin settings now carry a deprecation callout and an unlicensed workspace logs a warning the first time it authenticates a user through LDAP or SAML, so the 9.0.0 gate does not arrive unannounced.
bd2a8c4 to
7f8f78d
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.changeset/deprecate-community-saml-ldap.md (1)
6-6: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider more formal phrasing in the changeset text.
Static analysis flags "Both keep working as they are today" as informal. Consider "Both continue to work as they do today" for a more formal tone in release notes.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.changeset/deprecate-community-saml-ldap.md at line 6, Update the changeset description to replace the informal phrase “Both keep working as they are today” with more formal wording equivalent to “Both continue to work as they do today,” while preserving the surrounding LDAP and SAML deprecation details.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.changeset/deprecate-community-saml-ldap.md:
- Line 6: Update the changeset description to replace the informal phrase “Both
keep working as they are today” with more formal wording equivalent to “Both
continue to work as they do today,” while preserving the surrounding LDAP and
SAML deprecation details.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 25949a64-636f-48b5-96b3-63c1aa4ddc9b
📒 Files selected for processing (7)
.changeset/deprecate-community-saml-ldap.mdapps/meteor/server/configuration/ldap.tsapps/meteor/server/lib/premiumAuthDeprecation.tsapps/meteor/server/lib/saml/lib/settings.tsapps/meteor/server/lib/saml/loginHandler.tsapps/meteor/server/settings/ldap.tspackages/i18n/src/locales/en.i18n.json
📜 Review details
⏰ Context from checks skipped due to timeout. (17)
- GitHub Check: cubic · AI code reviewer
- GitHub Check: Hacktron Security Check
- GitHub Check: 🔨 Test UI (EE) / MongoDB 8.0 coverage (1/5)
- GitHub Check: 🔨 Test API (FIPS) / MongoDB 8.0 (1/1)
- GitHub Check: 🔨 Test UI (EE) / MongoDB 8.0 coverage (3/5)
- GitHub Check: 🔨 Test UI (EE) / MongoDB 8.0 coverage (5/5)
- GitHub Check: 🔨 Test UI (CE) / MongoDB 8.0 (2/4)
- GitHub Check: 🔨 Test UI (EE) / MongoDB 8.0 coverage (4/5)
- GitHub Check: 🔨 Test UI (EE) / MongoDB 8.0 coverage (2/5)
- GitHub Check: 🔨 Test UI (CE) / MongoDB 8.0 (1/4)
- GitHub Check: 🔨 Test UI (CE) / MongoDB 8.0 (4/4)
- GitHub Check: 🔨 Test API Livechat (FIPS) / MongoDB 8.0 (1/1)
- GitHub Check: 🔨 Test UI (CE) / MongoDB 8.0 (3/4)
- GitHub Check: 🔨 Test API Livechat (EE) / MongoDB 8.0 coverage (1/1)
- GitHub Check: 🔨 Test API (CE) / MongoDB 8.0 (1/1)
- GitHub Check: 🔨 Test API (EE) / MongoDB 8.0 coverage (1/1)
- GitHub Check: 🔨 Test Federation Matrix
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation
Files:
apps/meteor/server/configuration/ldap.tsapps/meteor/server/lib/saml/loginHandler.tsapps/meteor/server/settings/ldap.tsapps/meteor/server/lib/saml/lib/settings.tsapps/meteor/server/lib/premiumAuthDeprecation.ts
🧠 Learnings (4)
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In the Rocket.Chat repository, do not reference Biome lint rules in code review feedback. Biome is not used even if biome.json exists; only reference Biome rules if there is explicit, project-wide usage documented. For TypeScript files, review lint implications without Biome guidance unless the project enables Biome rules.
Applied to files:
apps/meteor/server/configuration/ldap.tsapps/meteor/server/lib/saml/loginHandler.tsapps/meteor/server/settings/ldap.tsapps/meteor/server/lib/saml/lib/settings.tsapps/meteor/server/lib/premiumAuthDeprecation.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In this repository (RocketChat/Rocket.Chat), Biome lint rules are not used even if a biome.json exists. When reviewing TypeScript files (e.g., packages/ui-voip/src/providers/useMediaSession.ts), ensure lint suggestions do not reference Biome-specific rules. Rely on general ESLint/TypeScript lint rules and project conventions instead.
Applied to files:
apps/meteor/server/configuration/ldap.tsapps/meteor/server/lib/saml/loginHandler.tsapps/meteor/server/settings/ldap.tsapps/meteor/server/lib/saml/lib/settings.tsapps/meteor/server/lib/premiumAuthDeprecation.ts
📚 Learning: 2026-05-06T12:21:44.083Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 40256
File: apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx:121-149
Timestamp: 2026-05-06T12:21:44.083Z
Learning: Field wrappers in rocket.chat/fuselage-forms (Field, FieldLabel, FieldRow, FieldError, FieldHint) auto-create htmlFor/id associations, aria-describedby, and role="alert" for errors. Do not manually set htmlFor, id, aria-describedby, or role attributes when using these wrappers. This automatic wiring does not apply to plain rocket.chat/fuselage components, which require explicit ID wiring per the accessibility docs. In code reviews, prefer using fuselage-forms wrappers for form fields and verify there is no unnecessary manual ID/aria wiring in files that use these wrappers. If a component uses plain fuselage components, ensure proper id wiring as per docs.
Applied to files:
apps/meteor/server/configuration/ldap.tsapps/meteor/server/lib/saml/loginHandler.tsapps/meteor/server/settings/ldap.tsapps/meteor/server/lib/saml/lib/settings.tsapps/meteor/server/lib/premiumAuthDeprecation.ts
📚 Learning: 2026-03-16T21:50:37.589Z
Learnt from: amitb0ra
Repo: RocketChat/Rocket.Chat PR: 39676
File: .changeset/migrate-users-register-openapi.md:3-3
Timestamp: 2026-03-16T21:50:37.589Z
Learning: For changes related to OpenAPI migrations in Rocket.Chat/OpenAPI, when removing endpoint types and validators from rocket.chat/rest-typings (e.g., UserRegisterParamsPOST, /v1/users.register) document this as a minor changeset (not breaking) per RocketChat/Rocket.Chat-Open-API#150 Rule 7. Note that the endpoint type is re-exposed via a module augmentation .d.ts in the consuming package (e.g., packages/web-ui-registration/src/users-register.d.ts). In reviews, ensure the changeset clearly states: this is a non-breaking change, the major version should not be bumped, and the changeset reflects a minor version bump. Do not treat this as a breaking change during OpenAPI migrations.
Applied to files:
.changeset/deprecate-community-saml-ldap.md
🪛 LanguageTool
.changeset/deprecate-community-saml-ldap.md
[style] ~6-~6: To elevate your writing, try using more formal phrasing here.
Context: ...workspaces without a Premium plan. Both keep working as they are today, but the admin settin...
(CONTINUE_TO_VB)
🔇 Additional comments (6)
apps/meteor/server/lib/premiumAuthDeprecation.ts (1)
1-21: LGTM!apps/meteor/server/configuration/ldap.ts (1)
5-5: LGTM!Also applies to: 15-16
apps/meteor/server/lib/saml/loginHandler.ts (1)
9-9: LGTM!Also applies to: 26-27
apps/meteor/server/settings/ldap.ts (1)
10-10: LGTM!apps/meteor/server/lib/saml/lib/settings.ts (1)
179-184: LGTM!packages/i18n/src/locales/en.i18n.json (1)
4376-4376: LGTM!
There was a problem hiding this comment.
All reported issues were addressed across 7 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Proposed changes
First of two PRs turning LDAP and SAML into Premium-only features. This one only announces it — nothing stops working on 8.x. The enforcement lives in #41643, targeting
release-9.0.0.Two channels, both aimed at workspaces that have no license covering the feature:
LDAP_EnableandSAML_Custom_<service>now carry a deprecation callout stating that version 9.0.0 will require a Premium plan.ldap-enterprise/saml-enterprise). Checked at login time, not at startup, so the license is already loaded and licensed workspaces never see it.Warned once per module per process — enough for an ops alert to fire, quiet enough not to flood the log on a busy workspace.
Issue(s)
Prerequisite for making LDAP and SAML Premium-only in 9.0.0.
Steps to test or reproduce
ldap-enterprise).ldap-enterpriseand confirm no warning is logged on the next LDAP login.Further comments
The callout text is shared by both settings (
Premium_required_from_9_0_0_alert) and is rendered regardless of license, since a workspace that already has the plan reads it as a statement of fact rather than a warning. Say the word if you'd rather gate the callout on the missing module — that needs client-side license awareness in the settings page, not a settings flag.Summary by CodeRabbit