feat(server): role based authentication system (#2434)

- Parse toml configuration file, see https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md#authentication
- Retro-compatible with existing AND documented routes, until after v3.41 release
- Log a warning if an unprotected-by-default route is accessed unprotected
- Authentication methods: none, apikey, basic
- `genkey` command to generate API keys

Co-authored-by: Joe Jose <45399349+joejose97@users.noreply.github.com>
This commit is contained in:
Quentin McGaw
2024-09-18 13:29:36 +02:00
committed by GitHub
parent 07651683f9
commit a2e76e1683
25 changed files with 920 additions and 10 deletions

1
go.mod
View File

@@ -8,6 +8,7 @@ require (
github.com/golang/mock v1.6.0
github.com/klauspost/compress v1.17.9
github.com/klauspost/pgzip v1.2.6
github.com/pelletier/go-toml/v2 v2.2.2
github.com/qdm12/dns/v2 v2.0.0-rc6
github.com/qdm12/gosettings v0.4.2
github.com/qdm12/goshutdown v0.3.0