rucio / rucio/webui

Link to DID webpage only works if already authenticated due to callbackUrl decoding

Open
#794 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
5
Forks
36
Avg merge
6d 17h
Merged PRs (30d)
7

Description

Description

Following links directly to a DID (if someone copied the link from their browser to share) only works if the browser is already authenticated against Rucio. If the user clicking the link is not already authenticated, the DID name path component (which is URI-encoded) is decoded somehow during the 307 redirects and hence the resulting callbackUrl passed to the login page is invalid. This causes the link to show a 404 after the login flow is completed.

Following images show the path component being directly encoded before hitting the 307 redirects from Rucio to perform login. The first screenshot shows the link in the request before the first redirect to the /api/auth-endpoint.

Image

The second screenshot show the decoded component and hence invalid URL in the callbackUrl parameter.

Image
Steps to reproduce
  1. Ensure you are logged out of any Rucio instance web API.
  2. Follow a link to a DID webpage, such as:

https://xxx.rucioit.cern.ch/did/page/<scope>/<uri-encoded-name>

  1. Follow the login prompts.
  2. Get the 404 error due to invalid callbackUrl
Rucio Version

Client: WebUI, Server: 39.4.0

Additional Information

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the logged-out DID link flow and tracing the 307 redirects to the /api/auth endpoint, focusing on how the URI-encoded DID name enters callbackUrl. Confirm the fix by completing login from a copied DID link without receiving a 404, while preserving the encoded path.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.