-
Notifications
You must be signed in to change notification settings - Fork 467
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
Unable to revoke tokens in dotCMS: API call returning 415 error #30142
Labels
Comments
valentinogiardino
added a commit
that referenced
this issue
Oct 2, 2024
valentinogiardino
moved this from Current Sprint Backlog
to In Progress
in dotCMS - Product Planning
Oct 2, 2024
3 tasks
github-merge-queue bot
pushed a commit
that referenced
this issue
Oct 2, 2024
### Proposed Changes * Added the `'Content-Type': 'application/json'` header to the API call for revoking tokens. ### Checklist - [x] Tests - [x] Translations: No changes needed. - [x] Security Implications Contemplated: Fix ensures that API token revocation works as expected, reducing the security risk of lingering active tokens. ### Additional Info This fix resolved the issue where users were receiving a `415 Unsupported Media Type` error when attempting to revoke tokens via the `/api/v1/apitoken/{keyId}/revoke` endpoint due to the absence of the `Content-Type` header in the request. By explicitly setting `'Content-Type': 'application/json'`, the server can now properly handle the request. ### Screenshots https://github.com/user-attachments/assets/94f70c12-b932-4548-af2d-f15f31d10469
github-project-automation
bot
moved this from In Review
to Internal QA
in dotCMS - Product Planning
Oct 2, 2024
3 tasks
github-project-automation
bot
moved this from Internal QA
to Current Sprint Backlog
in dotCMS - Product Planning
Oct 2, 2024
nollymar
moved this from Current Sprint Backlog
to Internal QA
in dotCMS - Product Planning
Oct 2, 2024
Seems even after the 415 is solved for revocation, the same problem persists for deleting the inactive tokens. Video etc in issue #30268 |
3 tasks
Fixed, tested on the last trunk // Docker // FF and now we are able to revoke tokens without problems
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Problem Statement
Users are unable to revoke tokens in dotCMS via the API, as the API call to revoke tokens is returning a 415 Unsupported Media Type error. This issue prevents administrators and security teams from effectively managing user sessions and access, leaving tokens potentially active when they should be revoked. This impacts all users and environments where token-based authentication is in use and poses a security risk if tokens cannot be properly revoked.
Log: https://gist.github.com/bryanboza/d820bf57144834122ee9305181999ed9
Steps to Reproduce
Acceptance Criteria
dotCMS Version
Tested on the latest trunk // Docker // FF
Proposed Objective
Quality Assurance
Proposed Priority
Priority 2 - Important
The text was updated successfully, but these errors were encountered: