Link to DID webpage only works if already authenticated due to callbackUrl decoding
Nobody has claimed this yet.
- 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.
The second screenshot show the decoded component and hence invalid URL in the callbackUrl parameter.
Steps to reproduce
- Ensure you are logged out of any Rucio instance web API.
- Follow a link to a DID webpage, such as:
https://xxx.rucioit.cern.ch/did/page/<scope>/<uri-encoded-name>
- Follow the login prompts.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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