Skip to content

Conversation

@Panaetius
Copy link
Member

@Panaetius Panaetius commented Apr 22, 2025

closes #765
/deploy #notest

@Panaetius Panaetius temporarily deployed to renku-ci-gw-766 April 22, 2025 09:06 — with GitHub Actions Inactive
@RenkuBot
Copy link
Contributor

You can access the deployment of this PR at https://renku-ci-gw-766.dev.renku.ch

@Panaetius Panaetius temporarily deployed to renku-ci-gw-766 April 23, 2025 07:19 — with GitHub Actions Inactive
@Panaetius Panaetius temporarily deployed to renku-ci-gw-766 April 23, 2025 07:30 — with GitHub Actions Inactive
@Panaetius Panaetius temporarily deployed to renku-ci-gw-766 April 23, 2025 07:41 — with GitHub Actions Inactive
@Panaetius Panaetius temporarily deployed to renku-ci-gw-766 April 23, 2025 08:08 — with GitHub Actions Inactive
@Panaetius Panaetius temporarily deployed to renku-ci-gw-766 April 23, 2025 08:45 — with GitHub Actions Inactive
@Panaetius Panaetius temporarily deployed to renku-ci-gw-766 April 23, 2025 09:01 — with GitHub Actions Inactive
@Panaetius Panaetius temporarily deployed to renku-ci-gw-766 April 23, 2025 09:11 — with GitHub Actions Inactive
@Panaetius Panaetius temporarily deployed to renku-ci-gw-766 April 23, 2025 09:19 — with GitHub Actions Inactive
@Panaetius Panaetius temporarily deployed to renku-ci-gw-766 April 23, 2025 09:41 — with GitHub Actions Inactive
@Panaetius Panaetius temporarily deployed to renku-ci-gw-766 April 23, 2025 09:48 — with GitHub Actions Inactive
@Panaetius Panaetius marked this pull request as ready for review April 23, 2025 09:53
@Panaetius Panaetius requested a review from a team as a code owner April 23, 2025 09:53
@Panaetius Panaetius temporarily deployed to renku-ci-gw-766 April 23, 2025 09:53 — with GitHub Actions Inactive
func (*SessionStore) getTokenStorageExpiration(tokens models.AuthTokenSet, session models.Session) time.Time {
providerID := tokens.AccessToken.ProviderID
if providerID == "renku" || providerID == "gitlab" {
return time.Time{}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change will break renku v1 if I understand it correctly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forever tokens are needed for some v1 functionality.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is purely for redis expiration/ttl, not the live time of the token itself or anything like that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By doing this change, a TTL will be set on Keycloak and GitLab tokens, which some parts of renku v1 expect to be available forever (even if the user does no log in after session expiry). Feel free to run this as an experiment, but this is the reason redis is remembering tokens forever; I did not want to break renku v1 with the gateway refactor.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I am just adding this here after our discussion. The main issue is that SSH sessions would be affected if we started to evict tokens. Because for these users do not need to be logged in once they have started.

@olevski
Copy link
Member

olevski commented May 19, 2025

Lets postpone this until we fully retire v1 sessions and all the v1 services.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Finalize TTLs on sessions and tokens stored in redis

5 participants