Allow to automatically assign SAML users to a group based on SAML attributes

This commit is contained in:
Jan Böhmer 2023-02-27 23:47:42 +01:00
parent 6a06a24296
commit 5e85c52a57
6 changed files with 151 additions and 11 deletions

View file

@ -119,3 +119,5 @@ parameters:
env(TRUSTED_HOSTS): '' # Trust all host names by default
env(DEFAULT_URI): 'https://partdb.changeme.invalid/'
env(SAML_ROLE_MAPPING): '{}'

View file

@ -128,7 +128,13 @@ services:
####################################################################################################################
saml_user_factory:
class: App\Security\SamlUserFactory
alias: App\Security\SamlUserFactory
public: true
App\Security\SamlUserFactory:
arguments:
$saml_role_mapping: '%env(json:SAML_ROLE_MAPPING)%'
$update_group_on_login: '%env(bool:SAML_UPDATE_GROUP_ON_LOGIN)%'
####################################################################################################################
# Cache

View file

@ -1,9 +0,0 @@
# Service overrides for the test environment
services:
saml_user_factory:
class: App\Security\SamlUserFactory
public: true
App\Security\SamlUserFactory:
public: true