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
  • Background
  • SAML with mocksaml.com
  • Generate Certificate
  • Base Config
  • Test Connection
  • What you might need with other providers
  • fylr SAML Metadata
  • Other URLs
  • Attributes and user matching
  • Replacing strings in attributes
  • Signed AuthnRequest
  • MS Entra
  • Group Mapping
  1. Tutorials
  2. Authentication

SAML

How to connect fylr to a SAML authentication service.

PreviousLDAPNextData Model Sync

Last updated 14 days ago

This can be used to log into fylr with users from e.g. Shibboleth and Azure ActiveDirectory.

Background

SAML with mocksaml.com

Follow this example to get into the workflow of configuring SAML with fylr.

First you need to generate a certificate and private key.

Background: The certificate will be entered in the fylr frontend's form fields and then be given to the Identity Provider as part of the metadata, so that requests coming from fylr are accepted. It is in addition to fylr's https certificate and not to be confused with that.

Generate Certificate

This can be done where ever openssl is installed as a command line utility.

openssl genrsa -out private.key 3072
openssl req -new -x509 -key private.key -out publickey.cer -days 365

Now you can view the contents of the files private.key and publickey.cer and put that into fylr's frontend: (Certificate and Key fields) as in this screenshot:

Base Config

  • We recommend to set the checkmark at Log Steps. This will write log events to debug SAML connections. In case of an error, the connection attempt is always logged.

  • In User Mapping define how the SAML user is created in fylr. Upon each login the SAML users are mapped to fylr users. If an user already exists, an update is performed. Working with mocksaml.com:

    • Target: Reference: %(email)s

    • Target: Email: %(email)s

Test Connection

Now go to the fylr login page (e.g. by logging out or using a second browser or private tab) and click on SAML Login in the login dialog. This sends you to the login page of the Identify Provider. Login using any name and password (as written on that test login page). fylr will log the user in with no further rights (unless configured). Optionally check the User Manager in fylr to see that the user record has been created (you can only view this as a privileged user, e.g. root).

What you might need with other providers

mocksaml.com is simplified. Here are some details you might need with other identity providers:

fylr SAML Metadata

Other URLs

Attributes and user matching

  • Target: Login: This can be used to determine the username during login, as in: The pair of username and Password used to log in. Example value: %(login)s. Or %(sAMAccountName)s. Has to match an attribute name that is actually present in your IDP's data.

  • Target: Display Name: Example value: %(displayName)s. Has to match an attribute name that is actually present in your IDP's data.

  • Target: Email: Note that email addresses in fylr have to be unique. The same email address cannot be used by two fylr users under any circumstances. fylr will not allow the email address to be saved a second time, preventing the login via SAML, if the email address is already present in fylr.

  • Target: Reference: Make sure this is adjusted to your data. Do not just copy and paste. It can be very different from the above simple example. Another example: %(urn:oasis:names:tc:SAML:attribute:subject-id)s

    • By default, Reference is used to determine whether a user already exists in fylr or whether to create a new one as a SAML user logs in. You may think of it as the unique ID.

  • User update: Set the attribute which is used to determine whether the SAML user (who is logging in) already has a matching account in fylr. If it has a matching account, that user is logged in (and attributes may get overwritten with the current values in SAML). If it has no matching account in fylr yet, a new one is being created. By default, the used attribute is Reference. But you can choose the attributes Email or Login, instead. Example: Assume that the chosen attribute for Benutzer-Update is Email and that Alice logs in the first time with her SAML user alice@example.com. Company policy changes and thus her email address (in SAML) changes to alice.lastname@example.com. During her next login into fylr, a new user is being created, as there is no user yet with alice.lastname@example.com. Now Alice has two user accounts in fylr and can only log in to the second one.

Replacing strings in attributes

Our attribute syntax can replace strings. This syntax is part of our attribute matching (fylr 6.20 and newer):

%(key||search||replacement)s

Where search is the regexp matching what is then replaced with replacement.

The regular expressions syntax rules: https://pkg.go.dev/regexp#Regexp.ReplaceAllString.

Example: %(email||^.*=||)s, in context:

When a user logs in with attribute email equal to urn:campus:1:mail=ben@example.com and attribute mapping Target:Email %(email||^.*=||)s then his email address in fylr will be just ben@example.com, because the search part matches all up to the equal sign and the replacement is empty.

Signed AuthnRequest

Checkbox: ☑︎ Sign requests (default off)

Some environments have the requirement that the SPs (in this case fylr) must sign the authentication requests.

Needs at least fylr v6.12.0.

MS Entra

This section was contributed by partners and customers, we did not verify this.

Group Mapping

Users of production Identity providers often have an attribute that groups user accounts together and can be used to give permissions in fylr to a whole group. We will assume an attribute called role to demonstrate a group mapping:

Mapping goal of the following example: Every role that ends in the letters samltest.id shall be automatically member of the fylr group testidp.

  1. In fylr-URL/configmanager > User management > SAML add into the form field Group Mapping the value %(role)s (see following screenshot).

  1. In fylr-URL/groupmanager add a group named testidp. Give that group some system rights that are visible after logging in.

  2. In this group's configuration > AUTHENTICATION SERVICES > below Single-Sign-On add an entry with Method Regular Expression and Input .*samltest.id (see following screenshot).

  1. Save. Test the login as a SAML user with a matching role. The user now has the rights given to the group testidp.

SAML 2.0 is an -based that uses containing to pass information about a principal (usually an end user) between a SAML authority, named an , and a SAML consumer, named a .

fylr acts as a Service Provider and as such needs to connect to an Identity Provider. For testing and to understand the configuration workflow, you can use the public Identity Provider .

When asked for Common Name (e.g. server FQDN or YOUR name) answer with fylr.example.eu if your fylr is at .

As URL add ("metadata URL" of the Identity Provider).

fylr's metadata URL is (replace domain name with the one from your instance). You might need to give this URL to your Identity provider or you might have to call this URL yourself and then give the downloaded XML to your Identity provider.

ACS Assertionsverbraucherdienst-URL:

Logout URL:

Into the URL field of the fylr SAM config, put the URL that you find in MS Entra. The syntax is like: (recommended) or (might also work) Here a screenshot (in German, but the location should be similar in any language) of MS Entra about where to find this URL. See the red rectangle. Also some other config is visible: \

Where to put fylr URLs in MS Entra:

Check that certificates are not expired / expiring too soon. Here a place in MS Entra to check one of the involved certificates:

XML
protocol
security tokens
assertions
Identity Provider
Service Provider
https://mocksaml.com
https://fylr.example.eu
https://mocksaml.com/api/saml/metadata
https://FYLR.EXAMPLE.COM/api/saml/metadata
https://FYLR.EXAMPLE.COM/api/saml/acs
https://FYLR.EXAMPLE.COM/api/saml/slo
https://login.microsoftonline.com/abc[...]/federationmetadata/2007-06/federationmetadata.xml?appid=def[...]
https://login.microsoftonline.com/abc[...]/FederationMetadata/2007-06/FederationMetadata.xml
Where to find the settings in the frontend.
screenshot of the form fields for certificate and key
How to add an attribute for SAML group mapping in the fylr frontend
How to match a value for a group mapping in the fylr frontend