Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: revoke personal access token #2422

Merged
merged 63 commits into from
Jun 10, 2022
Merged

Conversation

achmelo
Copy link
Member

@achmelo achmelo commented Jun 8, 2022

Description

Added personal access token revokation. The revoked token is stored in the Caching Service (Infinispan).
Linked to #2306

Type of change

Please delete options that are not relevant.

  • (fix) Bug fix (non-breaking change which fixes an issue)
  • (feat) New feature (non-breaking change which adds functionality)
  • (docs) Change in a documentation
  • (refactor) Refactor the code
  • (chore) Chore, repository cleanup, updates the dependencies.
  • (BREAKING CHANGE or !) Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas. In JS I did provide JSDoc
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The java tests in the area I was working on leverage @nested annotations
  • Any dependent changes have been merged and published in downstream modules

For more details about how should the code look like read the Contributing guideline

achmelo and others added 30 commits June 1, 2022 11:09
Signed-off-by: achmelo <[email protected]>
Signed-off-by: achmelo <[email protected]>
Signed-off-by: at670475 <[email protected]>
Signed-off-by: at670475 <[email protected]>
Signed-off-by: at670475 <[email protected]>
Signed-off-by: at670475 <[email protected]>
Signed-off-by: achmelo <[email protected]>
Signed-off-by: at670475 <[email protected]>
Signed-off-by: at670475 <[email protected]>
…into rip/GH2306/revoke_access_token

# Conflicts:
#	caching-service/src/main/java/org/zowe/apiml/caching/service/infinispan/storage/InfinispanStorage.java
Signed-off-by: achmelo <[email protected]>
Signed-off-by: achmelo <[email protected]>
Signed-off-by: achmelo <[email protected]>
Signed-off-by: achmelo <[email protected]>
Signed-off-by: at670475 <[email protected]>
Signed-off-by: achmelo <[email protected]>
@zowe-robot zowe-robot added the Sensitive Sensitive change that requires peer review label Jun 8, 2022
}
}

public Map<String,String> readInvalidatedTokens(String key) throws CachingServiceClientException {
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the usage of key parameter? I see that it is used only in exceptions... Also the usage of this method shows that actual token is provided as key parameter. Is it intended?

Copy link
Contributor

@weinfurt weinfurt left a comment

Choose a reason for hiding this comment

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

Minor comments, but overall it looks good.

taban03 and others added 4 commits June 10, 2022 12:26
@sonarcloud
Copy link

sonarcloud bot commented Jun 10, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

83.2% 83.2% Coverage
0.0% 0.0% Duplication

@taban03 taban03 merged commit c7f79d5 into v2.x.x Jun 10, 2022
@delete-merged-branch delete-merged-branch bot deleted the rip/GH2306/revoke_access_token branch June 10, 2022 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sensitive Sensitive change that requires peer review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants