Skip to content

轻量级目录访问协议 (LDAP)(Lightweight Directory Access Protocol (LDAP))#

功能可用性

  • 可用于自托管的 Business 和 Enterprise 版本,以及云端 Enterprise 计划。
  • 你需要拥有 n8n 实例的所有者账户访问权限。

本页面将告诉你如何在 n8n 中启用 LDAP。假设你熟悉 LDAP 并且已经设置了现有的 LDAP 服务器。

🌐 This page tells you how to enable LDAP in n8n. It assumes you're familiar with LDAP, and have an existing LDAP server set up.

LDAP 允许用户使用其组织凭据登录 n8n,而无需使用 n8n 登录凭据。

🌐 LDAP allows users to sign in to n8n with their organization credentials, instead of an n8n login.

启用 LDAP(Enable LDAP)#

  1. 以实例所有者身份登录 n8n。
  2. 选择 设置 设置图标 > LDAP
  3. 打开 启用 LDAP 登录
  4. 使用 LDAP 服务器的详细信息填写字段。
  5. 选择 测试连接 以检查你的连接设置,或选择 保存连接 以创建连接。

启用 LDAP 后,除非你通过 用户过滤器 设置将其排除,否则任何在你的 LDAP 服务器上的用户都可以登录 n8n 实例。

🌐 After enabling LDAP, anyone on your LDAP server can sign in to the n8n instance, unless you exclude them using the User Filter setting.

您仍然可以在 设置 > 用户 页面上创建非 LDAP 用户(邮箱用户)。

🌐 You can still create non-LDAP users (email users) on the Settings > Users page.

合并 n8n 和 LDAP 账户(Merging n8n and LDAP accounts)#

如果 n8n 为电子邮件用户和 LDAP 用户找到匹配的账户(匹配的电子邮件),用户必须使用他们的 LDAP 账户登录。n8n 实例所有者账户不在此列:n8n 从不将所有者账户转换为 LDAP 用户。

🌐 If n8n finds matching accounts (matching emails) for email users and LDAP users, the user must sign in with their LDAP account. n8n instance owner accounts are excluded from this: n8n never converts owner accounts to LDAP users.

n8n 中的 LDAP 用户账户(LDAP user accounts in n8n)#

首次登录时,n8n 会为 LDAP 用户在 n8n 中创建一个用户账户。

🌐 On first sign in, n8n creates a user account in n8n for the LDAP user.

您必须在 LDAP 服务器上管理用户信息,而不是在 n8n 中。如果您在 LDAP 服务器上更新或删除用户,n8n 账户会在下次计划同步时更新,或者在用户下一次尝试登录时更新,以先发生者为准。

🌐 You must manage user details on the LDAP server, not in n8n. If you update or delete a user on your LDAP server, the n8n account updates at the next scheduled sync, or when the user next tries to log in, whichever happens first.

用户删除

如果你从 LDAP 服务器中删除用户,他们将在下一次同步时失去 n8n 访问权限。

关闭 LDAP(Turn LDAP off)#

关闭 LDAP:

🌐 To turn LDAP off:

  1. 以实例所有者身份登录 n8n。
  2. 选择 设置 设置图标 > LDAP
  3. 关闭 启用 LDAP 登录

如果你关闭 LDAP,n8n 会在现有 LDAP 用户下次登录时将其转换为邮箱用户。用户必须重置密码。

🌐 If you turn LDAP off, n8n converts existing LDAP users to email users on their next login. The users must reset their password.