Exchange JWT for sda-download session cookie #9
Labels
No labels
backend
bug
CI
dependencies
design
documentation
duplicate
enhancement
frontend
github_actions
good first issue
help wanted
invalid
javascript
question
refactoring
security
tooling
UX
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
NBIS/sda-download-ui#9
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Question: It is quite possible that
sda-downloadactually uses an internal sesison cookie that it uses to keep a session alive on its side. In this case, the external behavior is unchanged and the issue below is irrelevant.This needs to be clarified.
As a user,
I want the UI to exchange my JWT for an sda-download session cookie
so that
subsequent API calls are fast and do not require repeated visa checks.
Description
sda-downloadendpoint with Authorization: BearerAC:
sda-downloadsession and receive a cookieAccording to Jonas' response :
Short answer: the cookie is nothing the website needs to store or use. It is an opaque handle to state that lives in the download container's memory (who you are, which datasets, until when), and it is HttpOnly so page JavaScript cannot read it anyway. Just send Authorization: Bearer on every call. v2 also caches on a hash of the token itself, so you get exactly the same cache hit without the cookie ever being involved.
So, the issue is closed.