Skip to content

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
dtq-devfrom
fix/process-log-header-auth
Open

milanmajchrak wants to merge 2 commits into
dtq-devfrom
fix/process-log-header-auth

Conversation

@milanmajchrak

@milanmajchrak milanmajchrak commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

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 the Authorization header. 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 bitstream content link as it is. The getShortlivedToken() call and the URLCombiner import 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:

yarn run test:headless --include=src/app/process-page/detail/process-detail.component.spec.ts

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>/content has no authentication-token in the URL, sends the Authorization header, 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/shortlivedtokens before 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?

  • No (This PR does NOT include AI-generated or AI-assisted content that requires disclosure.)
  • Yes (This PR includes AI-generated or AI-assisted content that requires disclosure.)

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

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR follows all coding best practices based on the Code Conventions Guide
  • My PR passes ESLint validation using npm run lint
  • My PR doesn't introduce circular dependencies (verified via npm run check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • My PR aligns with Accessibility guidelines if it makes changes to the user interface.
  • My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

🤖 Generated with Claude Code

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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 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 URLCombiner import.
  • 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

@milanmajchrak milanmajchrak changed the title Fix dspace-customers 1083 finding 21: load the process output log without a token in the URL dspace-customers 1083 finding 21: load the process output log without a token in the URL Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants