33 Commits

Author SHA1 Message Date
Evan Goode
4b1d9d420b Defaults for array-of-tables config settings
Due to https://github.com/BurntSushi/toml/issues/169, we can't simply
use IsDefined to check whether a user supplied a config value in an
array of tables, as in:

[[FallbackAPIServers]]
    CacheTTLSeconds = 123

We can work around this by using *T instead of T in the config
file schema. If the TOML key is not set, it will be parsed as nil.
2025-04-06 23:48:36 +00:00
Evan Goode
5b8188c202 Correct default skin size limit to 64 2025-04-04 20:50:01 -04:00
Evan Goode
99b8540295 Rename AllowCreatingDeletingPlayers to AllowAddingDeletingPlayers 2025-03-30 12:15:00 -04:00
Evan Goode
a5c06f8827 Add AllowCreatingDeletingPlayers 2025-03-29 18:29:56 -04:00
Evan Goode
1f4b46b11a Release notes for 3.0.0 2025-03-22 18:51:33 -04:00
Evan Goode
5c1f6c1cfa
Implement SSO via OIDC (#127)
Resolves https://github.com/unmojang/drasl/issues/39

* Use __Host- cookie prefix instead of setting Domain

See https://stackoverflow.com/a/64735551

* Unlinking OIDC accounts

* AllowPasswordLogin, OIDC docs, cleanup

* YggdrasilError

* Migrate existing password users without login

* API query/create/delete user OIDC identities

* test APICreateOIDCIdentity

* test APIDeleteeOIDCIdentity

* API Create users with OIDC identities

* OIDC: PKCE

* Use YggdrasilError in authlib-injector routes

* OIDC: AllowChoosingPlayerName

* recipes.md: Update for OIDC and deprecated config options

* OIDC: fix APICreateUser without password, validate oidcIdentities

* OIDC: error at complete-registration if no preferred player name

* Proper error pages

* MC_ prefix for Minecraft Tokens
2025-03-22 16:40:26 -04:00
хлифи
fbc8f9d45a
APIs for login and register (#136)
* APIs for login and register

* return 403 instead of 423 if account is locked

* add login API route to ratelimiter

* APILogin remove browser token gen & return, give API token instead

* generalize login logic

* remove transient user handling

* remove APIRegisterChallenge due to unnecessary

* remove honeypot from APIRegister

* APIRegister remove browser token gen & return, give API token instead

* add register API route to ratelimiter

* add missing API godoc

* Clean up app.Login error handling

* Fix rate-limit errors for API routes

* Deduplicate APICreateUser and APIRegister

* Rate-limit all non-admin unsafe API requests

* APILogin test

* Make SetIsLocked write to the tx

* Add CORSAllowOrigins option

* Assert SetIsLocked without err variable

* Fix and test API rate limiting

---------

Co-authored-by: Evan Goode <mail@evangoo.de>
2025-02-15 21:43:02 -05:00
хлифи
c16361c6bc
Add disabling frontend (#137)
* Add disabling frontend

* fixes requested in review

* Document EnableWebFrontEnd in configuration.md
2025-02-02 22:16:32 -05:00
Evan Goode
5a58d24156 Automatic pre-migration DB backups 2024-12-28 21:07:32 -05:00
Evan Goode
0865865cd3 Player API routes, API tests/fixes 2024-12-28 21:07:32 -05:00
Evan Goode
738d80538f Make multiple profiles usable from web front end 2024-12-28 21:07:32 -05:00
Evan Goode
73aeed39cb Document AllowTextureFromURL 2024-11-26 14:56:59 -05:00
cat
2adf099190 Add EnableFooter 2024-07-08 23:52:22 -04:00
Evan Goode
fddbebfed5 doc: EnableBackgroundEffect 2024-06-23 12:05:50 -04:00
Evan Goode
d017879daa Add ValidPlayerNameRegex option
By default, Drasl should check to make sure player names don't contain
special characters.

For https://github.com/unmojang/drasl/issues/73
2024-05-23 16:57:38 -04:00
Evan Goode
498702f049 doc: mineflayer 2024-05-05 12:25:08 -04:00
Evan Goode
1ddd8660bd Clarify when to set ListenAddress = "127.0.0.1:25585" 2024-04-20 15:47:49 -04:00
Evan Goode
e8537ea54c OfflineSkins, also fix several skin issues 2023-11-10 20:19:07 -05:00
Evan Goode
240bfd353f DenyUnknownUsers 2023-11-10 00:02:51 -05:00
Evan Goode
899b3ab4b1 Document CacheTTLSeconds 2023-11-09 23:39:46 -05:00
Evan Goode
93c65ef920 Document TokenStaleSec, TokenExpireSec 2023-11-09 23:02:32 -05:00
Evan Goode
9ec4382b58 Fix link to recipes.md 2023-09-19 22:11:30 -04:00
Evan Goode
3d54b131c8 Linting, formatting 2023-09-18 21:46:53 -04:00
Evan Goode
32242f1002 Make fallback API cache configurable
Closes https://github.com/unmojang/drasl/issues/19
2023-09-16 14:00:30 -04:00
Evan Goode
68f9e17803 recipes.md 2023-08-31 00:10:42 -04:00
Evan Goode
d750dacdbb Config validation/cleaning, cleanup 2023-08-29 00:26:21 -04:00
Evan Goode
c5af033ca4 Fix AnonymousLogin, rename to TransientUsers 2023-08-20 02:15:04 +00:00
Evan Goode
fad4a8498c Print initial invite link if necessary 2023-07-09 01:01:26 -04:00
Evan Goode
7665b2129d Add configurable body size limit
Closes #13
2023-07-08 23:30:30 -04:00
Evan Goode
acbd22a011 DefaultAdmins, interface fixes 2023-07-07 20:39:19 -04:00
Evan Goode
1d49f367f6 Add options to disable skins, capes 2023-07-07 16:52:09 -04:00
Evan Goode
a8bb8832dd s/SkinForwarding/ForwardSkins/, allow setting fallback player 2023-06-25 15:32:24 -04:00
Evan Goode
bbffae71f7 configuration.md 2023-06-25 15:32:24 -04:00