[
https://issues.apache.org/jira/browse/KNOX-2207?focusedWorklogId=382339&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-382339
]
ASF GitHub Bot logged work on KNOX-2207:
----------------------------------------
Author: ASF GitHub Bot
Created on: 05/Feb/20 15:58
Start Date: 05/Feb/20 15:58
Worklog Time Spent: 10m
Work Description: pzampino commented on pull request #252: KNOX-2207 -
TokenStateService revocation should remove persisted token state
URL: https://github.com/apache/knox/pull/252#discussion_r375341865
##########
File path:
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/DefaultTokenStateService.java
##########
@@ -168,15 +167,15 @@ public boolean isExpired(final JWTToken token) {
@Override
public boolean isExpired(final String token) {
- boolean isExpired;
+ boolean isUnknownToken;
- isExpired = isRevoked(token); // Check if it has been revoked first
- if (!isExpired) {
- // If it has not been revoked, check its expiration
- isExpired = (getTokenExpiration(token) <= System.currentTimeMillis());
+ isUnknownToken = isUnknown(token); // Check if the token exist
Review comment:
Should this be using validateToken() for the unknown check?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 382339)
Time Spent: 2h 10m (was: 2h)
> TokenStateService revocation should remove persisted token state
> ----------------------------------------------------------------
>
> Key: KNOX-2207
> URL: https://issues.apache.org/jira/browse/KNOX-2207
> Project: Apache Knox
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.4.0
> Reporter: Philip Zampino
> Assignee: Sandeep More
> Priority: Major
> Time Spent: 2h 10m
> Remaining Estimate: 0h
>
> When the KnoxToken service is used to revoke/cancel a token, the current
> behavior is to persist the revoked status of the token. The problem is that
> token state is never removed from, in the case of the AliasService-based
> implementation, the keystore. There is no real requirement to differentiate
> between a known-but-revoked token and and unknown token; Therefore, the state
> for a revoked token can be removed altogether.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)