Repository navigation
Conversation
An authentication source that reports failed logins, for example in F-ticks, reads $state['Source']['entityid'] and $state['Destination']['entityid']. casserver set them only after login, for the authproc filters, so a failed CAS login named neither entity. handleAuthenticate() now passes both to Auth\Simple::login(), with the values the filters see after a successful login: Source comes from resolveIdpEntityId(), now shared with runAuthProcs(), and Destination is the requesting service, left out when the request names none. This covers interactive, renewed and passive logins. A session keeps neither key, so login()'s check that a resumed state belongs to the requested service does not bind a session to its first service. The tests pin both the equal values and that. Assisted-by: Claude Code (claude-opus-5-5, implementation & unit tests) Assisted-by: Google Antigravity (gemini-3.8-flash-high, review)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An authentication source that reports failed logins, for example in F-ticks, reads
$state['Source']['entityid']and$state['Destination']['entityid']. casserver set them only after login, for the authproc filters, so a failed CAS login named neither entity. This follows #79, which gave the filters real values.handleAuthenticate()now passes both toAuth\Simple::login(), with the values the filters see after a successful login:Sourcecomes fromAttributeExtractor::resolveIdpEntityId(), now public and shared withrunAuthProcs(), so the decision is made in one place.Destinationis the requesting service, left out when the request names none. A login without a service runs no authproc filters either.This covers interactive, renewed and passive logins. A gateway request without passive mode and an existing session do not reach the authentication source and are unchanged.
Session.
State::getPersistentAuthData()keeps neither key, sologin()'s check that a resumed state belongs to the requested service does not bind a session to its first service.testLoginParamsDoNotBindTheSessionToTheServicepins this.saml:SPbuilds its ownSourceandDestinationafter the IdP's response and does not read these.Note for failure modes.
resolveIdpEntityId()now runs on every login reaching the authentication source, not only whenauthprocis configured, so a non-stringidp_entity_idfails there too.Tests. Run on PHP 8.3 and 8.5 with SimpleSAMLphp v2.5.3.1: 168 tests, 558 assertions; phpcs and phpstan clean.
CI. The PHP 8.3 and 8.4 unit jobs fail on
mastersince #85, unrelated to this change:simplesamlphp-test-frameworkv2.0.1 requiresphp ^8.5, socomposer installcannot resolve there. I ran 8.3 locally with~1.11of the framework.Assisted-by: Claude Code (claude-opus-5-5, implementation & unit tests)
Assisted-by: Google Antigravity (gemini-3.8-flash-high, review)