multiple auth tokens - is that feasible?
tessus opened this issue · comments
Sorry for posting an issue, but the discussions are not available for this repo. This is not a bug, but rather a question.
I was thinking whether the possibility of multiple auth tokens is a good idea. My use-case was that I'd like to share access to my rustypaste instance with a few select people. But sharing access tokens is somewhat a no-no, even though it is nothing critical and I know the people I'd give the token to anyway.
What do you think? Is this something that makes sense or is this an overkill?
I thought about a few ways to implement this. e.g. an optional config option access_token_file
that points to a file, in which each line holds a token. Or an access_tokens
array in the config.
The question is whether to read that file into an array at start (and when the config is refreshed) or at request time. The latter is easy, but I don't like it due to perf implications, and the former might need a little bit of research on my part (due to memory locking and so on).
It's just an idea for a future feature, but as mentioned I am not sure if it is feasible. It's also not something I have to do myself. A Rustacean can probably do this in 5 minutes or 10 minutes with test cases.
You can close this issue right away. I just didn't find another way to ask this question.