Skip to content

Commit 039e490

Browse files
committed
decided on using encryption
1 parent 81ddce7 commit 039e490

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

TODO.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# ToDo Next
2-
- [ ] current forgejo based backend should be migrated to one where the tokens in the config cannot be used as is, I though of two methods, both depending on adding a new endpoint to mint tokens:
3-
- option 1: generate a private token (or let the user provide it) -> feed into keyed hash function with server secret -> result is public token. When a request comes in, do the same and look at fetched config
4-
- option 2: generate a private token (or let the user provide it) -> encrypt with server secret -> result is saved in the config. When fetching a new config, we decrypt the tokens in the config and then can just look up the tokens in memory for incoming requests
2+
- [ ] Migrate token handling to an encrypted-at-rest model (Option 2) to ensure tokens in the config cannot be used if leaked, while maintaining O(1) lookup performance on the hot path.
3+
- [ ] Implement a simple, well-documented API endpoint to "mint" (encrypt) tokens using the server's secret.
4+
- [ ] Update config loading logic to decrypt tokens in `config.yaml` upon fetch/refresh.
5+
- [ ] Ensure request authentication remains a fast memory lookup against the decrypted tokens.
56

67

78
# Ideas for the future

0 commit comments

Comments
 (0)