-
Notifications
You must be signed in to change notification settings - Fork 159
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
[BUG] OpenID Token not refreshed #1522
Comments
[Triage] Hi @TobiasMuellerES, please review this topic discussed on the OpenSearch forum. |
Hi @scrawfor99 thanks for you tipps. i had already reviewd the topic in the forum before i had open the bug. The access token lifetime in keycloak is already 6 minutes and i've added the |
Same problem here. What is your host/environment?
opensearch_dashboards.yml:
|
@mueller-tobias @wandersonlima Have either of you been able to find a solution for this issue? I too have added in the "refresh_tokens: true" line in opensearch-dashboards.yml and that does not fix the issue of an expireed OpenID access token with Keycloak 21.1.1. I have now witnessed this issue in Opensearch versions 2.7.0, 2.8.0, and 2.9.0. If you are still experiencing this issue, I feel this defect needs to be re-opened and addressed. I have also opened this in the Opensearch Community with the same response of the refresh_tokens solution - https://forum.opensearch.org/t/receiving-error-after-access-token-expires/15412 |
@jpelletier412 The issue still persists. Our workaround was to increase the access token lifetime in keycloak for this specific openid client. We're currently evaluating if we we invest more time in opensearch or switch to another solution like grafana loki or back to an ELK stack. |
I replicated the issue locally and received the following error Edit: FYI there is a related issue with OpenID where on re-login it does not resume where the user last was. This is being addressed in this PR: #1563 |
@mueller-tobias Yeah we have had to implement the same workaround for the time being. Thanks for your response. Thank you @cwperks for doing the investigation on the regression here and opening this issue back up. |
Hi there! Thanks for the feedback regarding the "alternative solution" described in #1569 We're working on a PR and should be able to submit it today. Then we probably need to follow up with integration tests. For this, I might need some assistance on how to configure the CI so that we can set up a short token expiration in a way that doesn't introduce unnecessary waiting for the token to expire. |
@jochen-kressin FYI @sebastianmichalski had worked on adding OIDC tests in a different repo here that setup keycloak as part of the tests. That PR is blocked in that repo since its on Cypress9 and full support for cross-origin testing was not added until Cypress12. The repo is being updated to Cypress12, but before the upgrade can happen all dashboards plugins need to ensure their tests run with Cypress12. @RyanL1997 is working on adding the cypress tests into this repo directly so that it can be updated independently of other dashboards plugins. Maybe we can use the setup introduced by @sebastianmichalski? |
[Triage] This issue is currently being worked on by @jochen-kressin after discovering a regression in the cookie splitting logic. Going to mark as triaged since this has a clear path forward from Jochen. |
Hi again @cwperks, so I've done some testing - @sebastianmichalski's script covers pretty much everything in terms of setting up Keycloak 👍 Regarding moving the integration tests to this repository - I'm not really sure where to put them. After looking around in @RyanL1997 repositories, it looks like you will add |
@jochen-kressin It may be worthwhile to look at They are one repo that I know of that has functional tests in their repo so that they don't have to wait for the function test repo to upgrade cypress. |
@cwperks Sorry for the late reply on this. So I compared the approach from dashboards-observability with a couple of other workflows I was able to find, including @RyanL1997's #1579 At the end of the day, in order to avoid duplicate work I think it makes sense that I pause the "GitHub-Workflow" side of the integration tests, and instead wait for Ryan's PR to be merged. Just ping me if you have any objections, otherwise I'll monitor the PR mentioned above and then submit the tests when it is done (or as a draft earlier perhaps). |
@jochen-kressin Sounds good to me. Thank you for working with @RyanL1997 on the setup of Cypress12/13 in this repo. I'd be in favor of merging the fix for OIDC refresh tokens for 2.11 and add functional tests with Cypress12 soon thereafter. @DarshitChanpura @peternied @scrawfor99 @RyanL1997 What do you think about merging #1580 after CI has been fixed reacting to the default admin pw change and following that PR with one afterwards with functional tests for the change when #1579 is complete? |
What is the bug?
We've rolled out a OpenSearch Cluster with the OpenSearch Operator. We connected the dashboard and cluster via openid to a keycloak idp and used it for our login.
The Problem is after a few minutes the user is logged out and has to login again. Not in keycloak, just in opensearch.
In the opensearch pods i see the error that the token is expired. It seems like the Token isn't refreshed through the security plugin. According to the Issue #232 the token refresh is trigged through the dashboard e.g. the security plugin.
I don't see any token refresh request on the keycloak logs. It seems that no one is refreshing the token.
How can one reproduce the bug?
Here's our configuration to reproduce the bug:
config.yaml
opensearch_dashboards.yml
What is the expected behavior?
A User can login and the session will last 24h
What is your host/environment?
The text was updated successfully, but these errors were encountered: