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

Include features currently exclusive to CMS 4 support branch #63

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

NightJar
Copy link
Contributor

The ability to set alternative ACS domains was submitted to the CMS 4 support branch with the intention for it to be merged up. However the mainenance has diverged the branches, so this is a cherry-pick for feature parity instead.

For e.g. subdomains that are served by the same Silverstripe
installation. This could be subsites, translation domains (fluent), etc.

Without the ability to accurately return traffic to the correct site
after authentication, users are presented with a confusing and
frustrating experience. At worst they get locked out of their sites
(with SAMLMiddleware), as although AuthN completes successfully, the
domain that carries the session is (by default) neither correct nor
shared.
As a work-around for a problem where ACS was read as e.g. domain/acs
instead of domain/path/acs, explicitly setting the path (via the base
url) was done. But we need the domain to match the actual loaded domain,
not the service provider entity ID.

It is important since there is already another major version of this
saml module that no changes that would require existing users to make
changes to their code be introduced (requiring a major version). This is
the reason we're now relying on Director::absoluteBaseUrl instead of
letting the SAML library do what it does (in cases where the workaround
is not needed).

When using Director::absoluteBaseUrl instead of letting the SAML library
build it's own interpretation, the use of other Util class options become
redundant - they're not used anyway, so there is no point in having any
further/alternative options. A hook point is introduced to further
manipulate things like that should anyone have the need.
@madmatt
Copy link
Member

madmatt commented Oct 29, 2024

LGTM, and sorry for the divergence @NightJar! As you say in your other issue, it's worth getting fixed up with the retirement of SS4 soon as well, so v2 can become legacy for SSv4, and we move on in the main branch. Merging!

@madmatt madmatt merged commit 297de70 into silverstripe:main Oct 29, 2024
@NightJar
Copy link
Contributor Author

As you say in your other issue

As I've just noticed they weren't linked, the other issue was #61 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants