DOCUMENTATION
  • Welcome
  • Releases
    • 2025
      • Release v6.20.2 (2025-05-07)
      • Release v6.20.1 (2025-05-06)
      • Release v6.20.0 (2025-04-30)
      • Release v6.19.2 (2025-04-11)
      • Release v6.19.1 (2025-03-31)
      • Release v6.19.0 (2025-03-27)
      • Release v6.18.2 (2025-03-11)
      • Release v6.18.1 (2025-03-07)
      • Release v6.18.0 (2025-02-26)
      • Release v6.17.3 (2025-02-14)
      • Release v6.17.2 (2025-02-07)
      • Release v6.17.1 (2025-02-06)
      • Release v6.17.0 (2025-01-30)
    • 2024
      • Release v6.16.0 (2024-12-12)
      • Release v6.15.0 (2024-11-27)
      • Release v6.14.2 (2024-11-05)
      • Release v6.14.1 (2024-11-01)
      • Release v6.14.0 (2024-10-31)
      • Release v6.13.3 (2024-10-16)
      • Release v6.13.2 (2024-10-10)
      • Release v6.13.1 (2024-10-02)
      • Release v6.13.0 (2024-09-25)
      • Release v6.12.2 (2024-09-18)
      • Release v6.12.1 (2024-08-01)
      • Release v6.12.0 (2024-07-25)
      • Release v6.11.5 (2024-07-09)
      • Release v6.11.4 (2024-07-05)
      • Release v6.11.3 (2024-07-03)
      • Release v6.11.2 (2024-06-21)
      • Release v6.11.1 (2024-06-14)
      • Release v6.11.0 (2024-06-05)
      • Release v6.10.2 (2024-05-15)
      • Release v6.10.1 (2024-05-08)
      • Release v6.10.0 (2024-04-30)
      • Release v6.9.3 (2024-03-19)
      • Release v6.9.2 (2024-03-15)
      • Release v6.9.1 (2024-03-06)
      • Release v6.9.0 (2024-02-28)
      • Release v6.8.5 (2024-02-02)
      • Release v6.8.4 (2024-02-01)
      • Release v6.8.3 (2024-01-12)
      • Release v6.8.2 (2024-01-05)
    • 2023
      • Release v6.8.1 (2023-12-22)
      • Release v6.8.0 (2023-12-14)
      • Release v6.7.4 (2023-11-15)
      • Release v6.7.3 (2023-11-14)
      • Release v6.7.2 (2023-11-03)
      • Release v6.7.1 (2023-10-17)
      • Release v6.7.0 (2023-10-13)
      • Release v6.6.4 (2023-09-29)
      • Release v6.6.3 (2023-09-28)
      • Release 6.6.2 (2023-09-14)
      • Release v6.6.1 (2023-08-10)
      • Release v6.6.0 (2023-08-03)
      • Release v6.5.1 (2023-06-23)
      • Release v6.5.0 (2023-06-22)
      • Release v6.4.0 (2023-05-31)
      • Release v6.3.1 (2023-04-28)
      • Release v6.3.0 (2023-04-05)
      • Release v6.2.5 (2023-03-16)
      • Release v6.2.4 (2023-02-01)
      • Release v6.2.3 (2023-01-12)
      • Release v6.2.2 (2023-01-12)
      • Release v6.2.1 (2023-01-05)
    • 2022
      • fylr first Production Ready Release 🎉 (2022-12-22)
  • License
  • Help
    • FAQs
    • Tutorials
      • For Users
      • For Administrators
        • Exporting & Importing Hierarchical Lists
        • Regenerating preview images
        • Search Text in images or office files
      • For System Administrators
        • How to setup and use IIIF
        • External access: Sharing collections with anonymous users
    • Glossary
  • FOR USERS
    • Getting Started
    • Asset / Records Management
      • Creating Records
      • Editing Records
        • Input Fields
        • Group Editor
      • Deleting Records
    • Quick Access
      • Collections (& Presentations)
      • Saved Searches (& Lists)
    • Lists
    • Plugins
      • Plugin Overview
  • FOR ADMINISTRATORS
    • Permissions
      • User
      • Groups
      • Object Types
      • Pools
      • Tags & Workflows
      • Presets
    • Tools
      • CSV Importer
        • General Information
        • Options
        • Examples
          • All Data Types
          • Lists
          • Hierarchies
          • Files
      • JSON Importer
        • Step-by-Step Tutorial
          • Write Import Manifest
          • Create Basetype Payloads
          • Create Object Payloads
          • Collection Payloads
          • Optional: Update links between Objects
          • Start Import
      • Permissions Download & Upload
    • Base Configuration
      • General
      • Access
      • User Management
      • Languages
      • Email
      • Export & Deep Links
      • Workflow Webhooks
      • Publications
      • File Worker
        • Preview Configuration
        • Location Defaults
        • Custom .icc Color Profiles
      • Objectstore
      • Services
      • License Management
      • Development
      • Plugins
    • Plugin Manager
    • Location Manager
    • Messages
    • Events
    • Backup Manager
    • Additional Features
      • IIIF
      • Connector
      • Wordpress
      • Zooniverse
      • Protocols
        • OAI/PMH
  • FOR SYSTEM ADMINISTRATORS
    • Installation
      • Linux
        • multiple fylrs in one Linux
        • proxy and fylr
      • Windows
      • Kubernetes
    • Configuration
      • fylr.example.yml
      • fylr.default.yml
      • performance tuning
      • pre-load frontend config
      • Load Custom Plugins
      • HTTP and HTTPS
      • DNS Domains
    • Backups & Restore
    • Migration Tool
      • Create payloads (fylr backup)
      • Insert payloads (fylr restore)
      • Best Practice
      • Using the fylr inspect page
    • Integration
      • Authentication
      • Hotfolder
    • Symptom & Solution
      • Log messages that can be ignored
      • too many clients are connected
      • too many nested clauses
      • context canceled
      • ContainerConfig error
      • Purge objects
    • PostgreSQL versions
  • Tutorials
    • Project Workflow
    • Hotfolder & File System Connect
      • Preparations Before Usage
      • Setting Up An Upload Collection
      • Importing Files
    • PDF Creator
    • Extracting File Metadata Later On
    • Overlay Resource
    • Authentication
      • LDAP
      • SAML
    • Data Model Sync
    • Purge a fylr instance
    • typo3 plugin
    • Use fylr in Google docs via CI HUB
  • FOR DEVELOPERS
    • API
      • OAuth2
      • Endpoints
        • /api/collection
        • /api/config
        • /api/db_info
        • /api/db
        • /api/eas
        • /api/event
        • /api/export
        • /api/group
        • /api/l10n
        • /api/mask
        • /api/message
        • /api/oaipmh
        • /api/objects
        • /api/objecttype
        • /api/plugin
        • /api/pool
        • /api/publish
        • /api/right
        • /api/schema
        • /api/search
        • /api/settings
        • /api/suggest
        • /api/system
        • /api/tags
        • /api/transitions
        • /api/user
        • /api/webdav
        • /api/xmlmapping
        • /api/task
    • System Data Types
      • pool
      • file
      • user
      • group
      • pool
      • collection
      • message
      • publish
      • event
    • User Data Types
      • text, text_oneline
      • string
      • text_l10n, text_l10n_oneline
      • boolean
      • number
      • integer.2
      • double
      • date, datetime
      • daterange
      • geojson
    • Custom Data
    • Emails
    • Export
    • Exec server
    • File versions
    • WebDAV
    • Plugin
    • Collection Pin Code
    • easydb 5
    • Localization
    • Access private Repositories
Powered by GitBook
On this page
  • User Login
  • User Update
  • USER MAPPING
  • Group settings
  • Final step: Matching an LDAP group to a fylr group:
  • Walk the chain of ancestry
  1. Tutorials
  2. Authentication

LDAP

How to log into fylr with accounts of your LDAP service.

PreviousAuthenticationNextSAML

Last updated 6 months ago

LDAP is an authentication service that you might already have, to hold your users' accounts centrally. It is part of Microsoft Active Directory (predecessor to Azure Active Directory) and available as a separate service (OpenLDAP).

You need a fylr licence including Authentification to use LDAP. To enable fylr users to log in with LDAP accounts, scroll the User Management page to LDAP, above SAML:

User Login

Here is an example configuration with the public test provider ldap.forumsys.com:

URL: Do not forget the protocol, in this case, ldap://. This could also be ldaps://. ldap:// can be combined with Start TLS.

Allow insecure connection: Can be safe if security is done by other means, e.g. fylr and LDAP server are running internally.

Bind User: An LDAP user, which fylr uses to search for other users and groups. Does not need administrative privileges.

Bind Password: Password of the Bind User.

User Base DN: Organizatinal Unit or whole organization, in which to search for users. All users who shall be able to log in must be inside this unit. Bind User does not have to be inside this unit. Example: OU=Users,DC=example,DC=com .

User filter: Which LDAP attribute shall be compared to the login string (which is entered during fylr login)? For example if I am Albert Einstein and my login username ist einstein: Which LDAP attribute contains the string einstein? In the example above it is the attribute uid . the values of uid are compared to the login given by the user. So if I enter einstein and my password, fylr then searches for LDAP objects which have the attribute uid with value einstein . If one is found, the password of that LDAP object is also checked and if correct, this LDAP object is considered logged in. For this scenario, the user filter (uid=%(login)s) would be enough. To reduce search time and the number of objects compared, the example in the screenshot additionally restricts the search to only LDAP objects of objectClass = person. If it does not work, try upper/lower case. For example, in one case the log messages showed an unexpected replacement from (Login) to %\28Login\29s and the solution was to write (login) (lower case L) in the User filter.

User Update

During login with LDAP credentials, fylr creates a fylr user that is considered equivalent to the LDAP user - if that fylr user does not already exist. To decide, whether the fylr user already exists, a fylr attribute is compared with an LDAP attribute. In the drop-down menu User Update, you can choose which fylr-Attribute is compared: Referenz, Login or E-Mail. Default is Referenz (English: reference). In USER MAPPING (below) you chose, which LDAP-Attribute to compare.

As an example, let us assume that ...

  • E-Mail is chosen in User Update and

  • in USER MAPPING, the Target: Email is set to Value %(mail)s (E-Mail and Email are just different labels of the same data in fylr. So ignore this difference.)

... thus fylr E-Mail will be compared to LDAP mail. When a user with email address Marity@example.com first logs in with her LDAP credentials, a new fylr user is created and it's attribute Email is filled with the string Marity@example.com. Log message: DBG user new in fylr [...] login=ldap. When she logs in the second time, the same fylr user is used, as expected, because Marity@example.com is found in the fylr attribute Email. Log Message: DBG user found in fylr with id 31, version 2 [...] login=ldap (31 is just an example, 2 is increased with each login) Now, to make the disadvantages of using E-Mail clear, let us assume that the user marries and now has her email address in LDAP changed to Marity-Einstein@example.com. When she logs into fylr after the change, no fylr user is found with Email Marity-Einstein@example.com. It is a different string than the stored Marity@example.com in the fylr attribute Email. Thus another new fylr user is created. Log message: DBG user new in fylr [...] login=ldap. Problematic: The same person can no longer log into her original fylr account. To prevent this, we recommend to set User Update to Referenz and in USER MAPPING set the Value of the Target: Reference to an LDAP attribute that does not change.

USER MAPPING

+Add: Add another mapped Attribute. We suggest you have the same ones as shown above. At least Login and the one chosen in User Update.

Target: Choose fylr attribute to be mapped to LDAP attribute.

Value: Enter one or more LDAP attributes, each given between %( and)s. Upper case / lower case is important here, even if it is not important inside your LDAP Directory! The example values working with ldap.forumsys.com are simplistic. In your environment, they may look more like: %(sAMAccountName)s or %(displayName)s

2029-12-31 23:59:59 DBG search with base DN "dc=example,dc=com" and filter "(uid=einstein)" login=lda
2029-12-31 23:59:59 DBG search found 1 entries [...] login=ldap
2029-12-31 23:59:59 DBG DN: uid=einstein,dc=example,dc=com
  objectClass: [inetOrgPerson organizationalPerson person top]
  cn: [Albert Einstein]
  sn: [Einstein]
  uid: [einstein]
  mail: [einstein@ldap.forumsys.com]
  telephoneNumber: [314-159-2653]

So, usable attributes in this example are DN, objectClass, cn, sn, uid, mail and telephoneNumber.

If you do not see enough ldap-related log messages, check:

  • Your license includes Capabilties: External Authentication : true . (check in Base Configuration - License Management)

  • fylr's log Level is at least debug. (check in Base Configuration - Development - Logging)

  • Log Steps is activated. (check in Base Configuration - User Management - LDAP - Debug)

Group settings

We recommend to only configure group settings after the above settings are working to log in. Group settings are optional.

Group Base DN: Organizational Unit or whole organization, in which to search for groups. Above you can see what works with ldap.forumsys.com. A more typical example for a production environment: OU=groups,DC=example,DC=com .

Group Filter: Here, enter a search expression to find the LDAP objects to further evaluate. Typically: the group objects of which the user is a member. You should use one attribute of the LDAP group (uniqueMember or member) and one attribute of the user (e.g. cn or DN in the syntax %(...)s ) in an evaluation. In other words, compare them with =.

In the context of ldap.forumsys.com, the distinguished name (usable as DN) is in the group attribute uniqueMember, so we use those:

(uniqueMember=%(DN)s) ... this would work. But to not evaluate all objects, instead we evaluate only groups, thus adding the object class. Now the whole expression is: (&(objectClass=groupOfUniqueNames)(uniqueMember=%(DN)s)) ... this was successfully tested with ldap.formusys.com.

As a second example: To compare all attributes named member to a user's cn: (member=%(cn)s). This will result in (an ldap search during login that returns) all objects that have the user's cn in an attribute called member. In other words: All the user's groups.

A third example, from a different LDAP installation (Microsoft Active Directory):

(&(member=%(distinguishedName)s)(objectClass=group))

Now you have narrowed the comparison to a few objects, likely groups. Next: Which attribute of these objects shall be compared when picking one single LDAP group to match one single fylr group? This is determined in Group Mapping:

Group Mapping: Give a LDAP attribute to look at when matching one specific fylr group to one specific LDAP group. (Thus preparing "Final step:" further down). To use e.g. the group's common name, use %(cn)s here, which works with ldap.forumsys.com. If in doubt, which LDAP attributes can be used between %( and ), see fylr log output. How to do that is described above around the previous log output. Log output for groups (in this case just one) looks like:

2029-12-31 23:59:59 DBG search with base DN "dc=example,dc=com" and filter "(uniquemember=uid=einstein,dc=example,dc=com)"  login=ldap
2029-12-31 23:59:59 DBG search found 1 entries
2029-12-31 23:59:59 DBG DN: ou=scientists,dc=example,dc=com
  uniqueMember: [uid=einstein,dc=example,dc=com uid=galieleo,dc=example,dc=com uid=tesla,dc=example,dc=com uid=newton,dc=example,dc=com]
  ou: [scientists]
  cn: [Scientists]
  objectClass: [groupOfUniqueNames top]

So, usable attributes in this example are DN, uniqueMember, cn, ou and objectClass. But objectClass is not specific to one group. Similarly uniqueMember could be the same in another group and it is very long and could change any time. DN is usable but quite long. ou could be used in other objects. Thus we suggest cn in this case, if it is unique. Otherwise DN.

Final step: Matching an LDAP group to a fylr group:

  • In the settings for a fylr group, enter a string that matches one LDAP group. For the example of ldap.forumsys.com, we created the fylr group scientists and since we chose cn above in Group Mapping, we now have to use the string Scientists, as this is the value in that group's common name (cn). In the fylr frontend this is done here:

  • So now, when the ldap.forumsys.com's user einstein or newton logs into this fylr, they will be automatically in the fylr group scientists and enjoy all the group's system rights and permissions in fylr.

Walk the chain of ancestry

In case your group filter does not give the results you expect, you can try to use LDAP_MATCHING_RULE_IN_CHAIN in the group search filter.

Example:

(&(member:1.2.840.113556.1.4.1941:=%(distinguishedName)s)(objectClass=group))

The string 1.2.840.113556.1.4.1941 specifies LDAP_MATCHING_RULE_IN_CHAIN. This applies only to DN attributes. This is an extended match operator that walks the chain of ancestry in objects all the way to the root until it finds a match. This reveals group nesting. It is available only on domain controllers with Windows Server 2003 SP2 or Windows Server 2008 (or above).

Usually, this is not needed, but it was needed for customers that are used to how Cumulus does LDAP group search.

If in doubt, which LDAP attributes can be used between %( and )s during User Mapping, check your LDAP structure or fylr's output after a LDAP login attempt. fylr's output is shown as container logs and in . The output may look like:

(& ) is the syntax for requiring two conditions ("AND"). For more, see

https://fylr.example.com/inspect/system/console/
https://docs.ldap.com/specs/rfc4515.txt
where to find LDAP in the menues
example ldap configuration
tested example for ldap.forumsys.com
example Group settings tested with ldap.forumsys.com
fylr frontend > Rights Management > Groups > Choose group > Authentication Services > LDAP section > Add row