-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
OAuth2 session is not revalidated #4585
Comments
NotesOAuth2 works with tokens for authentication and Spring Security is fully supporting this. Tokens have a lifetime until they are valid, this is the General security recommendation is to use short-lived access tokens combined with long-lived refresh tokens. With refresh tokens applications can renew access tokens but they can be revoked and the refresh mechanism won't work when the user is not logged in anymore in SSO. Articles:
OIDC Back Channel LogoutDetailsOpenID Connect Session Management 1.0 allows the ability to log out the end user at the Client by having the Provider make an API call to the Client. This is referred to as Outcome:
Spring Security & Okta Configurations
Resources:
Outcome:
|
Dev2QAMake sure no expired access token is used in the application. Our filter logs the expiration, you can activate debug log in logging:
level:
org.camunda.bpm.spring.boot.starter.security.oauth2: DEBUG Notes:
|
Verified on |
related to camunda/camunda-bpm-platform#4585 Backported commit f8142ef3e1 from the camunda-bpm-platform repository. Original author: Daniel Kelemen <[email protected]>
related to camunda/camunda-bpm-platform#4585 Backported commit f8142ef3e1 from the camunda-bpm-platform repository. Original author: Daniel Kelemen <[email protected]>
related to camunda/camunda-bpm-platform#4585 Backported commit f8142ef3e1 from the camunda-bpm-platform repository. Original author: Daniel Kelemen <[email protected]>
related to camunda/camunda-bpm-platform#4585 Backported commit f8142ef3e1 from the camunda-bpm-platform repository. Original author: Daniel Kelemen <[email protected]>
Environment (Required on creation)
Camunda Run with OAuth2.
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket)
When logging out from Cognito:
https://camunda-run.auth.us-east-1.amazoncognito.com/logout?response_type=code&client_id=$CLIENT_ID&scope=openid&redirect_uri=http://localhost:8080/
Replace
$CLIENT_ID
with what you can find inspring.security.oauth2.client.registration
.... the user is still logged in to the web apps.
Steps to reproduce (Required on creation)
Observed Behavior (Required on creation)
User is still logged in.
Expected behavior (Required on creation)
User should be logged out.
Root Cause (Required on prioritization)
Not clear. I guess the authentication is cached forever. Maybe we need to implement something like #3146 here as well.
Solution Ideas
Hints
It only works when logging out from Cognito first and using the OAuth2 Spring Security Logout URL second:
http://localhost:8080/logout
Like this, the session cookie is cleared.
However, this is not acceptable because it requires another User action. When the identity provider forces a logout or removes the user, Camunda should check regularly if the user is still valid.
Links
Breakdown
Pull Requests
Dev2QA handover
The text was updated successfully, but these errors were encountered: