Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Sign out functionality #78

Open
valiafetisov opened this issue May 23, 2022 · 6 comments
Open

Sign out functionality #78

valiafetisov opened this issue May 23, 2022 · 6 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@valiafetisov
Copy link

Am I understanding correctly, that there is no sign out functionality implemented, since signedOutCallbackPath is marked as Reserved for future use - Not currently used?

  • If it's actually implemented, but not documented, can you please explain how it works?
  • Otherwise, what is the workaround?

Currently, my understanding is that we need to construct sign out url ourselves, like so:

const signOutCallback = `${baseUrl}/easyauth/signout-callback-oidc`
const signOutUrl = `https://login.microsoftonline.com/${tenantId}/oauth2/v2.0/logout?post_logout_redirect_uri=${encodeURIComponent(signOutCallback)}`

And then /easyauth/signout-callback-oidc endpoint suppose to remove AzAD.EasyAuthForK8s http-only cookie. And since it's not happening the workaround will be to have our own endpoint which will do that for us (which is still not optimal, since the session is not invalidated)

@jonlester
Copy link
Member

You are correct that the sign out is not currently implemented. We wanted to provide some options around the behavior (federated vs cookie only, how this would work with bearer tokens, etc.), but didn't have time in the last iteration. If you can provide some details around how you would want it to behave in your use case, we can take it under consideration.

@jonlester jonlester added the enhancement New feature or request label May 24, 2022
@valiafetisov
Copy link
Author

Thanks for the answer! I assume that there should be a way to invalidate tokens/cookies and remove cached information about the user. An endpoint triggering cookie invalidation+removal for the user themselves will be enough for us at this point.

I also assume it to be core functionality, since currently it's not possible to use EasyAuthForK8s-based auth on a public equipment and in general sounds scary to have no way to invalidate sessions in case of leaks / phishing / user deletion / etc.

Or is there any other implemented way to clear internal user cache?

@valiafetisov
Copy link
Author

Any updates here @jonlester?

@jonlester
Copy link
Member

No update to share yet.

@jonlester
Copy link
Member

Implementation should include federated sign out - redirect back to azure AD to log out of the application as well as deleting the cookie.

@jonlester jonlester added this to the v1.1 milestone Jan 5, 2023
@bhakhep
Copy link

bhakhep commented Jun 14, 2023

Is there an update on this? The #91 PR has been open for some time now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants