WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@alexander-schranz
Copy link
Member

@alexander-schranz alexander-schranz commented Sep 2, 2024

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Fixed tickets fixes #issuenum
Related issues/PRs #issuenum
License MIT
Documentation PR sulu/sulu-docs#prnum

What's in this PR?

Use a shared session cookie between admin and website.

Why?

Depending on which cookies already exists and login into admin after website and other way around you might get logout of the other session. Because session get invalidated by a login.

After some different options and tries with our Partner iCapps (@matthiasseghers) I find sharing the session on the same path and optional document the invalidate_session config is the way to go.

Historically we did put the cookie_path differently to avoid the same issue but it did not work in all cases. Also previously we had 2 different security.yaml and so website yaml didn't know about admin yaml security config and that did force us also different ways. With the way to a single security yaml I also think there speaks nothing against a single session now.

I would also prepare a 3.0 merge request to not longer prepend the cookie_path in 3.0 in: https://github.com/sulu/sulu/blob/9ee10853304f2dc39e84a3a91da8e3e193d74391/src/Sulu/Bundle/SecurityBundle/DependencyInjection/SuluSecurityExtension.php#L182

@alexander-schranz alexander-schranz force-pushed the feature/shared-session-cookie branch from 51f64dd to 2707dcd Compare September 2, 2024 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants