-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: revoke personal access token (#2422)
* controller and apiml PAT provider Signed-off-by: achmelo <[email protected]> * cachingservice client to support token operations Signed-off-by: achmelo <[email protected]> * list invalidated tokens Signed-off-by: achmelo <[email protected]> * new cache storage operation test Signed-off-by: achmelo <[email protected]> * remove unused import Signed-off-by: achmelo <[email protected]> * validate token against stored list Signed-off-by: achmelo <[email protected]> * remove unused import Signed-off-by: achmelo <[email protected]> * deserialize response body Signed-off-by: achmelo <[email protected]> * Include utils folder for coverage Signed-off-by: at670475 <[email protected]> * Add method to retrieve invalidated tokens Signed-off-by: at670475 <[email protected]> * Add unit tests Signed-off-by: at670475 <[email protected]> * Change endpoint path Signed-off-by: at670475 <[email protected]> * Fix null pointer exc. and add conflict exception Signed-off-by: at670475 <[email protected]> * fix path in the it Signed-off-by: at670475 <[email protected]> * add unit test Signed-off-by: at670475 <[email protected]> * object mapper config Signed-off-by: achmelo <[email protected]> * Address review comments Signed-off-by: at670475 <[email protected]> * Unit test Signed-off-by: at670475 <[email protected]> * argon2 hash, validate tokens Signed-off-by: achmelo <[email protected]> * revoke token through GW test Signed-off-by: achmelo <[email protected]> * add licence info Signed-off-by: achmelo <[email protected]> * remove unused imports Signed-off-by: achmelo <[email protected]> * fix styles Signed-off-by: achmelo <[email protected]> * exclude infinispan storage tests from base Signed-off-by: achmelo <[email protected]> * cs list path Signed-off-by: achmelo <[email protected]> * Use synchronized and add it Signed-off-by: at670475 <[email protected]> * Add it Signed-off-by: at670475 <[email protected]> * check for array size Signed-off-by: achmelo <[email protected]> * use different key for CSstorage test Signed-off-by: achmelo <[email protected]> * replace transaction with lock Signed-off-by: achmelo <[email protected]> * exclude infinispan tests from CITests Signed-off-by: achmelo <[email protected]> * chore Signed-off-by: achmelo <[email protected]> * Rename functions + clean up of exception + fix sonarlint Signed-off-by: at670475 <[email protected]> * Refactoring it Signed-off-by: at670475 <[email protected]> * add test for untrusted cert Signed-off-by: at670475 <[email protected]> * remove unnecessary header Signed-off-by: at670475 <[email protected]> * fix iT Signed-off-by: at670475 <[email protected]> * remove redundant threads Signed-off-by: achmelo <[email protected]> * verify that invalid token can't be revoked Signed-off-by: achmelo <[email protected]> * do not include userId, unit tests Signed-off-by: achmelo <[email protected]> * replace list with map Signed-off-by: achmelo <[email protected]> * Add uncompatible storage method ex. handling Signed-off-by: at670475 <[email protected]> * store salt for hash Signed-off-by: achmelo <[email protected]> * Fix unit tests and integration tests Signed-off-by: at670475 <[email protected]> * Remove configuration for the transaction manager as not used Signed-off-by: at670475 <[email protected]> * chore Signed-off-by: achmelo <[email protected]> * Revert "Remove configuration for the transaction manager as not used" This reverts commit 4c8eb80. * replace lambda Signed-off-by: achmelo <[email protected]> * Fix unit tests Signed-off-by: at670475 <[email protected]> * Add unit test and fix code smells Signed-off-by: at670475 <[email protected]> * fix code smells Signed-off-by: at670475 <[email protected]> * fix message action Signed-off-by: at670475 <[email protected]> * remove unused argument Signed-off-by: achmelo <[email protected]> * increase coverage Signed-off-by: at670475 <[email protected]> Co-authored-by: Andrea Tabone <[email protected]> Co-authored-by: Andrea Tabone <[email protected]>
- Loading branch information
1 parent
b083dd3
commit c7f79d5
Showing
32 changed files
with
1,240 additions
and
312 deletions.
There are no files selected for viewing
This file contains 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
16 changes: 16 additions & 0 deletions
16
...curity-common/src/main/java/org/zowe/apiml/security/common/token/AccessTokenProvider.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* This program and the accompanying materials are made available under the terms of the | ||
* Eclipse Public License v2.0 which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v20.html | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Copyright Contributors to the Zowe Project. | ||
*/ | ||
package org.zowe.apiml.security.common.token; | ||
|
||
public interface AccessTokenProvider { | ||
|
||
void invalidateToken(String token) throws Exception; | ||
boolean isInvalidated(String token) throws Exception; | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.