Add signed URL generation for task PDF access#233
Draft
Conversation
- Add config for signed URL TTL and secret key - Implement HMAC-based signed URL generator with expiration - Update FileStorageService to generate signed URLs - Modify TaskService to return signed URLs instead of direct URLs - Add comprehensive unit tests for signed URL functionality - Update initialization to pass new config parameters Co-authored-by: TheRealSeber <111927572+TheRealSeber@users.noreply.github.com>
Co-authored-by: TheRealSeber <111927572+TheRealSeber@users.noreply.github.com>
- Remove GetSecretKey() method to prevent security risk - Add GenerateSignedURLWithTTL method to avoid creating new generators - Refactor GetSignedFileURL to use existing generator with custom TTL - Improve performance by reusing generator instance Co-authored-by: TheRealSeber <111927572+TheRealSeber@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add short-lived signed URLs for task PDF access
Add signed URL generation for task PDF access
Jan 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task PDFs are stored in file storage without authentication. Clients need temporary access without direct storage credentials or proxying through the backend.
Implementation
Signed URL utility (
package/utils/signed_url.go)expiresandsignaturequery parametersGenerateSignedURLWithTTL()accepts custom TTL, reuses generator instanceConfiguration (
internal/config/config.go)SIGNED_URL_TTL_SECONDS: Default 300s (5 minutes)SIGNED_URL_SECRET_KEY: Falls back to JWT secretFileStorageService (
package/filestorage/service.go)TaskService (
package/service/task_service.go)Get()now returns signed URL inTaskDetailed.DescriptionURLAPI Response
{ "id": 123, "title": "Example Task", "descriptionUrl": "https://storage/task/123/description.pdf?expires=1706180400&signature=abc...", ... }URLs expire after TTL, backend remains sole authorization point, storage credentials never exposed.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
invalid-host/tmp/go-build924877516/b824/queue.test /tmp/go-build924877516/b824/queue.test -test.testlogfile=/tmp/go-build924877516/b824/testlog.txt -test.paniconexit0 -test.timeout=10m0s /tmp/go-build924877516/b709/vet.cfg om/mattn/go-sqli-errorsas go_.o 64/bin/as -p om/mattn/go-sqli-atomic -lang=go1.22 1249549/b497/imp-buildtags ce t�� om/mattn/go-sqli-errorsas oFiles,IgnoredOt-ifaceassert x_amd64/compile pkg/mod/github.c/opt/hostedtoolcache/go/1.24.2/x64/pkg/tool/linux_amd64/vet om/mattn/go-sqli-atomic -lang=go1.23 x_amd64/compile(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.