Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-8324: Reworked JWT editorial bearer in page builder #128

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

konradoboza
Copy link
Contributor

@konradoboza konradoboza commented Jul 11, 2024

🎫 Issue IBX-8324

Related PRs:

Description:

Why on earth do we need yet another firewall? 😮‍💨 We actually don't, custom_authenticators fallback does the trick.

Symfony\Component\Security\Core\Authentication\Provider\AnonymousAuthenticationProvider was doing the job before it got deprecated. It means all the /_fragment calls were caught and PermissionResolver::setCurrentUserPreference was invoked so we were authenticated. Since we cannot rely on this mechanism anymore, I needed to figure out how to make sure we won't be having unauthenticated calls in page builder resulting in login screen redirection.

Why not EventSubscriber?

It just won't work - each call needs to go through built-in Symfony authenticator-based system whereas authentication providers are not to be relied upon anymore. Besides, we don't have any security-related events that are available for subrequests.

Why the original issue from the JIRA ticket emerges only on Varnish?

/_fragment calls are strictly related to ESI calls (render_esi Twig helpers for each Page Builder block) - if no reverse proxy is in use we fallback to render and no separate calls are there.

For QA:

Documentation:

Another security.yaml related change.

Copy link

Thanks for contribution! 🎉

To test the changes please execute:

composer config extra.symfony.endpoint https://api.github.com/repos/ibexa/recipes-dev/contents/index.json?ref=flex/pull-128

before executing the recipes.

@konradoboza konradoboza changed the title IBX-8324: Removed obsolete JWT editorial bearer from page builder IBX-8324: Reworked JWT editorial bearer in page builder Jul 25, 2024
@konradoboza konradoboza force-pushed the ibx-8324-removed-page-builder-jwt branch from 359ef5f to fb9fded Compare July 25, 2024 11:28
@konradoboza konradoboza marked this pull request as ready for review July 25, 2024 11:28
@konradoboza konradoboza added Bug Something isn't working Ready for review Doc needed The changes require some documentation labels Jul 25, 2024
@konradoboza konradoboza requested a review from a team July 26, 2024 06:47
@konradoboza konradoboza force-pushed the ibx-8324-removed-page-builder-jwt branch from fb9fded to 6c68aff Compare July 26, 2024 08:09
Copy link

sonarcloud bot commented Jul 26, 2024

@konradoboza konradoboza requested review from Steveb-p and a team July 26, 2024 09:44
@konradoboza konradoboza requested a review from a team July 26, 2024 11:02
Copy link
Contributor

@tomaszszopinski tomaszszopinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA approved on IbexaDXP 5.0 commerce p.sh

@konradoboza konradoboza merged commit e9befa5 into master Jul 30, 2024
2 checks passed
@konradoboza konradoboza deleted the ibx-8324-removed-page-builder-jwt branch July 30, 2024 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Doc needed The changes require some documentation Ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants