Skip to main content
Installation

Sign-in integrations

Local accounts and two-factor authentication, configuring OIDC single sign-on, Feishu sign-in and LDAP / Active Directory, administrator group mapping and automatic provisioning, and sign-in rate limits.

The console supports four sign-in methods, which can be enabled together: local accounts, OIDC single sign-on, Feishu sign-in and LDAP / Active Directory. OIDC, Feishu and LDAP are configured under Settings > Login integrations, by administrators only. Once enabled, the login page shows a button for each; LDAP users sign in through the same username and password fields as local accounts.

Local accounts and two-factor authentication

Administrators create local accounts on the Users page. Passwords need at least 8 characters.

  • Any account can turn on two-factor authentication (TOTP) under Settings > Personal: scan the QR code with an authenticator app and enter the 6-digit code. From then on, sign-in asks for the code after the password.
  • Administrators can turn on Require two-factor authentication for administrators under Settings > Security. An administrator without 2FA is then sent to set it up after signing in, and other actions return 403 mfa_setup_required. The policy covers administrators who sign in through LDAP too.
  • OIDC, Feishu and LDAP accounts can also set up two-factor authentication under Settings > Personal; once on, sign-in asks for the code as well.
  • If a user loses their phone, another administrator selects Reset 2FA on the Users page.

Sign-in rate limits: 10 failures from one IP, or 20 failures for one username (including wrong codes), within 15 minutes lock sign-in for 15 minutes with 429 too_many_attempts.

OIDC single sign-on

Works with standard OIDC identity providers such as Keycloak, Authing, Azure AD and Okta.

Steps

  1. Under Settings > Login integrations, open Single sign-on (OIDC), copy the Callback URL shown and register it with the identity provider. It looks like https://ai.example.com/api/auth/sso/callback.

  2. Fill in:

    FieldDescription
    Issuer URLThe identity provider, for example https://sso.example.com/realms/main
    Client ID, Client secretThe client created at the identity provider
    ScopesDefault openid profile email
    Username claimDefault preferred_username; falls back to email, then sub
    Groups claimDefault groups. To grant administrator by group, turn on the groups claim for the client at the identity provider
    Administrator groupsMembers of these groups are administrators, synced at every sign-in
    Default roleRole given to other users at first sign-in
    Create accounts on first sign-inWhen off, only existing SSO accounts can sign in
    Fixed callback URLRecommended in production; when empty, it is derived from the URL used
    Button textText of the login page button
  3. Turn on Enable single sign-on and save. The gateway first contacts the identity provider to check the settings and reports sso_discovery_failed if it cannot.

SSO accounts are matched by identity provider and user ID; a local account with the same name is never taken over. SSO accounts have no local password and cannot sign in with one.

Feishu sign-in

Staff can scan a QR code with Feishu on the login page, or open the web app from the Feishu workplace without signing in again.

Steps

  1. On the Feishu Open Platform, create a custom enterprise app and enable the web app capability.
  2. Under security settings, add the redirect URL shown under Settings > Login integrations > Feishu sign-in (it looks like https://ai.example.com/api/auth/feishu/callback).
  3. Under permissions, grant access to user email and user ID (optional, used to identify administrators) and to tenant information (tenant:tenant:readonly), then create and publish an app version.
  4. In the console, enter the App ID and App secret, choose the Deployment type (Feishu, Lark or a private deployment), optionally list Administrator emails or Administrator user_id / open_id, turn on Enable Feishu sign-in and save.

When Allowed tenants (tenant_key) is empty, only users of the tenant that owns the app can sign in, and the app needs the tenant information permission. Without it, existing accounts still sign in, but new accounts are not created and administrators are not granted from the list. For a marketplace app, list the tenants allowed to sign in.

The username of a Feishu account is the work email, or feishu_<user_id> without one. The display name is synced at every sign-in.

LDAP / Active Directory

Staff sign in on the login page with their domain username and password.

Steps

  1. Under Settings > Login integrations, open LDAP / AD sign-in and pick Active Directory or OpenLDAP under Fill in defaults.

  2. Fill in for your directory:

    FieldActive DirectoryOpenLDAP
    Server URLldaps://dc01.corp.example.com:636, or ldap://…:389 with StartTLSldap://ldap.example.com:389
    Service account bind DNCN=svc-fabric,OU=Service,DC=corp,DC=example,DC=comcn=readonly,dc=example,dc=com
    User base DNOU=Staff,DC=corp,DC=example,DC=comou=people,dc=example,dc=com
    User filter(&(objectClass=user)(sAMAccountName={username}))(&(objectClass=inetOrgPerson)(uid={username}))
    Username / display name / email attributessAMAccountName / displayName / mailuid / displayName or cn / mail
    GroupsRead from the user's memberOf; Group base DN (optional) can stay emptyEnter a Group base DN, for example ou=groups,dc=example,dc=com
  3. Optionally set Allowed groups (group DNs; empty lets every user the directory finds sign in), Administrator groups and the default role.

  4. Under Test connection, enter a domain username (and optionally its password) and run the test. Check the resolved DN, display name, groups and resulting role.

  5. Turn on Enable LDAP sign-in and save.

  • The service account only needs read access to the directory. In production use ldaps:// or StartTLS; for a self-signed certificate paste the CA certificate (PEM) into CA certificate (optional) rather than turning on Skip certificate verification.
  • Members of Administrator groups become administrators at each sign-in and return to the default role at the next sign-in after leaving the group. The last administrator is never demoted.
  • With automatic provisioning off, only domain accounts that have signed in before can continue to sign in; new staff cannot.
  • Local accounts such as admin always use their local password, even if the directory has a user with the same name. If the directory is down, local administrators can still sign in.

Account sources and roles

SourcePassword managed byRole sync
LocalThe console; administrators can reset itSet by an administrator on the Users page
OIDCIdentity providerAdministrator groups, at every sign-in
FeishuFeishuAdministrator emails or user IDs, at every sign-in
LDAPDirectoryAdministrator groups, at every sign-in

Passwords of OIDC, Feishu and LDAP accounts are managed by their identity systems; the console cannot change or reset them. Role sync only switches between administrator and non-administrator, so a user set to project member by hand is not turned into read-only. After changing the LDAP URL, the OIDC issuer or the Feishu service address, you must enter the matching password or secret again.

On this page