simplesamlphp / simplesamlphp/simplesamlphp-module-oidc

We always throw if `id_token_hint` is missing when `post_logout_redirect_uri` is used

Offen
#321 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

prepared
Vorherrschende Sprache
PHP
Sterne
50
Forks
28
Ø Merge
1 Min.
Gemergte PRs (30 T.)
2

Beschreibung

The spec RP-Initiated Logout https://openid.net/specs/openid-connect-rpinitiated-1_0.html says:

  1. Redirection to RP After Logout
    In some cases, the RP will request that the End-User's User Agent to be redirected back to the RP after a logout has been performed. Post-logout redirection is only done when the logout is RP-initiated, in which case the redirection target is the post_logout_redirect_uri parameter value sent by the initiating RP. An id_token_hint carring an ID Token for the RP is also RECOMMENDED when requesting post-logout redirection; if it is not supplied with post_logout_redirect_uri, the OP MUST NOT perform post-logout redirection unless the OP has other means of confirming the legitimacy of the post-logout redirection target. The OP also MUST NOT perform post-logout redirection if the post_logout_redirect_uri value supplied does not exactly match one of the previously registered post_logout_redirect_uris values. The post-logout redirection is performed after the OP has finished notifying the RPs that logged in with the OP for that End-User that they are to log out the End-User.

Currently we always throw, that is, stop the execution when id_token_hint is missing when post_logout_redirect_uri is used: https://github.com/simplesamlphp/simplesamlphp-module-oidc/blob/4c254afa8a80eb869351bc6dc161479f1f4d54a2/src/Server/RequestRules/Rules/PostLogoutRedirectUriRule.php#L59

Reading the spec, since id_token_hint is RECOMMENDED, we should not stop the execution, but simply not redirect to the post_logout_redirect_uri. We could show our own "you are logged out" page instead.

  • TODO mivanci check how conformance tests handle this situation

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit src/Server/RequestRules/Rules/PostLogoutRedirectUriRule.php bei der verlinkten Regel und lies den Abschnitt der RP-Initiated Logout-Spezifikation zur Weiterleitung nach dem Logout. Prüfe, wie die Conformance-Tests mit einem fehlenden id_token_hint umgehen, wie im TODO vermerkt. Als erledigt gilt, dass die Anfrage nicht allein wegen des fehlenden Hinweises gestoppt wird und die Weiterleitung nach dem Logout zurückgehalten wird, sofern die Spezifikation sie nicht erlaubt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
php
Bereich
authentication
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
55/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.