1
0
mirror of https://github.com/juanfont/headscale.git synced 2025-10-19 11:15:48 +02:00
juanfont.headscale/hscontrol
Fredrik Ekre 5d8a2c25ea OIDC: Query userinfo endpoint before verifying user
This patch includes some changes to the OIDC integration in particular:
 - Make sure that userinfo claims are queried *before* comparing the
   user with the configured allowed groups, email and email domain.
 - Update user with group claim from the userinfo endpoint which is
   required for allowed groups to work correctly. This is essentially a
   continuation of #2545.
 - Let userinfo claims take precedence over id token claims.

With these changes I have verified that Headscale works as expected
together with Authelia without the documented escape hatch [0], i.e.
everything works even if the id token only contain the iss and sub
claims.

[0]: https://www.authelia.com/integration/openid-connect/headscale/#configuration-escape-hatch
2025-08-11 17:51:16 +02:00
..
assets update flake, fix prettier lint 2023-09-05 08:47:43 +02:00
capver mapper: produce map before poll (#2628) 2025-07-28 11:15:53 +02:00
db mapper: produce map before poll (#2628) 2025-07-28 11:15:53 +02:00
derp mapper: produce map before poll (#2628) 2025-07-28 11:15:53 +02:00
dns integration: replace time.Sleep with assert.EventuallyWithT (#2680) 2025-07-10 23:38:55 +02:00
mapper mapper: produce map before poll (#2628) 2025-07-28 11:15:53 +02:00
policy mapper: produce map before poll (#2628) 2025-07-28 11:15:53 +02:00
routes Fix typos 2025-07-21 12:06:07 +02:00
state mapper: produce map before poll (#2628) 2025-07-28 11:15:53 +02:00
templates integration: replace time.Sleep with assert.EventuallyWithT (#2680) 2025-07-10 23:38:55 +02:00
types OIDC: Query userinfo endpoint before verifying user 2025-08-11 17:51:16 +02:00
util mapper: produce map before poll (#2628) 2025-07-28 11:15:53 +02:00
app.go feat: add robots.txt 2025-08-10 10:57:45 +02:00
auth.go mapper: produce map before poll (#2628) 2025-07-28 11:15:53 +02:00
debug.go mapper: produce map before poll (#2628) 2025-07-28 11:15:53 +02:00
grpcv1_test.go rename package name to hscontrol 2023-05-10 20:47:51 +02:00
grpcv1.go mapper: produce map before poll (#2628) 2025-07-28 11:15:53 +02:00
handlers.go feat: add robots.txt 2025-08-10 10:57:45 +02:00
metrics.go integration: replace time.Sleep with assert.EventuallyWithT (#2680) 2025-07-10 23:38:55 +02:00
noise.go mapper: produce map before poll (#2628) 2025-07-28 11:15:53 +02:00
oidc.go OIDC: Query userinfo endpoint before verifying user 2025-08-11 17:51:16 +02:00
platform_config.go Return better web errors to the user (#2398) 2025-02-01 15:25:18 +01:00
poll.go mapper: produce map before poll (#2628) 2025-07-28 11:15:53 +02:00
suite_test.go Redo OIDC configuration (#2020) 2024-10-02 14:50:17 +02:00
tailsql.go integration: replace time.Sleep with assert.EventuallyWithT (#2680) 2025-07-10 23:38:55 +02:00