Add option to regenerate asset token in the storage view
Description
Assets in the storage can be made private by requiring a token for access.
For example:
- Public URL which won't resolve and fail:
/image/mydata.jpg - Private URL (with token) that succeed:
/image/mydata.jpg?token=11223
Currently, once a token is created, there is no way to regenerate it from the Console.
Proposed solution
In the Console Storage view, when viewing the details of an asset:
- Display a small "Regenerate token" (reload icon?) button next to the token.
- Clicking the button opens a confirmation modal.
- If the user confirms, the token is regenerated.
- The new token is then displayed in the details view.
Expected behavior:
- Users can regenerate tokens for private assets directly from the Console.
- A confirmation step prevents accidental regeneration.
- The updated token is immediately usable in the asset URL.
This will give developers better control over access to private assets and improve security hygiene.
Hi @peterpeterparker, can I take this up? Also, if you can suggest some quick wins! 😃
Thanks for the interest @Malay-dev. Following your question, I had a deeper look and noticed that it actually requires some backend work as well, so it turns into quite a heavier job as I had foreseen. I think it’s probably quite an effort, as it would also require several separate PRs across Rust, tests, and frontend code. Therefore, I’ve removed it from the list of tasks for Hacktoberfest.
Oh, I assumed there would be an existing API that I could hit and re-generate the token, then populate it back. No Problem, I'll check on other issues. Or if you have any suggestions, I'll take them up.
Resolved. Will be shipped with next release.