forgejo/release-notes/8.0.0/feat
Victoria Nadasdi df0d1a2134 feat: parse prefix from redis URI for queues (#3836)
For security reasons, scoping access to a redis server via ACL rules is
a good practice. Some parts of the codebase handles prefix like cache[^1]
and session[^2], but the queue module doesn't.

This patch adds this missing functionality to the queue module.

Note about relevant test:
I tried to keep the PR as small as possible (and reasonable), and not
change how the test runs. Updated the existing test to use the same
redis address and basically duplicated the test with the extra flag. It
does NOT test if the keys are correct, it ensures only it works as
expected. To make assertions about the keys, the whole test has to be
updated as the general wrapper doesn't allow the main test to check
anything provider (redis) specific property. That's not something I
wanted to take on now.

[^1]: e4c3c039be/modules/cache/cache_redis.go (L139-L150)
[^2]: e4c3c039be/modules/session/redis.go (L122-L129)

Signed-off-by: Victoria Nadasdi <victoria@efertone.me>

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3836
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Victoria Nadasdi <victoria@efertone.me>
Co-committed-by: Victoria Nadasdi <victoria@efertone.me>
2024-05-20 14:10:54 +00:00
..
3307.md feat: implement PKCE when acting as oauth2 client (for user login) 2024-04-29 11:20:26 +02:00
3434.md UI: use full screen height for displaying pdf files 2024-04-26 20:42:45 +02:00
3615.md Add an immutable tarball link to archive download headers for Nix 2024-05-03 15:21:45 -07:00
3642.md [UI] Allow org members to navigate between the org and the dashboard 2024-05-05 23:14:57 +05:00
3654.md [FEAT] support searching non default branches/tags when using git-grep (#3654) 2024-05-14 15:41:03 +00:00
3723.md chore(release-notes): go-enry v2.8.8 2024-05-13 17:32:28 +02:00
3729.md chore(release-notes): [gitea] week 2024-20 cherry pick 2024-05-12 20:20:18 +02:00
3836.md feat: parse prefix from redis URI for queues (#3836) 2024-05-20 14:10:54 +00:00