headscale/hscontrol
Christopher Johnstone 205a008013 Allow use of the preferred_username OIDC claim
Previously, Headscale would only use the `email` OIDC
claim to set the Headscale user. In certain cases
(self-hosted SSO), it may be useful to instead use the
`preferred_username` to set the Headscale username.
This also closes #938.

This adds a config setting to use this claim instead.
The OIDC docs have been updated to include this entry as well.
In addition, this adds an Authelia OIDC example to the docs.

Added OIDC claim integration tests.

Updated the MockOIDC wrapper to take an environment variable that
lets you set the username/email claims to return.

Added two integration tests, TestOIDCEmailGrant and
TestOIDCUsernameGrant, which check the username by checking the FQDN of
clients.

Updated the HTML template shown after OIDC login to show whatever
username is used, based on the Headscale settings.
2023-10-29 16:55:20 -04:00
..
assets update flake, fix prettier lint 2023-09-05 08:47:43 +02:00
db Set online status in lite requests (#1555) 2023-09-25 14:27:14 -07:00
derp fix lint 2023-09-19 10:20:21 -05:00
mapper Upgrade Go 1.21, Tailscale 1.50 and add Capability version support (#1563) 2023-09-28 12:33:53 -07:00
notifier improve debug logging, rw lock for notifier 2023-09-19 10:20:21 -05:00
policy Rename Machine to Node (#1553) 2023-09-24 06:42:05 -05:00
templates update flake, fix prettier lint 2023-09-05 08:47:43 +02:00
types Allow use of the preferred_username OIDC claim 2023-10-29 16:55:20 -04:00
util use cmp.Diff instead of reflect.DeepEqual 2023-07-01 21:55:47 +02:00
app.go Rename Machine to Node (#1553) 2023-09-24 06:42:05 -05:00
auth.go Rename Machine to Node (#1553) 2023-09-24 06:42:05 -05:00
auth_legacy.go Rename Machine to Node (#1553) 2023-09-24 06:42:05 -05:00
auth_noise.go Rename Machine to Node (#1553) 2023-09-24 06:42:05 -05:00
grpcv1.go Rename Machine to Node (#1553) 2023-09-24 06:42:05 -05:00
grpcv1_test.go rename package name to hscontrol 2023-05-10 20:47:51 +02:00
handler_legacy.go rename package name to hscontrol 2023-05-10 20:47:51 +02:00
handler_placeholder.go rename package name to hscontrol 2023-05-10 20:47:51 +02:00
handlers.go Upgrade Go 1.21, Tailscale 1.50 and add Capability version support (#1563) 2023-09-28 12:33:53 -07:00
metrics.go Rename Machine to Node (#1553) 2023-09-24 06:42:05 -05:00
noise.go move derp.go to derp module 2023-06-08 16:34:15 +02:00
oidc.go Allow use of the preferred_username OIDC claim 2023-10-29 16:55:20 -04:00
platform_config.go rename package name to hscontrol 2023-05-10 20:47:51 +02:00
poll.go Upgrade Go 1.21, Tailscale 1.50 and add Capability version support (#1563) 2023-09-28 12:33:53 -07:00
poll_legacy.go Upgrade Go 1.21, Tailscale 1.50 and add Capability version support (#1563) 2023-09-28 12:33:53 -07:00
poll_noise.go Upgrade Go 1.21, Tailscale 1.50 and add Capability version support (#1563) 2023-09-28 12:33:53 -07:00
suite_test.go move Config definitions into types 2023-06-08 16:34:15 +02:00