core icon indicating copy to clipboard operation
core copied to clipboard

Unable to authenticate a servlet request

Open weiyiwang-dotcms opened this issue 1 year ago • 1 comments

Parent Issue

No response

User Story

As a user, I want to be able to download a file from dotCMS through an API with authentication, so I can programmatically retrieve files from dotCMS.

Acceptance Criteria

Allow for requests to the servlet to accept authentication information, so that users can have their resources protected behind authentication, but still access them via an authenticated API request

Proposed Objective

Technical User Experience

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

https://dotcms.slack.com/archives/C01N0AU1NUC/p1725401158867469 https://dotcms.freshdesk.com/a/tickets/27408

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

weiyiwang-dotcms avatar Sep 04 '24 17:09 weiyiwang-dotcms

One additional detail:

the servlet that serves the file only checks the user like this final User user = PortalUtil.getUser(req);

no authentication is performed, but just gets the user from the session.

weiyiwang-dotcms avatar Sep 04 '24 17:09 weiyiwang-dotcms

PRs:

  • https://github.com/dotCMS/core/pull/31149

github-actions[bot] avatar Jan 15 '25 22:01 github-actions[bot]

Passed internal QA

Able to get a binary file through API with auth

Image

gortiz-dotcms avatar Feb 10 '25 21:02 gortiz-dotcms