Repository navigation
feat(auth): removed token refresh functionality - #3765
Merged
Merged
Conversation
Contributor
|
@Sentiaus Thanks for the PR. @jaeyun0503 Please take a look before other members review it. |
Contributor
|
Thank you for the PR! I think the PR looks good. It is good for other members to review. |
aglinxinyuan
approved these changes
Sep 25, 2025
Contributor
There was a problem hiding this comment.
LGTM! We can remove the token refresh in this PR and decide whether to log the user out or display a message to the user in a separate issue (#3738).
SarahAsad23
pushed a commit
to madisonmlin/texera
that referenced
this pull request
May 20, 2026
## Description --- This PR mitigates the security issue described in apache#3737, by removing the token refresh functionality. ## Problem --- When user's sign in, they receive a new token. This token has a TTL of 2 days (2880 minutes), as defined by `expiration-in-minutes` in `auth.conf`. However, a user's token is refreshed if they make any action that creates a request to the backend, if the token has not already expired. The refresh time is the same as the original TTL, thus, a user could theoretically be signed in indefinitely. From a security perspective this is unsafe. ## Solution --- The token refresh functionality was removed from `auth.service.ts`. Additionally, since the `refreshToken` in `auth.service.ts` called the `/refresh` route from the backend, the route and any classes/functions it used were removed (`AuthResource.scala`, `RefreshTokenRequest.scala`). The TTL of the token was then changed to 7 days (10080 minutes) to improve user experience. ## Side Effects --- As noted in apache#3738, when a user's token is expired, but are not logged out, they are still able to access some data, but are unable to make any changes. Because tokens are no longer refreshed, the user is more likely to encounter this case. Fixes apache#3737
yangzhang75
pushed a commit
to yangzhang75/texera
that referenced
this pull request
Jun 22, 2026
## Description --- This PR mitigates the security issue described in apache#3737, by removing the token refresh functionality. ## Problem --- When user's sign in, they receive a new token. This token has a TTL of 2 days (2880 minutes), as defined by `expiration-in-minutes` in `auth.conf`. However, a user's token is refreshed if they make any action that creates a request to the backend, if the token has not already expired. The refresh time is the same as the original TTL, thus, a user could theoretically be signed in indefinitely. From a security perspective this is unsafe. ## Solution --- The token refresh functionality was removed from `auth.service.ts`. Additionally, since the `refreshToken` in `auth.service.ts` called the `/refresh` route from the backend, the route and any classes/functions it used were removed (`AuthResource.scala`, `RefreshTokenRequest.scala`). The TTL of the token was then changed to 7 days (10080 minutes) to improve user experience. ## Side Effects --- As noted in apache#3738, when a user's token is expired, but are not logged out, they are still able to access some data, but are unable to make any changes. Because tokens are no longer refreshed, the user is more likely to encounter this case. Fixes apache#3737
This was referenced Jul 30, 2026
renovate-bot
pushed a commit
to renovate-bot/apache-_-texera
that referenced
this pull request
Jul 31, 2026
…apache#7137) ### What changes were proposed in this PR? Two GUI config flags were still defined and sent to the frontend but read by nobody. `autoAttributeCorrectionEnabled` lost its consumer when the schema auto-correct service was removed in apache#2578. `expirationTimeInMinutes` lost its only reader when token refresh was removed for security in apache#3765; the frontend now derives session expiry from the JWT itself. This removes both across every layer they touched: `gui.conf`, `GuiConfig` and its spec, the `/gui` config endpoint (dropping the now-unused `AuthConfig` import), and the frontend `GuiConfig` interface and mock. `AuthConfig.jwtExpirationMinutes` stays untouched — `JwtAuth` still uses it to sign real tokens. ### Any related issues, documentation, discussions? Closes apache#7135 ### How was this PR tested? Dead-code removal, grep-verified no remaining references to either flag. Existing config specs (GuiConfigSpec, ConfigResourceSpec) continue to cover the config surface. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 4.8) Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR mitigates the security issue described in #3737, by removing the token refresh functionality.
Problem
When user's sign in, they receive a new token. This token has a TTL of 2 days (2880 minutes), as defined by
expiration-in-minutesinauth.conf. However, a user's token is refreshed if they make any action that creates a request to the backend, if the token has not already expired. The refresh time is the same as the original TTL, thus, a user could theoretically be signed in indefinitely. From a security perspective this is unsafe.Solution
The token refresh functionality was removed from
auth.service.ts. Additionally, since therefreshTokeninauth.service.tscalled the/refreshroute from the backend, the route and any classes/functions it used were removed (AuthResource.scala,RefreshTokenRequest.scala). The TTL of the token was then changed to 7 days (10080 minutes) to improve user experience.Side Effects
As noted in #3738, when a user's token is expired, but are not logged out, they are still able to access some data, but are unable to make any changes.
Because tokens are no longer refreshed, the user is more likely to encounter this case.
Fixes #3737