From 29858ef754acb36ff6ec4782707967ac0b97d4b0 Mon Sep 17 00:00:00 2001 From: konradoboza Date: Tue, 28 May 2024 14:17:04 +0200 Subject: [PATCH 1/2] IBX-8290: Reworked REST authentication to comply with the authenticator mechanism under separate firewall --- ibexa/commerce/5.0/config/packages/security.yaml | 7 ++++++- ibexa/experience/5.0/config/packages/security.yaml | 7 ++++++- ibexa/headless/5.0/config/packages/security.yaml | 7 ++++++- ibexa/oss/5.0/config/packages/security.yaml | 7 ++++++- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/ibexa/commerce/5.0/config/packages/security.yaml b/ibexa/commerce/5.0/config/packages/security.yaml index 00f756da..8b72f967 100644 --- a/ibexa/commerce/5.0/config/packages/security.yaml +++ b/ibexa/commerce/5.0/config/packages/security.yaml @@ -130,10 +130,15 @@ security: # csrf_token_generator: security.csrf.token_manager # logout: ~ + ibexa_rest: + pattern: ^/api/ibexa + user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker + custom_authenticators: + - Ibexa\Rest\Security\Authenticator\RestAuthenticator + ibexa_front: pattern: ^/ user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker - ibexa_rest_session: ~ form_login: require_previous_session: false enable_csrf: true diff --git a/ibexa/experience/5.0/config/packages/security.yaml b/ibexa/experience/5.0/config/packages/security.yaml index 52bd4ccc..e5a12400 100644 --- a/ibexa/experience/5.0/config/packages/security.yaml +++ b/ibexa/experience/5.0/config/packages/security.yaml @@ -118,10 +118,15 @@ security: # csrf_token_generator: security.csrf.token_manager # logout: ~ + ibexa_rest: + pattern: ^/api/ibexa + user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker + custom_authenticators: + - Ibexa\Rest\Security\Authenticator\RestAuthenticator + ibexa_front: pattern: ^/ user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker - ibexa_rest_session: ~ form_login: require_previous_session: false enable_csrf: true diff --git a/ibexa/headless/5.0/config/packages/security.yaml b/ibexa/headless/5.0/config/packages/security.yaml index 52bd4ccc..e5a12400 100644 --- a/ibexa/headless/5.0/config/packages/security.yaml +++ b/ibexa/headless/5.0/config/packages/security.yaml @@ -118,10 +118,15 @@ security: # csrf_token_generator: security.csrf.token_manager # logout: ~ + ibexa_rest: + pattern: ^/api/ibexa + user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker + custom_authenticators: + - Ibexa\Rest\Security\Authenticator\RestAuthenticator + ibexa_front: pattern: ^/ user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker - ibexa_rest_session: ~ form_login: require_previous_session: false enable_csrf: true diff --git a/ibexa/oss/5.0/config/packages/security.yaml b/ibexa/oss/5.0/config/packages/security.yaml index ce0ac721..d9d5356b 100644 --- a/ibexa/oss/5.0/config/packages/security.yaml +++ b/ibexa/oss/5.0/config/packages/security.yaml @@ -74,10 +74,15 @@ security: # entry_point: lexik_jwt_authentication.jwt_token_authenticator # stateless: true + ibexa_rest: + pattern: ^/api/ibexa + user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker + custom_authenticators: + - Ibexa\Rest\Security\Authenticator\RestAuthenticator + ibexa_front: pattern: ^/ user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker - ibexa_rest_session: ~ form_login: require_previous_session: false enable_csrf: true From a7190fba083eeb2b72f3ebd7f427dbba9d1bc039 Mon Sep 17 00:00:00 2001 From: konradoboza Date: Thu, 20 Jun 2024 12:18:00 +0200 Subject: [PATCH 2/2] added shared context for BO and REST --- ibexa/commerce/5.0/config/packages/security.yaml | 2 ++ ibexa/experience/5.0/config/packages/security.yaml | 2 ++ ibexa/headless/5.0/config/packages/security.yaml | 2 ++ ibexa/oss/5.0/config/packages/security.yaml | 2 ++ 4 files changed, 8 insertions(+) diff --git a/ibexa/commerce/5.0/config/packages/security.yaml b/ibexa/commerce/5.0/config/packages/security.yaml index 8b72f967..60124fb3 100644 --- a/ibexa/commerce/5.0/config/packages/security.yaml +++ b/ibexa/commerce/5.0/config/packages/security.yaml @@ -133,12 +133,14 @@ security: ibexa_rest: pattern: ^/api/ibexa user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker + context: ibexa custom_authenticators: - Ibexa\Rest\Security\Authenticator\RestAuthenticator ibexa_front: pattern: ^/ user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker + context: ibexa form_login: require_previous_session: false enable_csrf: true diff --git a/ibexa/experience/5.0/config/packages/security.yaml b/ibexa/experience/5.0/config/packages/security.yaml index e5a12400..d9b25ede 100644 --- a/ibexa/experience/5.0/config/packages/security.yaml +++ b/ibexa/experience/5.0/config/packages/security.yaml @@ -121,12 +121,14 @@ security: ibexa_rest: pattern: ^/api/ibexa user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker + context: ibexa custom_authenticators: - Ibexa\Rest\Security\Authenticator\RestAuthenticator ibexa_front: pattern: ^/ user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker + context: ibexa form_login: require_previous_session: false enable_csrf: true diff --git a/ibexa/headless/5.0/config/packages/security.yaml b/ibexa/headless/5.0/config/packages/security.yaml index e5a12400..d9b25ede 100644 --- a/ibexa/headless/5.0/config/packages/security.yaml +++ b/ibexa/headless/5.0/config/packages/security.yaml @@ -121,12 +121,14 @@ security: ibexa_rest: pattern: ^/api/ibexa user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker + context: ibexa custom_authenticators: - Ibexa\Rest\Security\Authenticator\RestAuthenticator ibexa_front: pattern: ^/ user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker + context: ibexa form_login: require_previous_session: false enable_csrf: true diff --git a/ibexa/oss/5.0/config/packages/security.yaml b/ibexa/oss/5.0/config/packages/security.yaml index d9d5356b..7473ce54 100644 --- a/ibexa/oss/5.0/config/packages/security.yaml +++ b/ibexa/oss/5.0/config/packages/security.yaml @@ -77,12 +77,14 @@ security: ibexa_rest: pattern: ^/api/ibexa user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker + context: ibexa custom_authenticators: - Ibexa\Rest\Security\Authenticator\RestAuthenticator ibexa_front: pattern: ^/ user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker + context: ibexa form_login: require_previous_session: false enable_csrf: true