Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Satellite UI: Fix behavior for 2+ simultaneous file browser sessions on the same project #6854

Closed
mobyvb opened this issue Mar 12, 2024 · 4 comments
Assignees
Labels
Bug Something isn't working Satellite UI

Comments

@mobyvb
Copy link
Member

mobyvb commented Mar 12, 2024

Expected:

  • I can open the file browser on two different browsers/devices, and browse/upload/download on each device with no issues
  • Two users on a shared project can browse/upload/download within the filebrowser of that project with no issues

Actual:

  • Session 1 begins using the file browser to browse/upload/download
  • Session 2 begins using the file browser to browse/upload/download
  • Within a few minutes, Session 1 will get "access denied" errors. Session 1 can refresh to solve the problem, but then Session 2 will experience the same issue.

Why does this happen?
Because we use a single specific name of "Web file browser API key" for the filebrowser access. We cannot access the value in a new session (e.g. after refresh), so when the user needs to view the file browser, we delete and recreate "Web file browser API key". Any other session that was relying on the previous version of that access will become invalidated.

Possible Solution:

  • Create web file browser API keys on some specific pattern, e.g. .storj-web-file-browser-api-key-<uniquedata>, where <uniquedata> can be some random text or a time or something
  • Do not delete existing file browser API keys when a new one is generated. Instead, automatically clean them up outside of the UI
  • Hide these auto-generated accesses (access matching prefix .storj-web-file-browser-api-key) on the accesses page

AC:

  • it is possible for two simultaneous sessions to use the filebrowser on the same project
  • accesses created automatically for filebrowser do not appear in the "access" list
  • accesses created automatically for filebrowser are automatically deleted by console cleanup chore after they expire
@mobyvb mobyvb added Bug Something isn't working Satellite UI Needs Estimation Issue still needs story pointing labels Mar 12, 2024
@NiaStorj NiaStorj removed the Needs Estimation Issue still needs story pointing label Mar 26, 2024
@VitaliiShpital VitaliiShpital self-assigned this Apr 16, 2024
@storj-gerrit
Copy link

storj-gerrit bot commented Apr 16, 2024

Change satellite/console: config values for object browser API keys mentions this issue.

@storj-gerrit
Copy link

storj-gerrit bot commented Apr 16, 2024

Change web/satellite: do not delete old object browser API key mentions this issue.

@storj-gerrit
Copy link

storj-gerrit bot commented Apr 16, 2024

storjBuildBot pushed a commit that referenced this issue Apr 17, 2024
Added 2 new config values to operate with object browser related API keys.
One is for API key name prefix and the second one is for key expiration date.

Issue:
#6854

Change-Id: I33a2b574c3c4fd13ba673a0ec368212c8a23d0f6
storjBuildBot pushed a commit that referenced this issue Apr 18, 2024
Updated logic to avoid deleting old object browser API keys before creating new ones.
Now, object browser API keys are created with names following this pattern: '.storj-web-file-browser-api-key-1713271271100', where the numbers represent the Unix timestamp of the key's creation time.

Issue:
#6854

Change-Id: Iadf84827be73d78f28af1bbee3d02105cc4953a0
@storj-gerrit
Copy link

storj-gerrit bot commented Apr 18, 2024

storjBuildBot pushed a commit that referenced this issue Apr 18, 2024
…ent side

Updated logic so that accesses created automatically for filebrowser do not appear in the "access" list.

Issue:
#6854

Change-Id: Id43ce7005100431eb2cd4e051881c3c5d58c850b
storjBuildBot pushed a commit that referenced this issue Apr 19, 2024
… keys

Extended existing console db cleanup chore to also delete expired object browser API keys.

Issue:
#6854

Change-Id: Icc2b28d43092c884adb124a392695e076ad0b9b3
@mobyvb mobyvb closed this as completed Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Satellite UI
Projects
None yet
Development

No branches or pull requests

4 participants