LDAP Authentication

  • Last update:January 20, 2022
  • I. Overview

    1. Version

    Report Server VersionFeature Changes
    10.0-
    10.0.18

    Section II.1, LDAP authentication adds a "Test Connection" button

    Section III.3, supports custom configuration of LDAP authentication username login search field.


    2. Application scenarios

    The user stores relatively complete employee information in the LDAP authentication server, and has used it to authenticate multiple online systems.

    Users need to use the same authentication method in the decision-making platform. You can turn on LDAP authentication at Manage> User > Global Settings in the decision-making platform.


    3. Function introduction

    The platform provides LDAP authentication, and users can set LDAP authentication in the decision-making platform according to the method in this paper.

    LDAP authentication, when a user logs in, the platform will authenticate the entered username information to the set LDAP system.

    • If the LDAP system authentication fails, the platform judges that the authentication fails;

    • If the LDAP system authentication is successful, but the corresponding user does not exist in the platform users, the platform determines that the authentication fails;

    • If the LDAP system authentication is successful, and the corresponding user exists in the platform user, the platform determines that the authentication is successful, and the user can enter the platform and perform corresponding operations according to the user's authority in the platform.

    Note: Super administrators are not affected by LDAP authentication and still use the platform's built-in authentication.

    2. Example

    1. Configuring LDAP Authentication

    1) Enter the decision-making platform as an administrator, click Manage> User > Global Settings to select the authentication method for Sync User and Imported/Added User respectively. As shown below:

    1.png

    2) Select LDAP Authentication as the authentication method, enter various parameters, click the Save button, exit the decision-making paltform, and need to log in again. As shown below:

    2.png

    The description of each parameter item during LDAP authentication is shown in the following table:

    Parameter itemDescription
    URLThe URL is the entry for logging into the LDAP server. The URL consists of a domain name or IP and a port number. Generally, the default port number is 389. The URL format is: LDAP://domain name or IP+port number
    Retrieve Location

    LDAP is a server that stores data in a tree structure. Enter the server through a URL, and retrieve the relevant login information after passing the user and password authentication. The "retrieval location" is the location where the login information is stored.

    • Check "Do not retrieve location as BaseDN": only writing to the root directory will automatically retrieve the subdirectories below it, which is inefficient.

    • Uncheck "Do not retrieve location as BaseDN": write from the root directory to the subdirectory, no need to search, and the speed is faster.

    AUTH Method

    Specify the authentication type used by the LDAP directory server, according to the configuration of the LDAP server, select "simple" for the general authentication method

    • When the authentication method is "none", it is anonymous authentication, that is, the platform user can log in normally by entering any password.

    • When the authentication method is "simple", use the plain text password stored in the LDAP server for authentication.

    ContextThe class name of the initial context factory

    Normally choose "com.sun.jndi.ldap.LdapCtxFactory" - for LDAP server based directory service

    ReferralAccording to the configuration selection of the LDAP server, generally select "ignore".
    Username Suffix

    Username suffix can be added or not added, if added, the corresponding domain name will be added automatically when logging in.

    For example, there is a user named Alice@fanruan.com in the LDAP server, and the username suffix is set to @fanruan.com.

    Then the user name in the decision-making platform is Alice, and the user name when logging in to the decision-making platform is also Alice

    Administrator name/password

    The administrator name here does not refer to the administrator name of the LDAP server, but refers to the user who has the right to retrieve the LDAP server. Authentication is achieved by the user entering the LDAP server and retrieving login information from the retrieval location.

    Usually, the method of "domain name/username" is used for identification. Either "uid" or "cn" can be used, but generally do not use the writing method of DN domain name

    • If the "Administrator name" is not an LDAP server administrator, but an ordinary user who has been granted retrieve authority in the LDAP server, it must be set to the form of "username + domain name", for example, the user is "ldap", "retrieve location" ” is "DC=test,DC=com", then the administrator name is "ldap@test.com".

    • If the "administrator name" is filled in the LDAP server administrator, just fill in the name directly, such as "administrator" in the above example

    3) After filling in the parameters, click Test Connection. After the connection is successful, click Save, that is, the authentication method is successfully configured.

    3.png

    Note: If the connection fails, a prompt will pop up: Failed to connect to LDAP authentication, please confirm the relevant configuration is accurate and then save it again. As shown below:

    4.png


    2. Add users

    The LDAP server generally stores the user's employee list. If you want a user to log in using LDAP authentication on the platform, the platform also needs to add a user with the same name, because the platform operations such as binding mailboxes and assigning permissions are all based on platform users. object.

    When the corresponding user in the platform exists, it can be considered that enabling LDAP authentication just changes the password authentication of the platform user from the default platform built-in authentication to the LDAP server authentication.

    Click Manage > User > Add User to add user "test001", as shown in the following figure:

    Note 1: When configuring "Add User" for LDAP authentication, there is no need to configure a password. FanRuan uses the default password of 123456 to store, and the actual authentication goes through LDAP password authentication.

    Note 2: Synchronized users and imported/added users can choose different authentication methods respectively.

    5.png


    3. Effect View

    The user enters the username stored in the LDAP server and the password in the LDAP server. If the LDAP system authentication is successful, and the corresponding user exists in the platform user, the platform judges that the authentication is successful, and can enter the decision-making platform. According to the user in the platform permissions to operate accordingly. As shown below:

    Note 1: If the entered username does not exist in the platform, or the corresponding user in the platform is disabled, or the platform user restriction is enabled and the user is not included, it will not communicate with the LDAP server, and directly prompt "username or password" error" or "user unavailable".

    Note 2: The username stored in the LDAP server cannot use double-byte Japanese, traditional Chinese or Korean characters. Otherwise, "username or password error" will be prompted when logging in to the platform.

                 The password stored in the LDAP server cannot use double-byte Japanese, Traditional Chinese, Simplified Chinese, or Korean characters. Otherwise, "username or password error" will be prompted when logging in to the platform.

    6.png

    III. Attention items

    1. Test the LDAP connection is successful

    For report projects before 10.0.18, after configuring LDAP authentication in the decision-making platform, it is not possible to determine whether the LDAP connection is successful. When executing Section II.3 of this document, users may not be able to log in normally or log in slowly. Use the methods in this chapter to locate the problem. .

    Note: Make sure you have a local Java environment.

    1) Download the compressed package below and unzip it: 

    LDAPDemo.zip

    2) Open the "LDAPDemo.java" file and modify the configuration items of the platform's LDAP configuration page according to the actual situation, as shown in the following figure:

    Note: If the administrator name contains the following characters: '"', '+', ',', ';', '<', '>', '\', it needs to be escaped in LDAPDemo.

    Example: The user name is fanruan\admin, and you need to enter fanruan\\admin in LDAPDemo. The input of the decision platform does not need to be escaped, just input fanruan\admin directly.

    7.png

    3) Switch to the LDAP file directory and execute: javac -encoding utf-8 LDAPDemo.java to generate an LDAPDemo.class;

    Then execute: java LDAPDemo, if it returns the end of test, it means that the LDAP authentication is normal, otherwise, follow the prompts to further locate the problem. As shown below:

    8.png

    9.png


    2. LDAP authentication fails after 9.0 upgrade to 10.0

    Problem Description:

    After FineReport is upgraded from 9.0 to 10.0, the user fails to log in using LDAP authentication, and the login page displays the error message username does not exist.

    Cause Analysis:

    The LDAP login authentication logic has changed since 9.0 was upgraded to 10.0.

    Take the username User and the LDAP authentication suffix fr.com as an example to analyze the authentication logic:

    FineReport 9.0: First add the username "User" with the suffix "fr.com" to retrieve whether the user exists on the platform, and then go through the LDAP authentication process.

    FineReport 10.0: First, retrieve whether the user exists according to the username "User", and then add the suffix "fr.com" to perform the LDAP authentication process.

    Solution:

    Solution 1: Remove the username suffix from the LDAP configuration page under user management, and the user can log in normally by using the user name@suffix name.

    Solution 2: Remove the user suffix name of each user, and the user can log in normally with the user name.


    3. Configuring the LDAP Authentication Username Login Search Field

    Super administrators can customize the LDAP authentication user name login search field through the "fine_conf_entity Visual Configuration Plugin". The settings take effect after restarting the server.

    Note: Please refer to FineDB Common Table Field Modification for the method of modifying FineDB database table field values.

    Configuration item
    Modification rules
    FSConfig.loginConfig.fWords

    The parameter value format is: ["value1", "value2"]

    The parameter value is not allowed to be empty, and the parameter length is not allowed to be 0

    The default value of the parameter is ["sAMAccountName","cn","userPrincipalName","uid","displayName","name","sn"]

     

    Attachment List


    Theme: Rachel
    Already the First
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy