Commit Graph

24 Commits

Author SHA1 Message Date
Kurnia D Win 2560c32378
adding some sleep on re-registration after machine expired (#1256) 2023-03-20 11:14:34 +01:00
Kristoffer Dalby 90287a6735 gofumpt
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-01-18 15:40:04 +01:00
Kristoffer Dalby e3a2593344 Rename [Nn]amespace -> [Uu]ser in go code
Use gopls, ag and perl to rename all occurances of Namespace

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-01-18 15:40:04 +01:00
Juan Font afae1ff7b6 Delete ephemeral machines on logout
Update changelog

Use dedicated method to delete
2023-01-05 14:59:02 +01:00
Juan Font 593040b73d Run the Noise handlers under a new struct so we can access the noiseConn from the handlers
In TS2021 the MachineKey can be obtained from noiseConn.Peer() - contrary to what I thought before,
where I assumed MachineKey was dropped in TS2021.

By having a ts2021App and hanging from there the TS2021 handlers, we can fetch again the MachineKey.
2022-12-21 20:52:08 +01:00
Juan Font Alonso 275cc28193 Do not strip nodekey prefix on handle expired 2022-11-15 21:28:26 +01:00
Juan Font c5ba7552c5 Added more logging 2022-11-15 21:28:26 +01:00
kyra cfda804726 Provide LoginName when registering with pre-auth key 2022-11-06 19:09:52 +01:00
LiuHanCheng 07f92e647c
fix bug in #912 (#914) 2022-11-05 09:07:22 +01:00
Kristoffer Dalby bc1c1f5ce8
Fix most nil pointers, actually make it check for unique across headscale
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-10-21 14:42:37 +02:00
= 2aebd2927d
Random suffix only on collision.
0.16.0 introduced random suffixes to all machine given names
(DNS hostnames) regardless of collisions within a namespace.
This commit brings Headscale more inline with Tailscale by only
adding a suffix if the hostname will collide within the namespace.

The suffix generation differs from Tailscale.
See https://tailscale.com/kb/1098/machine-names/
2022-10-03 09:13:56 +02:00
Kristoffer Dalby 8dcc82ceb3
Use oidc if it initialised, not if it is configured
OIDC might be configured, but unable to be initialised, this only runs
the oidc cycle if it is actually successfully set up/initialised.

Prep for next commit

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-09-26 09:51:23 +02:00
Benjamin George Roberts c52e3aafe6 remove unnecessary checks on slices 2022-09-23 18:04:30 +10:00
Benjamin George Roberts 8a8ec7476d fix linting issues in preauthkey tags 2022-09-08 09:03:38 +10:00
Juan Font f6153a9b5d
Merge branch 'main' into preauthkey-tags 2022-09-04 22:35:51 +02:00
Juan Font Alonso 4527801d48 More unused parameters removed in protocol functions 2022-09-04 11:41:31 +02:00
Juan Font Alonso e0857f0226 Removed unused parameters in protocol functions 2022-09-04 11:40:14 +02:00
Benjamin George Roberts ac18723dd4 Set tags as part of handleAuthKeyCommon 2022-08-25 22:26:04 +10:00
Juan Font Alonso e20e818a42 Integrate expiration fixes (#754) in TS2021 branch 2022-08-20 11:46:44 +02:00
Juan Font Alonso f0a8a2857b Clarified why we have a different key 2022-08-20 00:23:33 +02:00
Juan Font Alonso b6e3cd81c6 Fixed minor linting things 2022-08-19 14:27:40 +02:00
Juan Font Alonso e2bffd4f5a Make legacy protocol use common methods for client registration 2022-08-19 14:20:24 +02:00
Juan Font Alonso b3cf5289f8 Use CapVer to offer Noise only to supported clients 2022-08-15 23:35:06 +02:00
Juan Font Alonso d0898ecabc Move common parts of the protocol to dedicated file 2022-08-14 21:15:58 +02:00