[
https://issues.apache.org/jira/browse/KNOX-2789?focusedWorklogId=802818&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-802818
]
ASF GitHub Bot logged work on KNOX-2789:
----------------------------------------
Author: ASF GitHub Bot
Created on: 23/Aug/22 11:54
Start Date: 23/Aug/22 11:54
Worklog Time Spent: 10m
Work Description: MrtnBalazs commented on code in PR #622:
URL: https://github.com/apache/knox/pull/622#discussion_r952513040
##########
gateway-server/src/test/java/org/apache/knox/gateway/session/control/InMemoryConcurrentSessionVerifierTest.java:
##########
@@ -316,25 +296,27 @@ public void testBackgroundThreadRemoveExpiredTokens()
throws ServiceLifecycleExc
verifier.verifySessionForUser("admin", adminToken2);
JWT expiringAdminToken =
tokenAuthority.issueToken(expiringJwtAttributesForAdmin);
verifier.verifySessionForUser("admin", expiringAdminToken);
- Assert.assertEquals(3, verifier.countValidTokensForUser("admin"));
- Thread.sleep(1100);
- Assert.assertEquals(2, verifier.countValidTokensForUser("admin"));
+ Assert.assertEquals(3, verifier.getTokenCountForUser("admin").intValue());
+ Thread.sleep(1050);
Review Comment:
It is for waiting until the token expires, but i realised i could just issue
already expired tokens and skip the waiting. That would probably check the same
functionality. I will change it that way and remove the sleep (at the other
places as well)
Issue Time Tracking
-------------------
Worklog Id: (was: 802818)
Time Spent: 0.5h (was: 20m)
> Refine privileged/non-privileged group settings
> -----------------------------------------------
>
> Key: KNOX-2789
> URL: https://issues.apache.org/jira/browse/KNOX-2789
> Project: Apache Knox
> Issue Type: Sub-task
> Components: Server
> Affects Versions: 2.0.0
> Reporter: Sandor Molnar
> Assignee: Balazs Marton
> Priority: Major
> Fix For: 2.0.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Existing group settings should be refined as follows:
> * instead of having the privileged and non-privileged groups their own
> configuration, we should only have one config for the privileged users.
> Additionally, the existing configuration name should be changed to
> {{gateway.session.verification.privileged.users}}
> * Currently, if a user is not listed in any of these groups, are allowed to
> have unlimited sessions. This should be changed: a new config should be
> introduced called {{gateway.session.verification.unlimited.users}}
> * each user that is not listed in any of those groups is considered
> non-privileged and the previously introduced limit should be applied to it
> Additionally, the following configuration names should be updated:
> * {{gateway.non.privileged.users.concurrent.session.limit}} ->
> {{gateway.session.verification.non.privileged.user.limit}}
> * {{gateway.privileged.users.concurrent.session.limit}} ->
> {{gateway.session.verification.privileged.user.limit}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)