lus / pasty

pasty is a fast and lightweight code pasting server
https://pasty.lus.pm
MIT License
201 stars 29 forks source link

Store admin tokens in database #57

Open lus opened 1 year ago

lus commented 1 year ago

Currently, the only possible administration token is stored in the PASTY_MODIFICATION_TOKEN_MASTER environment variable. I think it would make sense to store Argon2id hashes in an additional admin_tokens database table instead so we can later provide an API to manage them. The current PASTY_MODIFICATION_TOKEN_MASTER value will then be used as the only superadmin token which is authorized to manage other administration tokens.