Skip to content

chore: deprecate LDAP and SAML on workspaces without a Premium plan - #41642

Merged
dionisio-bot[bot] merged 1 commit into
developfrom
chore/deprecate-community-saml-ldap
Aug 17, 2026
Merged

chore: deprecate LDAP and SAML on workspaces without a Premium plan#41642
dionisio-bot[bot] merged 1 commit into
developfrom
chore/deprecate-community-saml-ldap

Conversation

@ggazzo

@ggazzo ggazzo commented Jul 30, 2026

Copy link
Copy Markdown
Member

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:

  • Admin settings: LDAP_Enable and SAML_Custom_<service> now carry a deprecation callout stating that version 9.0.0 will require a Premium plan.
  • Server log: the first LDAP or SAML login after a boot logs a warning naming the license module the workspace is missing (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

  1. Start a workspace with no license (or one without ldap-enterprise).
  2. Open Admin → Settings → LDAP and confirm the callout on Enable. Same for Admin → Settings → SAML.
  3. Log in with an LDAP user and confirm the warning in the server log; log in again and confirm it is not repeated.
  4. Apply a license including ldap-enterprise and 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

  • Deprecation Notice
    • LDAP and SAML authentication remain available for now on unlicensed workspaces.
    • Admin settings now indicate that Premium licensing will be required starting with version 9.0.0.
    • Administrators are warned when unlicensed LDAP or SAML authentication is used.

@dionisio-bot

dionisio-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7f8f78d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@rocket.chat/i18n Minor
@rocket.chat/meteor Minor
@rocket.chat/core-typings Minor
@rocket.chat/rest-typings Minor

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

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

LDAP 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.

Changes

Authentication deprecation

Layer / File(s) Summary
Unlicensed authentication warning service
apps/meteor/server/lib/premiumAuthDeprecation.ts
Adds warnUnlicensedAuthService, which checks license coverage, suppresses duplicate warnings, and logs the version 9.0.0 deprecation message.
LDAP and SAML login integration
apps/meteor/server/configuration/ldap.ts, apps/meteor/server/lib/saml/loginHandler.ts
LDAP and SAML login flows invoke the shared warning function before continuing authentication.
Settings and release metadata
apps/meteor/server/settings/ldap.ts, apps/meteor/server/lib/saml/lib/settings.ts, .changeset/deprecate-community-saml-ldap.md
LDAP and SAML settings display the Premium requirement alert. The changeset records the deprecation and package version bumps.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: type: chore, area: authentication

Suggested reviewers: sampaiodiego

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
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the deprecation of LDAP and SAML for workspaces without a Premium plan.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

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

Comment @coderabbitai help to get the list of available commands.

@CLAassistant

CLAassistant commented Jul 30, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.60%. Comparing base (cb7c5c2) to head (7f8f78d).
⚠️ Report is 100 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             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     
Flag Coverage Δ
e2e 58.86% <ø> (+<0.01%) ⬆️
e2e-api 45.69% <16.66%> (-0.29%) ⬇️
unit 70.53% <70.00%> (-0.18%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ggazzo ggazzo added this to the 8.8.0 milestone Aug 4, 2026
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.
@ggazzo
ggazzo force-pushed the chore/deprecate-community-saml-ldap branch from bd2a8c4 to 7f8f78d Compare August 4, 2026 13:58
@ggazzo
ggazzo marked this pull request as ready for review August 4, 2026 15:09
@ggazzo
ggazzo requested a review from a team as a code owner August 4, 2026 15:09

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (1)
.changeset/deprecate-community-saml-ldap.md (1)

6-6: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider 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

📥 Commits

Reviewing files that changed from the base of the PR and between d18228d and 7f8f78d.

📒 Files selected for processing (7)
  • .changeset/deprecate-community-saml-ldap.md
  • apps/meteor/server/configuration/ldap.ts
  • apps/meteor/server/lib/premiumAuthDeprecation.ts
  • apps/meteor/server/lib/saml/lib/settings.ts
  • apps/meteor/server/lib/saml/loginHandler.ts
  • apps/meteor/server/settings/ldap.ts
  • packages/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.ts
  • apps/meteor/server/lib/saml/loginHandler.ts
  • apps/meteor/server/settings/ldap.ts
  • apps/meteor/server/lib/saml/lib/settings.ts
  • apps/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.ts
  • apps/meteor/server/lib/saml/loginHandler.ts
  • apps/meteor/server/settings/ldap.ts
  • apps/meteor/server/lib/saml/lib/settings.ts
  • apps/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.ts
  • apps/meteor/server/lib/saml/loginHandler.ts
  • apps/meteor/server/settings/ldap.ts
  • apps/meteor/server/lib/saml/lib/settings.ts
  • apps/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.ts
  • apps/meteor/server/lib/saml/loginHandler.ts
  • apps/meteor/server/settings/ldap.ts
  • apps/meteor/server/lib/saml/lib/settings.ts
  • apps/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!

@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.

All reported issues were addressed across 7 files

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

Re-trigger cubic

Comment thread apps/meteor/server/lib/premiumAuthDeprecation.ts
@KevLehman KevLehman added the stat: QA assured Means it has been tested and approved by a company insider label Aug 17, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Aug 17, 2026
@dionisio-bot
dionisio-bot Bot added this pull request to the merge queue Aug 17, 2026
Merged via the queue into develop with commit e677905 Aug 17, 2026
92 of 94 checks passed
@dionisio-bot
dionisio-bot Bot deleted the chore/deprecate-community-saml-ldap branch August 17, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: authentication stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge type: chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants