netresearch / nr-saml-auth
SAML Frontend Authentication - Single sign-on (SSO) for frontend users via SAML.
Package info
github.com/netresearch/t3x-nr-saml-auth
Type:typo3-cms-extension
pkg:composer/netresearch/nr-saml-auth
Requires
- php: ^8.2
- onelogin/php-saml: ^4.6
- typo3/cms-backend: ^13.4 || ^14.3
- typo3/cms-core: ^13.4 || ^14.3
- typo3/cms-extbase: ^13.4 || ^14.3
- typo3/cms-frontend: ^13.4 || ^14.3
- typo3/cms-install: ^13.4 || ^14.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.64
- netresearch/typo3-ci-workflows: ^2.0.3
- phpstan/phpstan: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^11.2.5 || ^12.1.2 || ^13.0.2
- saschaegerer/phpstan-typo3: ^2.0 || ^3.0
- typo3/coding-standards: ^0.8 || ^0.9
- typo3/testing-framework: ^9.0.2
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
SAML Frontend Authentication for TYPO3
TYPO3 extension for SAML SSO authentication of frontend users using the
onelogin/php-samllibrary.
Requirements
| Version | TYPO3 | PHP |
|---|---|---|
| 13.x | 13.4, 14.3 | 8.2 - 8.6 |
| 12.x | 12.4, 13.4 | 8.1 - 8.6 |
| 10.x | 10.4, 11.5 | 7.4 - 8.1 |
Installation
Install via Composer; the extension supports Composer installations only:
composer require netresearch/nr-saml-auth
Configuration
Backend Setup
- Create a new SAML Auth Settings record on the root page in the TYPO3 backend
- Configure the Service Provider (SP) and Identity Provider (IdP) settings
Example Configuration
# Service Provider Settings
Entity ID: https://your-domain.tld
Customer service URL: https://your-domain.tld/?logintype=login
Customer service binding: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST
Name ID format: urn:oasis:names:tc:SAML:2.0:nameid-format:transient
Certificate: -----BEGIN CERTIFICATE-----
MIIFYDCCA0igAwIBAgIJAMWkGz7F5peWMA0GCSqGSIb3DQEB...
-----END CERTIFICATE-----
Private key: [SP private key, PEM]
# Identity Provider Settings
Entity ID: urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
SSO URL: https://idp.example.com/sso
Binding: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
Certificate: [IDP Certificate]
# User Settings
Username prefix: sso-
User folder: [Select frontend user folder]
User groups: [Select default frontend user groups]
Testing with SimpleSAMLphp
For development/testing, you can use SimpleSAMLphp or online SAML testing tools like samling.
Features
Auto Discovery
The login service automatically detects the SAML configuration for the current request based on the sp_entity_id matching your domain.
Deep Link Support (Middleware)
The extension includes middleware for redirecting users to their original destination after login/logout:
- The
RelayStateparameter should contain the target URL - Transmitted via POST (login) or GET (logout) from SAML server to the configured ACS URLs
Backend Module
Access SAML metadata via the Admin Tools > SAML Auth backend module to configure your IdP.
Upgrading
From 12.x to 13.x
Version 13.x includes breaking changes:
- TYPO3 13.4 or 14.3 and PHP 8.2+ required: TYPO3 12.4 and PHP 8.1 are no longer supported; version 12.x stays available for them
- Plugin is a content element type: the plugin "Saml Authentication" is no longer a subtype of the "Insert Plugin" content element but a content element type of its own (
nrsamlauth_authentication). Run the upgrade wizard "SAML Authentication: migrate the plugin to its own content element type" (identifiernrSamlAuth_pluginListTypeToCType) to migrate existing content elements and backend user group permissions
From 10.x to 12.x
Version 12.x includes breaking changes:
- PHP 8.1+ required: Upgrade your PHP version
- TYPO3 12.4+ required: Upgrade your TYPO3 installation
- onelogin/php-saml 4.0: Library upgraded with security improvements
- PSR-14 Events: the handlers for TYPO3 core hooks were replaced with listeners for core PSR-14 events; the extension dispatches no events of its own
- Dependency Injection: Services now use TYPO3 DI container
- Username prefix: the username prefix of a settings record is applied to the username from the SAML response. Users created by 10.x carry no prefix; with a prefix configured, their next login creates a new, prefixed user.
- Database: run the database compare after updating. The extension adds the table
tx_nrsamlauth_assertion, which records the assertions that logged a user in.
Development
Quality Tools
# Install dependencies composer install # Run all CI checks composer ci # Individual checks composer ci:test:php:phpstan # Static analysis composer ci:test:php:cgl # Code style check composer ci:cgl # Code style fix composer ci:test:php:unit # Unit tests
Security
What the extension protects and what it does not, its trust boundaries and the checks behind them: docs/SECURITY-ASSURANCE.md. Report vulnerabilities as described in SECURITY.md, not in public issues.
License
GPL-2.0-or-later. See LICENSE for details.
Support
For issues and feature requests, please use the GitHub issue tracker.