Skip to content

Support RP (Client) initiated logout #5350

Closed

Description

@jzheaux

Summary

end_session_endpoint is part of the OIDC spec:

http://openid.net/specs/openid-connect-session-1_0.html#RPLogout

Additional Info

This is born out of some observations from @thomasdarimont in a OAuth github sample.

Activity

  1. added
    in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
    on May 15, 2018
  2. added this to the 5.1.0.M2 milestone on May 15, 2018
  3. self-assigned this
    on May 16, 2018
  4. jzheaux commented on May 16, 2018

    @jzheaux
    CollaboratorAuthor

    @thomasdarimont, quick question about the way Keycloak supports RP-initiated logout.

    The way I read the spec for RP-logout:

    "In this case, the RP, after having logged the End-User out of the RP, redirects the End-User's User Agent to the OP's logout endpoint URL."

    is that the RP would do a redirect as opposed to a server-side call.

    Is a server-side call the preferred way in Keycloak, or is that just isolated to your sample?

    Also, I'm wondering if you see something different in the spec than I. We want to remain spec compliant in the implementations that Spring Security provides and hopefully make it easy to extend for folks who need to depart from the spec. Do you see a server-side call as within the bounds of the OpenID spec?

    I found the following article to be informative, relative to what kinds of flows are possible within the spec.

  5. thomasdarimont commented on May 17, 2018

    @thomasdarimont
    Contributor

    In my example I do the logout behind the scenes since I want to stay in the application.
    But I could also just send an redirect, which might be more appropriate.

    Keycloak currently supports multiple ways to access the end_session endpoint:

    The current version of Keycloak seems to lack support for the Front Channel logout though.

    I didn't have time to read the full article yet - will do and get back to this later.

  6. jzheaux commented on May 17, 2018

    @jzheaux
    CollaboratorAuthor

    Cool, thanks for the links.

    Reading the Backchannel logout spec, it appears that is a way for RPs to register an endpoint and that the OP initiates the logout. Note that section 3, "RP-intiiated Logout Functionality" just refers back to the session management spec.

  7. changed the title [-]Support end_session_endpoint[/-] [+]Support RP (Client) initiated logout[/+] on Jun 11, 2018
  8. modified the milestones: 5.1.0.M2, 5.1.0.RC1 on Jul 24, 2018
  9. wtatum commented on Dec 19, 2018

    @wtatum

    @jzheaux , any thoughts no whether this will get a new milestone attached? Is it a good candidate for contribution? Supporting RP-initiated logout is in my backlog right now. If it's over the horizon for framework support I'm happy to wait a little bit. If you think it's "stuck", if something I or my team would be working on in the next few months either way.

  10. jzheaux commented on Dec 20, 2018

    @jzheaux
    CollaboratorAuthor

    @wtatum, yes, this task is a good candidate for contribution, thanks for asking.

    Would you be able to put together a PR by March (you mentioned that it may be on your backlog for a few months)? If so, the task is yours! Otherwise, I think there is a good chance I'll be able to tackle it myself before then.

    Essentially, it's a matter of creating a logout success handler that looks up the ClientRegistration associated with that Authentication and redirects according to the spec.

  11. 3 remaining items

  12. wtatum commented on Jan 30, 2019

    @wtatum
  13. added this to the 5.2.0.M2 milestone on Mar 4, 2019
  14. added a commit that references this issue on Mar 19, 2019
  15. vekdeq commented on Aug 20, 2019

    @vekdeq

    Hi Team,

    I have been looking for this for some days now. We have spring boot based application(s) using Okta as IDP, using okta spring boot starter - which inject Spring Security 5.1.5. With some efforts, I was able to configure gradle script where in my WAR file now have Spring Security 5.2.0.M4 jars. I am still unable to clear / kill Okta Session - after hitting default logout url. It is configured as link (app/logout) on app's UI - so no XHR - just link. Am I missing anything ?

    Vivek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: enhancementA general enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions