Repository navigation
dspace-customers 1083 finding 21: load the process output log without a token in the URL - #1734
Open
milanmajchrak wants to merge 2 commits into
Open
milanmajchrak wants to merge 2 commits into
milanmajchrak wants to merge 2 commits into
Conversation
The log is fetched with HttpClient, which already sends the Authorization header, so the short-lived token query parameter is not needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The review identifies no active issues with the process-log authentication change.
No open issues 🎉
What changed in this PR
Updates process-log retrieval in the DSpace frontend to use header-based authentication without adding a short-lived token to the URL.
Changes:
- Requests log content directly from the bitstream content link, removing short-lived token generation and the unused
URLCombinerimport. - Adds a regression test asserting that the log request uses the unchanged content URL.
- Leaves browser-based “Output Files” download links unchanged.
| File | Description |
|---|---|
src/app/process-page/detail/process-detail.component.ts |
Removes URL-token handling from process-log retrieval and updates the property comment. |
src/app/process-page/detail/process-detail.component.spec.ts |
Adds a regression test for the log request URL. |
Review effort: Balanced
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References
dspace-customers issue 1083, finding 21 (the process output log).
Description
"Retrieve process output" on the process detail page loads the log with
HttpClient, which already sends theAuthorizationheader. The log URL no longer gets a short-lived?authentication-token=.Instructions for Reviewers
List of changes in this PR:
process-detail.component.ts: the log is requested from the bitstreamcontentlink as it is. ThegetShortlivedToken()call and theURLCombinerimport are removed.process-detail.component.spec.ts: a new spec checks the log request URL. It fails on the old code (log-selflink?authentication-token=token).File downloads under "Output Files" are not changed. They still use
FileService.retrieveFileDownloadLink.How to test:
Result: 15 of 15 specs pass. Before the change the new spec fails.
Manual: run any script (for example "Add bitstream from URL" on a workspace item), open the process and click "Retrieve process output". The request to
/api/core/bitstreams/<uuid>/contenthas noauthentication-tokenin the URL, sends theAuthorizationheader, returns 200, and the log is shown.Checked in a local Docker stack (dtq-dev BE and this FE) with a browser HAR of the whole flow: the log request has no token in the URL, sends the header and returns 200. The
POST /api/authn/shortlivedtokensbefore it is gone.Codex review (gpt-6.2-sol, high): nothing found.
AI Disclosure (REQUIRED)
Were AI tools used in the creation of this PR?
Claude Code wrote the change and the spec. The spec fails without the change and passes with it. Lint passes on the changed files.
Checklist
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.🤖 Generated with Claude Code