headscale/hscontrol/db
Kristoffer Dalby ed4e19996b
Use tailscale key types instead of strings (#1609)
* upgrade tailscale

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* make Node object use actualy tailscale key types

This commit changes the Node struct to have both a field for strings
to store the keys in the database and a dedicated Key for each type
of key.

The keys are populated and stored with Gorm hooks to ensure the data
is stored in the db.

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* use key types throughout the code

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* make sure machinekey is concistently used

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* use machine key in auth url

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* fix web register

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* use key type in notifier

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* fix relogin with webauth

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

---------

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-11-19 22:37:04 +01:00
..
addresses_test.go remove the use key stripping and store the proper keys (#1603) 2023-11-16 17:55:29 +01:00
addresses.go Rename Machine to Node (#1553) 2023-09-24 06:42:05 -05:00
api_key_test.go Replace the timestamp based state system 2023-09-19 10:20:21 -05:00
api_key.go introduce rw lock for db, ish... 2023-09-19 10:20:21 -05:00
db.go Use tailscale key types instead of strings (#1609) 2023-11-19 22:37:04 +01:00
node_test.go Use tailscale key types instead of strings (#1609) 2023-11-19 22:37:04 +01:00
node.go Use tailscale key types instead of strings (#1609) 2023-11-19 22:37:04 +01:00
preauth_keys_test.go remove the use key stripping and store the proper keys (#1603) 2023-11-16 17:55:29 +01:00
preauth_keys.go Rename Machine to Node (#1553) 2023-09-24 06:42:05 -05:00
routes_test.go remove the use key stripping and store the proper keys (#1603) 2023-11-16 17:55:29 +01:00
routes.go Rename Machine to Node (#1553) 2023-09-24 06:42:05 -05:00
suite_test.go Use tailscale key types instead of strings (#1609) 2023-11-19 22:37:04 +01:00
users_test.go remove the use key stripping and store the proper keys (#1603) 2023-11-16 17:55:29 +01:00
users.go Rename Machine to Node (#1553) 2023-09-24 06:42:05 -05:00