1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-12-20 19:09:07 +01:00
juanfont.headscale/hscontrol/util
Kristoffer Dalby 218138afee
Redo OIDC configuration (#2020)
expand user, add claims to user

This commit expands the user table with additional fields that
can be retrieved from OIDC providers (and other places) and
uses this data in various tailscale response objects if it is
available.

This is the beginning of implementing
https://docs.google.com/document/d/1X85PMxIaVWDF6T_UPji3OeeUqVBcGj_uHRM5CI-AwlY/edit
trying to make OIDC more coherant and maintainable in addition
to giving the user a better experience and integration with a
provider.

remove usernames in magic dns, normalisation of emails

this commit removes the option to have usernames as part of MagicDNS
domains and headscale will now align with Tailscale, where there is a
root domain, and the machine name.

In addition, the various normalisation functions for dns names has been
made lighter not caring about username and special character that wont
occur.

Email are no longer normalised as part of the policy processing.

untagle oidc and regcache, use typed cache

This commits stops reusing the registration cache for oidc
purposes and switches the cache to be types and not use any
allowing the removal of a bunch of casting.

try to make reauth/register branches clearer in oidc

Currently there was a function that did a bunch of stuff,
finding the machine key, trying to find the node, reauthing
the node, returning some status, and it was called validate
which was very confusing.

This commit tries to split this into what to do if the node
exists, if it needs to register etc.

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2024-10-02 14:50:17 +02:00
..
addr_test.go use cmp.Diff instead of reflect.DeepEqual 2023-07-01 21:55:47 +02:00
addr.go use tsaddr library and cleanups (#2150) 2024-10-02 09:06:09 +02:00
const.go Split code into modules 2023-05-26 12:24:50 +02:00
dns_test.go Redo OIDC configuration (#2020) 2024-10-02 14:50:17 +02:00
dns.go Redo OIDC configuration (#2020) 2024-10-02 14:50:17 +02:00
file.go improve errors for missing directories (#1765) 2024-02-17 13:36:19 +01:00
key.go use tsaddr library and cleanups (#2150) 2024-10-02 09:06:09 +02:00
log.go Integrate GORM Logger with Zerolog and Add Configuration Options for Logging and Performance (#2040) 2024-08-19 11:47:52 +02:00
net.go use tsaddr library and cleanups (#2150) 2024-10-02 09:06:09 +02:00
string_test.go create DB struct 2023-05-26 12:24:50 +02:00
string.go remove custom contains funcs for slices.Contains (#2015) 2024-07-19 09:04:04 +02:00
test.go fix route table migration wiping routes 0.22 -> 0.23 (#2076) 2024-08-27 18:54:28 +02:00
util_test.go Get integration test netmap from watch-ipn command (#1729) 2024-02-18 23:22:18 +01:00
util.go Get integration test netmap from watch-ipn command (#1729) 2024-02-18 23:22:18 +01:00